[RFCI-Discuss] refusing mail to abuse@ if not the only recipient
Tim Jackson
lists at timj.co.uk
Tue Dec 1 15:31:01 GMT 2009
On 20/11/09 17:36, Matus UHLAR - fantomas wrote:
> Which mailers support this technique and how?
Exim does (via it's configurable access control) and I've been doing it for a
long time - a simplified version of the logic I use is as follows (this is in
the ACL which runs for each SMTP RCPT command, so the logic should hopefully
be reasonably readable and applicable to other environments):
...
# set variable m0 to 1 if a non-abuse@ recipient has been seen
# importantly, the m0 variable persists across all SMTP RCPT commands within
# a single transaction
warn local_parts = !abuse
# this means "if m0 is not 2"
condition = ${if !={$acl_m0}{2}}
set acl_m0 = 1
# set variable m0 to 2 if an abuse@ recipient has been seen
warn local_parts = abuse
condition = ${if !={$acl_m0}{1}}
set acl_m0 = 2
# send 4xx if an abuse@ recipient is seen and we have seen a non-abuse one
# in this transaction
defer message = Please try again later
local_parts = abuse
condition = ${if ={$acl_m0}{1}}
# send 4xx if an non-abuse@ recipient is seen and we have seen an abuse one
# in this transaction
defer message = Please try again later
local_parts = !abuse
condition = ${if ={$acl_m0}{2}}
...
If anyone wants to take this further with Exim, the exim-users list is
probably a better place than here to get help.
Tim
More information about the RFCI-Discuss
mailing list