Gordan Bobic wrote:
But now that you mentioned it - is there a way to make Courier make an
additional check?
e.g. it receives a message:
From: inva...@mydomain.com
To: val...@maydomain.com
Normally, this is not too plausible to check if from is for a non-locally
hosted domain, but if from is from a locally hosted domain, can we make
Courier check if from is deliverable, and if not, reject with "unknown
sender" or some such?
That's not one of the checks that Courier performs, AFAIK.
To carry out that check, you need to roll out your own filter.
Actually, it is not a bad idea, since some spammers appear to be
convinced that they get a better likelihood to deliver their thing
if the sender's faked address features the same domain as the
recipient(s).
In case you really want to check "From" and "To" as sketched above,
you may do that using a global filter.
If you meant to check "MAIL FROM", a.k.a. Return-Path instead, you
might also do that using the maildropfilter. It is invoked for each
"RCPT TO", before receiving the body of the message. This filtering
feature can be deployed running maildrop in "embedded mode", which is
done by writing maildrop's full path in the "maildropfilter" config
file. However, one can point to whatever executable from that config
file. The running program should read the SENDER environment variable
and exit, say, 1 if it is a non-existing local domain. See
http://www.courier-mta.org/localmailfilter.html
On a separate note, is it possible to get Courier to do return path
verification? i.e. for the from address, look up mx, connect, and do:
HELO, MAIL FROM, RCPT TO, QUIT, just to see if the FROM address is
deliverable?
Ditto for how to implement that using a filter. However, I cannot
imagine what would happen in case the remote domain filters according
to the same principle, or uses greylisting, or is temporarily down.