[Exim] blocking local misaddressed mail

Top Page
Delete this message
Reply to this message
Author: Leonardo Boselli
Date:  
To: exim-users
Subject: [Exim] blocking local misaddressed mail
The boss said: "I receive some message that in the sender
[actually was both the reply-to and the from fielads] field have non-
existent addresses. It is acceptable for peole from outside, but for
local people ? I cannot throw it, but i have to do a lookup to figure
their real address. I want all these messages be rejected."
So i must do the following:
a) the filter must work only for message sent via SMTP from a
local host [that is the list of relay-accept-hosts LESS the
secondary MXs]
b) In such case it should check if any of from/reply-to/resent-from
addresses is local (that is *@dicea.unifi.it ), if so it must check if
such address is valid. If the address is invalid it should refuse the
messages with a 550 (or 553 ?) reply
c) the check must be done on the actual headers sent, not on the
envelope (so if one send a message giving right mail from: to
SMTP, but in the headers there is a different one, it must be this
one to be checked) since the purpose is to notify the sender
[of course it must refuse on accepting, since being the from
address invalid how could refuse it ?] of the improper setting.
d) The address valid are not just those of user, but also those
listed in two alias files and in directors (I have one that get all user
with username beginning with a '0' or a '8' and send to another
server :-( ) ...
Any hint ?

Leonardo Boselli (NIT)
Dipartimento Ingegneria Civile
Universita` di Firenze
Via Santa Marta 3
I-50139 Firenze
+39()055-4796-431