[Exim] Sender callout verification for non-smtp routers

Top Page
Delete this message
Reply to this message
Author: I. Forbes
Date:  
To: exim-users
Old-Topics: Re: [Exim] lookup question
Subject: [Exim] Sender callout verification for non-smtp routers
Hello All

I struck a snag with my exim4 configuration. I am trying to setup
sender verification with callout.

My problem is my server handles a number of domains which get
delivered by UUCP to dial-up servers. The problem is when the sender
address belongs to one of these domains.

I have the following in a UUCP router

uucp_routing_rmail:
driver = manualroute
domains = ! +local_domains
route_data = ${lookup{$domain}lsearch*{/etc/exim4/uucp_rmail}}
transport = uucp_rmail

the file uucp_rmail contains a list of domains and uucp hosts in the
format:

domain.com:    uucphost


The uucp_rmail transport looks like this

uucp_rmail:
driver = pipe
batch_id = $domain
batch_max = 100
command = "\
/usr/bin/uux --stdin --nouucico --requestor \
'${if eq {$sender_address} {} {mailer-daemon}{$sender_address}}' \
$host!rmail $pipe_addresses"
envelope_to_add
no_retry_use_local_part
return_fail_output
user = nobody

This delivers mail without a problem (although I must check how
batching behaves since the upgrade to Exim4).

My acl_smtp_rcpt has a section:

# If we got this far verify sender address with callout.
deny !verify = sender/callout

However when I run exim4 -bhc 123.123.123.123

EHLO test
MAIL FROM: user@???
RCPT TO: valid@???

The sender verification defers with a message:

"Cannot do callout: neither router nor transport provided a host
list"

I tried "fixing" this by adding a condition:

# If we got this far verify sender address with callout.
deny !condition = ${if
>{${strlen:${lookup{$sender_address_domain}lsearch*{

/etc/exim4/uucp_rmail}}}}{1}{1}{0}}
    !verify = sender/callout


(Mind the line wrapping. It took lots of coffee, late night head
scratching, and a some sleep before I got that one right - I am sure
there is a more efficient and elegant way of doing that).

This helps, but does not actually solve my problem. The trouble is
some of the uucp addresses are generated from alias expansions eg:

user1@??? expands to user1@???

and user2 who shares the same domain but works on a different site

user2@??? expands to user2@???

The verification fails because the sender domain is "domain.com" and
the uucp file has entries for "uucp1.domain.com" and
"uucp2.domain.com". The expansion could even be

user2@??? expands to user2@???

I think I am approaching this the wrong way. Does Exim have some
other mechanism for handling this situation?

Thanks

Ian


--
Ian Forbes ZSD
http://www.zsd.co.za
Office: +27 21 683-1388 Fax: +27 21 674-1106
Snail Mail: P.O. Box 46827, Glosderry, 7702, South Africa