On 08 Apr 2020, at 17:16, Allen Coates <[email protected]> wrote:
> On 09/04/2020 00:01, @lbutlr wrote:
>> Given an email address of [email protected] how can I reject all
>> emails to that address that do not come from amazon.com?
>>
>> I think I did something like this once but if I did, I didn’t keep notes. :/
>>
>>
>
> Funny you should mention that - within the last half-hour I have come up with
> (for header checks file):-
>
> if /^From:.*amazon\.co\.uk/
> !/\<.*\@.*amazon\.co\.uk\>/ WARN Fake Amazon address
> endif
>
> Completely untested - it would be interesting to know if I am getting my
> regexp
> syntax right. :-)
>
> Not quite what you wanted - but hope it helps.
Useful, but not helpful in this case because there is no way to have postfix
check two headers
(If TO contains “amazon” and FROM_ does not contain “amazon”) isn’t something
postfix can do, but perhaps there is a milter out there that can.
I can do it in Sieve, but I would prefer to reject them before they get
delivered.
--
Nine-tenths of the universe is the knowledge of the position and
direction of everything in the other tenth. Every atom has its
biography, every star its file, every chemical exchange its
equivalent of the inspector with a clipboard. It is unaccounted
for because it is doing the accounting for the rest of it.
Nine-tenths of the universe, in fact, is the paperwork. --The
Thief of Time