[Exim] Prohibition message

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Paul Walsh
Fecha:  
A: Exim Users
Asunto: [Exim] Prohibition message
I've been asked by "upstairs" if it's possible, when rejecting mail
on the basis of a failed reverse-DNS lookup, to send a message back
to the originator explaining why the mail has been rejected and
suggesting they contact postmaster@??? even though, as far as
I'm concerned, "failed to find host name from IP address" says it
all. I thought I might be able to do this with prohibition_message
but the results aren't quite what I expected.

Here are the relevant entries in the config file "conf1":

host_lookup = 0.0.0.0/0
sender_verify
host_accept_relay = "*.uce.ac.uk"
sender_reject = "lsearch;/usr/exim/banned_addresses"
host_reject_recipients = "lsearch;/usr/exim/banned_sites"

prohibition_message = "${lookup{$prohibition_reason}lsearch\ 
 {/usr/exim/reject.messages}{$value}}"                


Where reject.messages contains:
host_accept_relay: Attempt to relay from unauthorised host
host_reject_recipients: Attempt to email from blacklisted host
sender_reject: Attempt to send from blacklisted email address
sender_verify: Possible reverse-DNS problem


When I try this out I get the following:

exim -C conf1 -bh 193.60.129.222

**** SMTP testing session as if from host 193.60.129.222
**** Not for real!

>>> host in host_lookup? yes (0.0.0.0/0)
>>> looking up host name for 193.60.129.222
>>> IP address lookup failed
>>> host in host_reject? no (option unset)
>>> host in host_reject_recipients? yes (failed to find host name or
>>> lookup deferred)

LOG: recipients from [193.60.129.222] refused (failed to find host
name from IP address)
>>> host in sender_unqualified_hosts? no (end of list)
>>> host in receiver_unqualified_hosts? no (end of list)
>>> host in helo_verify? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)

LOG: SMTP connection from [193.60.129.222]
220 isis.uce.ac.uk ESMTP Exim 3.10 #1 Mon, 13 Mar 2000 16:01:50 +0000
mail from: root@???
250 <root@???> is syntactically correct
rcpt to: root@???
>>> root@??? in recipients_reject_except? no (end of list)
>>> root@??? in recipients_reject_except_senders? no (option
>>> unset)

550-Attempt to email from blacklisted host    
550 mail from 193.60.129.222 rejected: administrative prohibition
(failed to find host name from IP address)
LOG: recipient <root@???> refused from [193.60.129.222] (failed
to find host name from IP address)


Having studied the Exim Spec I understand _why_ I'm getting the
message "550-Attempt to email from blacklisted host" - because
host_reject_recipients is forcing a reverse lookup which fails, but
would ideally like to generate a different message for those hosts
that aren't in the blacklist but don't have reverse DNS entries. To
this end, would it be possible to have an additional
prohibition_reason of host_lookup ?

Of course this probably won't help when dealing with those sites that
see a 550 message and interpret it as meaning the recipient's mailbox
doesn't exist.



Paul Walsh

Senior Systems Programmer, Information Services,
University of Central England, BIRMINGHAM B42 2SU, UK
Tel: +44 (0)121 331 5708    Fax: +44 (0)121 356 2875