On Mon, 28 Dec 2020, RW wrote:
On Sun, 27 Dec 2020 10:17:15 -0800 (PST)
John Hardin wrote:
To catch those you'd need to check for the address in a Received:
header, assuming your MTA adds the envelope recipient to the
Received: header it generates.
You might do:
header ABUSED_PLUS Received =~ /\bfor
<shiva[+.](?:abused1|abused2)\@sewingwitch\.com>/i
This isn't completely reliable as the MTA wont provide the envelope
recipient when there's more than one in the same SMTP session. It may
be good enough for a single user mail system though.
I presume this isn't trivial to fix as Fastmail had an unreliable
X-Delivered-to header for years.
Without a reliable envelope recipient, the best you can do is use all
the sources of addresses, something like the following (untested):
header ABUSED_PLUS All =~
/^(?:(?:To|Cc):\s(?:.*(?:,\s|<))?|Received:.*for\s<)(?:shiva[+.](?:abused1|abused2)\@sewingwitch\.com)[,>\s\n]/im
Right, that's better.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhar...@impsec.org pgpk -a jhar...@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
212 days since the first private commercial manned orbital mission (SpaceX)