John M Collins wrote:
> So I'd like to reject mail over a certain size if it doesn't have a
> "To:" line in the header or if it does but it goes to a domain which we
What about Cc and Bcc? I guess you will loose legit mail with such a check.
> host but don't usually take mail for.
What do you mean by that? Either you take mail for them or you do not.
If you don't, reject it (in the smtp rcpt ACL).
> {or {
> {!def:h_To: {1}}
Where did you get this syntax from? It should simply be
{!def:h_To:}
> {${lookup{$h_To:} nwildlsearch{CONFDIR/Rare-domains}{1}}
This won't work. "To" can contain multiple addresses and every address
can contain a human readable part (e.g. "John M Collins
<jmc@???>"), so you cannot simply match on "jmc@???".
My recommandation: Test for envelope addresses.