Received-SPF: pass (Last token {include:spf.protection.outlook.com} (res=PASS)) client-ip=40.107.70.49; envelope-from=<JimL@n2net.com>; x-ip-name=mail-eopbgr700049.outbound.protection.outlook.com;
X-Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700049.outbound.protection.outlook.com [40.107.70.49])
by netwin.co.nz (SurgeMail 7.3p) with ESMTP (TLS) id 7407111-1391920
for <surgemail-list@netwin.co.nz>; Thu, 17 Jan 2019 14:59:08 +0000
X-Return-Path: JimL
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=n2net.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=1N4osy/uMXLxD61C3IPI6CgVhOWyuis7Er7TtealARE=;
b=M/r1IpWR5naHWHJBRXLhawlOwh9kqvdFhN1Xoe5WOUyJeNlqVtT0th7wYIMPm4FjUaDBqBLuDjV/aIZH/RcUevQsBEHkx2JiVvli55PG+DdHSnCj5W44VMBfCSTd46lOgfBjcFRu0NzTwBfEateNBPdtH8b+TIzVTqK2NtkLJ8M=
X-Received: from BN6PR15MB1396.namprd15.prod.outlook.com (10.172.150.21) by
BN6PR15MB1282.namprd15.prod.outlook.com (10.172.206.20) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.1537.24; Thu, 17 Jan 2019 14:59:04 +0000
X-Received: from BN6PR15MB1396.namprd15.prod.outlook.com
([fe80::f0cb:e00f:554e:74fe]) by BN6PR15MB1396.namprd15.prod.outlook.com
([fe80::f0cb:e00f:554e:74fe%4]) with mapi id 15.20.1537.018; Thu, 17 Jan 2019
14:59:04 +0000
From: Jim Lohiser
To: "surgemail-list@netwin.co.nz" <surgemail-list@netwin.co.nz>
Subject: [SurgeMail List] mfilter replace email address
Thread-Topic: mfilter replace email address
Thread-Index: AdSudT22WoHg+vPVSFan8r6n4vekTQ==
Date: Thu, 17 Jan 2019 14:59:04 +0000
Message-ID:
<BN6PR15MB13963A42F66FB1952318D57194830@BN6PR15MB1396.namprd15.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=JimL@n2net.com;
X-x-originating-ip: [207.166.192.127]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics:
1;BN6PR15MB1282;6:CJW8YLuHfuMXUMyZCoHw3ZCABm/SFsq2KOq8PUTclMcm0rq00S3Wk8h9TJMJGxYiiTGm6tDe4rV1lMlIJfxj314VvsixsMdbTwcVVafyac5wT7iDgRC2pliW1qbZRqLftlQ0oC/E7+UAXmmMnSBjp6lacN1JOdXsV31WFcy1A85n0dq/2v603DNmHCm7tSDHnbvnhi+Y0rXMyf3vAwQWo+yQWJj6tPgYhZ92qMtzBV0NPYRGEX2Ab3BxMHLhD2rDGGI9dgwooh22aMNyUsU720tpNk+kt3YA3PiBSNmPKB4FdOhq3/XsLyTmM8tTzjMzYeNeEnimfPuAIuDaXBlnZ2nkhvznLsxOLIWjWiEPRQli/1YnECsZiZXK2wCXo9UjTI8SUPJnqsSBzS5U1+L6PzyXmY69kZb3IhS1e7WfEgPTIuEYMUJ0Ga+1vlj4+2GUaLGTNaRgoR63rmLILedsWQ==;5:XVDPTceECnmfxv64kCA1B0RpnShH8iwmbYWOk8tQPjfPayK2Etil04Dbj6vD4jHka5nATRjsg5gz95gZMBuXjWxOqG/4LneGs/TflaSF1junapZPi5jENbTiP64okrWhFpwJOs9GdJjC2mJbgptgK8O6OH9Kj/f5e8PO8kHTp27JKz/UbQGORAlPT0YQwKiCua/BbI2hdiRTfrMtrvFZwg==;7:nr779FOvUqLIbXjZgkz2QRLR7p7MTOa2huLBBK30SF6NfEssngYxu3y7jZiZ7J3K8WmpUUrQKPGmK40fqqMSyadfXnFizSmaGfmw1YTtc06wGfq716DzhFD9x3Nr6Xk3GYym4vt/B+5ptlw7hsRaFw==
x-ms-office365-filtering-correlation-id: 63ba7f4e-c3d4-4336-6f74-08d67c8c5288
x-microsoft-antispam:
BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:BN6PR15MB1282;
x-ms-traffictypediagnostic: BN6PR15MB1282:
x-microsoft-antispam-prvs:
<BN6PR15MB1282A100E51D0A500C04EA1494830@BN6PR15MB1282.namprd15.prod.outlook.com>
x-forefront-prvs: 0920602B08
x-forefront-antispam-report:
SFV:NSPM;SFS:(10009020)(396003)(366004)(376002)(39830400003)(346002)(136003)(189003)(199004)(51874003)(106356001)(508600001)(2906002)(74316002)(72206003)(53936002)(6116002)(3846002)(2351001)(97736004)(25786009)(33656002)(5640700003)(6436002)(9686003)(2501003)(55016002)(80792005)(66066001)(256004)(86362001)(68736007)(71190400001)(476003)(5660300001)(6506007)(486006)(102836004)(305945005)(71200400001)(316002)(186003)(99286004)(26005)(105586002)(81166006)(81156014)(7696005)(6916009)(8936002)(14454004)(7736002)(3480700005)(8676002)(158833001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR15MB1282;H:BN6PR15MB1396.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1;
received-spf: None (protection.outlook.com: n2net.com does not designate
permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info:
gVrRjWQemSv1OXkBbJFRpOjp7Ks2WMjJsOIqL3azpMYwqX08ACPUZIeDDacTKPXr1F202XlMoo5DtGnRNPmts99wJXNGTZZ1FrWDKQVyYcSbp0KpE2htBBzwpHpsmsMGli7QoaP6BPOkoFef39VBiKcRtH6aGNZSoKTRUEVfZClTaOsad/iKeLO0HZ01CLHJ7yUF31yElP09yMi+BBynpKiJzJXCrNnrWnjUSN7dXhsx0ay7HpUGz6Cq4aMD2NeNe6SRFVULJxjzV3FOLABhl1qe4YDFQX3f8xUgxK+V9ljxFo7UVNmbITli6ZNwYwhA+dbnbY4W50w6dEXp+I6CEhYyx99eHaLzRm5Ri37nM9trGoSCTnLF2DIOEmndyPbdAPowTztUeYvLMj4vWmXjqhUYoNc5cyVR3lzTJeCmVjo=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: n2net.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 63ba7f4e-c3d4-4336-6f74-08d67c8c5288
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2019 14:59:04.1002
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 22f40af6-63b3-4367-a32e-781031f4a7bb
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1282
X-Originating-IP: 40.107.70.49
X-Country: code=US country="United States" ip=40.107.70.49
X-ORBS-Stamp: hostkarma_yellow, hostkarma_quitok
X-Rcpt-To: <surgemail-list@netwin.co.nz>
X-SpamDetect: *: 1.1 sd=1.1 lv=0.00 nok=28/2 m=28 nf=0 Close 0.04(X-myrbl:Color=white) 0.90(X-Phrase:isspam) 0.23(X-Verify-MX present) 0.76(X-Verify-Helo:-ERR) 0.27(StandardTLD) 0.30(genuine) 0.30(dkimok) 0.37(X-Verify-Helo:wrongip) 0.41(X-NotAscii:us-ascii) 0.44(spfpass) 0.44(X-LangGuess:English) 0.47(X-ORBS-Stamp:yellow) Saned 5.0 Sval 1.1 bsan 5.0 Moved 5.0->1.1 Sval 1.1
X-NotAscii: charset=us-ascii
X-LangGuess: English
X-Probe: +OK nothing bad found
X-Phrase: IsSpam score=1.00
X-Verify-Helo: -ERR wrongip: NAM04-SN1-obe.outbound.protection.outlook.com -> 216.32.*.* not in 40.107.70.49
Authentication-Results: netwin.co.nz header.from=JimL@n2net.com; dkim=pass (good signature)
X-Verify-MX: <JimL@n2net.com> senders ip (ch=40.107.70.49 msg=40.107.70.49, net=40.107.) not in mx data dom=n2net.com ipname=mail-eopbgr700049.outbound.protection.outlook.com (207.166.203.21)
X-Encryption: SSL encrypted
X-MyRbl: Color=White Age=269 Spam=0 Notspam=5 Stars=15 Good=2419 Friend=4904 Surbl=2 Catch=0 r=0.00043 ip=40.107.70.49
X-IP-stats: No info recorded yet ip=40.107.70.49
List-Unsubscribe: <mailto:surgemail-list-leave@netwin.co.nz?subject=unsubscribe>
X-Mailing-List: surgemail-list@netwin.co.nz
List-ID: <surgemail-list@netwin.co.nz>
Precedence: bulk
Reply-To: surgemail-list@netwin.co.nz
SurgeMail List,
We have a need to rewrite an email address in message headers. I am attempting to write an mfilter rule to make this happen. I have created the following rules.
recipients
if (isin("recipient","support@n2net.com")) then
replace("to","support@n2net.com","support@n2net.net")
end if
end recipients
This works. It replaces both the email address and the "name" portion in the To address (see below).
To: "support@n2net.net" <support@n2net.net>
HOWEVER, if the message has multiple recipients, then the rule does not work.
To: "johndoe@domain1.tld" <johndoe@domain1.tld>, "support@n2net.com" <support@n2net.com>, "janedoe@domain2.tld" <janedoe@domain2.tld>
I know the isin() test is working because I added a "call report()" to the rule block and it sends me a report email. I have tried adding wildcards to the rule (see below), but this also does not work.
replace("to","*support@n2net.com*","%1support@n2net.net%2")
Is there any way to replace all instances of an email address in a header?
Thanks in advance,
Jim Lohiser
N2Net
|