Hi all,
I am trying to figure out how to limit recipient verify callouts to only
take place over a certain transport. I am having a bit of trouble
working out the logic I need to use for the config I am writing.
Basic setup is an exim box doing virtual domains with a cyrus mailstore
(also configured for virtual domains). In addition, each domain has a
virtual aliases file which provides for addresses which are not local
mailboxes, and can redirect either to a local mailbox or a remote smtp
address.
I thought I can verify the existence of a local cyrus mailstore by doing
an LMTP callout to cyrus to check if it will accept delivery for a
mailbox - if not, then check the virtual aliases files for a redirect.
However I do not want the recipient callout to take place if the
redirect forwards to an external address - just regular recipient
verification, i.e. check if the domain exists and has appropriate DNS
records etc.
Ideally if I could only do callouts over the LMTP transport and not over
the SMTP transport that would work, but there doesn't appear to be
options for this and I can't figure out how else to do this.
Any suggestions would be appreciated :)
Current exim logic (sorry I don't have a full config yet as I am trying
to get my head around the required logic while writing the config!):
Main domain lists:
domainlist local_domains = @ : localhost
domainlist virtual_domains = dsearch;/etc/exim4/virtual
domainlist incoming_domains = +local_domains : +virtual_domains
rcpt acl:
deny
domains = +incoming_domains
message = Invalid Recipient
!verify = recipient/callout=defer_ok,5s
begin routers:
dnslookup:
driver = dnslookup
domains = ! +incoming_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
virtual_cyrus_mailbox:
driver = accept
domains = +virtual_domains
transport = cyrus_lmtp
retry_use_local_part
virtual_aliases:
driver = redirect
domains = +virtual_domains
data =
${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual/$domain}}}
retry_use_local_part
begin transports:
remote_smtp:
driver = smtp
cyrus_lmtp:
driver = smtp
protocol = lmtp
hosts = localhost
allow_localhost
Cheers,
Colin