我想configurationpostfix重写部分的附件,但我不能。 邮件如下所示:
Delivered-To: [email protected] Received: by 10.79.105.2 with SMTP id e2csp165490ivc; Wed, 18 Oct 2017 11:12:06 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TMK//6NjfuOypNhxCQAQHvUrdWZcxAZh3saC0FNpk0rdE6pFXcp7oR0GXf5lt+sn4bZ/pU X-Received: by 10.55.162.198 with SMTP id l189mr3754805qke.168.1508350326477; Wed, 18 Oct 2017 11:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508350326; cv=none; d=google.com; s=arc-20160816; b=jC/vVQs5NQsonzZNWfcjVdkwAAPn2MqqCf3vpiYYukZWcj1YfUUGF6DUpHVlFpC88j bstQWyj452iRvLKcQKc86mO2sI9z2tg24mP//VAOQ7vrmP+hc4XEgaEzvHM5QJlS3sFY NHUSz+RfZ0mXbsqkzDtcS01IUc0gzigvBTT7qb/3iM8KwlSLRmelaaZJcq/uiGfcIBYo BcY5mgY+YCSPY76p4Tg45IlhtL2AjX+jGzA790ccG5El9U+Uy7DW2mmjIrJx6KDwYvaP HW7YkFEpnp0Um8lMy1InM5niShjf7su8akxTXgjx1nTtWCiXAuqG3Lwoo0xZynkxvSv1 jYxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=from:message-id:subject:date:mime-version:to :arc-authentication-results; bh=3trVlPpI6FDT9oL71JnnOZ5j5PSfjLbD3b4gOfPz88Q=; b=nQKlbByQNq5Wcw8igjvz93e2LsqlbC1w8kVBQ+GfPbeR8OLiutQw4f6q40WUvDJTBR wQ/2zG1jyO7Bop3N9/27OqgSQcqd00Ny4emhBiX+lX7tvhA4rMoPejqvI4sFeUtrwf+F rigaVNsUTxyJzIfA9KSOsAtLV6lGDAqAViCnfLPL7RdVof/NPZAnbfCdzS+btFLN5dWW Z8ymZAMyrdhEoarDhzYM+ZZT/zNmR1KN0DQCh6fPMHgxojDR8KXxFmv6dCkbB3KLua/q qj4nvDQP6i7UcSs7SqeLdorUxP2RQZdYKcE5SoQ+BwD8W9kvsE7ArT4+4v/XqqanOgP8 80Vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of [email protected] designates 10.10.62.65 as permitted sender) [email protected] Return-Path: <[email protected]> Received: from mx1.example.com (mx1.example.com. [10.10.62.65]) by mx.google.com with ESMTP id w49si5379376qtc.415.2017.10.18.11.12.06 for <[email protected]>; Wed, 18 Oct 2017 11:12:06 -0700 (PDT) Received-SPF: pass (google.com: domain of [email protected] designates 10.10.62.65 as permitted sender) client-ip=10.10.62.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of [email protected] designates 10.10.62.65 as permitted sender) [email protected] Received: from localhost (localhost [127.0.0.1]) by mx1.example.com (Postfix) with ESMTP id 80CED18DE22D4 for <[email protected]>; Wed, 18 Oct 2017 15:12:05 -0300 (-03) X-Amavis-Modified: Mail body modified (using disclaimer) - muteriver.example.local Received: from mx1.example.com ([127.0.0.1]) by localhost (muteriver.example.local [127.0.0.1]) (amavisd-new, port 10587) with ESMTP id UKXkQUwTXwqs for <[email protected]>; Wed, 18 Oct 2017 15:12:05 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mx1.example.com (Postfix) with ESMTP for <[email protected]>; Wed, 18 Oct 2017 15:12:05 -0300 (-03) To: [email protected] Content-Type: multipart/mixed; boundary="----=_=-_OpenGroupware_org_NGMime-401-1508350325.290417-0------" MIME-Version: 1.0 Date: Wed, 18 Oct 2017 15:12:05 -0300 Subject: =?utf-8?q?Invitaci=C3=B3n?= al =?utf-8?q?evento=3A?==?utf-8?q?__=227?= Mad =?utf-8?q?Test=22?= Message-ID: <191-59e79980-1-7be22e80@201635272> X-Sogo-Message-Type: calendar:invitation From: "Sergio Belkin" <[email protected]> ------=_=-_OpenGroupware_org_NGMime-401-1508350325.290417-0------ Content-Type: text/html; charset=utf-8 <html> <head> <style type="text/css"> th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; font-size: 12px; line-height: 18px; } </style> </head> <body> <table style="width: 100%; max-width: 600px;" border="0" cellspacing="2" cellpadding="2"> <tr> <th /> <td><h1 class="ng-hide" style="font-size: 18px; font-weight: normal; padding-bottom: 9px; border-bottom: 1px solid #ccc;">Invitación al evento: "7 Mad Test" <small style="font-size: 12px; color: #999;">Sergio Belkin</small></h1></td> </tr> <tr> <th align="right" style="font-weight: bold;">Inicio</th> <td>Jueves, Octubre 19, 2017 - 11:15 America/Argentina/Buenos_Aires </td> </tr> <tr> <th align="right" style="font-weight: bold;">Fin</th> <td>Jueves, Octubre 19, 2017 - 12:15 America/Argentina/Buenos_Aires </td> </tr> </table> <br> <br> </body> </html> ------=_=-_OpenGroupware_org_NGMime-401-1508350325.290417-0------ Content-Class: urn:content-classes:calendarmessage Content-Type: text/calendar; method=REQUEST; charset="UTF-8" Content-Transfer-Encoding: quoted-printable BEGIN:VCALENDAR PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN VERSION:2.0 METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/Argentina/Buenos=5FAires BEGIN:STANDARD TZOFFSETFROM:-0300 TZOFFSETTO:-0300 TZNAME:ART DTSTART:19700101T000000 END:STANDARD END:VTIMEZONE BEGIN:VEVENT CREATED:20171018T181137Z LAST-MODIFIED:20171018T181205Z DTSTAMP:20171018T181205Z UID:290bc19d-eceb-42a7-ab0c-1356c6d113c5 SUMMARY:7 Mad Test ATTENDEE;PARTSTAT=3DNEEDS-ACTION;RSVP=3DTRUE;ROLE=3DREQ-PARTICIPANT:mailto:[email protected] DTSTART;TZID=3DAmerica/Argentina/Buenos=5FAires:20171019T111500 DTEND;TZID=3DAmerica/Argentina/Buenos=5FAires:20171019T121500 TRANSP:OPAQUE CLASS:PUBLIC X-MOZ-GENERATION:1 ORGANIZER;ROLE=3DCHAIR;RSVP=3DTRUE;PARTSTAT=3DACCEPTED;CN=3DJohn Doe:mailto:[email protected] SEQUENCE:1 END:VEVENT END:VCALENDAR ------=_=-_OpenGroupware_org_NGMime-401-1508350325.290417-0--------
我想要replace:ORGANIZER; ROLE = 3DCHAIR; RSVP = 3DTRUE; PARTSTAT = 3DACCEPTED; CN = 3DJohn Doe:mailto:[email protected]
通过:
ORGANIZER; ROLE = 3DCHAIR; RSVP = 3DTRUE; PARTSTAT = 3DACCEPTED; CN = 3DJohn Doe:mailto:[email protected]
我试过了:
附:
/etc/postfix/main.cf文件:
body_checks = pcre:/etc/postfix/body_checks header_checks = pcre:/etc/postfix/header_checks
在这两个文件/ etc / postfix / {body,headers} _checks文件中 ,我有:
/^(.*)examen.local(.*)/ REPLACE ${1}example.com${2}
但是我得到:
ORGANIZER;ROLE=3DCHAIR;RSVP=3DTRUE;PARTSTAT=3DACCEPTED;CN=3DJohn Doe:mailto:[email protected]":mailto:[email protected]
请你帮忙,是正则expression式不好?