[Exim] custom SMTP reject messages

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Marc MERLIN
Fecha:  
A: exim-users
Asunto: [Exim] custom SMTP reject messages
With sendmail, I used to be able to do this:

# /etc/mail/access
# We can route mail based on sender
#cyberspammer.com        550 We don't accept mail from spammers
#okay.cyberspammer.com        OK
#128.32                RELAY    
#savetrees.com            DISCARD
#36                550 Stanford University? We eat trees for lunch
#FREE.STEALTH.MAILER@        550 Spam not accepted
#
# And on receipient
#
#badlocaluser            550 Mailbox disabled for this username
#host.mydomain.com        550 That host does not accept mail
#user@???    550 Mailbox disabled for this recipient



With exim, I read chapter 46.5 which explains how to send back a specific
error message for each type of rejection, but I haven't found a way of
sending back a custom reject for each host.

For instance, I use the following directives in exim:
sender_reject = partial-lsearch;/etc/mail/checksender/refusesenders
host_reject_recipients = +allow_unknown:/etc/mail/checksender/hostreject

In my lookup tables, right now, I only have one value, and it would be
awesome if the key could actuall be a custom reject message like this

# /etc/mail/checksender/hostreject
# Hosts listed in this file are not allowed to send mail to us. List IP ads only
# (otherwise you'll trigger a DNS request for each connection)
207.38.123.83        "You found it funny to mailbomb us, eh? Go die now"


:-)

I don't think this is yet possible, and the system filter happens too late
to reject the mail during the SMTP transaction.

Is there a way to emulate what I was doing with sendmail, or not currently?

Thanks,
Marc
-- 
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking


Home page: http://marc.merlins.org/ | Finger marc_f@??? for PGP key