[exim] 1 redirect router and 3 transports

Top Page
Delete this message
Reply to this message
Author: Wallace Tan
Date:  
To: exim users
Subject: [exim] 1 redirect router and 3 transports
Dear all,

I am trying to setup 1 redirect router to 3 different transports.
I have read the exim-4.63 documentation, spec.txt
However, I do not fully understand the redirect router's "data" option.

I can get the redirect router to use "remote_smtp" transport
But how do I use the redirect router's "data" for "db_aliases_user" and "db_aliases_user_mailbox" transport?


# Sample exim.conf file
#
# DB table: aliases
# +----------------------------+---------------------+
# | alias                      | deliver_to          |
# +----------------------------+---------------------+
# | localuser@???      | localuser           |
# | localuser.sent@??? | localuser/Sent      |
# | localuser.sent@??? | otheruser@??? |
# +----------------------------+---------------------+


DB_LOCAL_DOMAINS = SELECT SUBSTRING_INDEX(alias, '@', -1) AS domain FROM aliases WHERE alias LIKE '%@${quote_mysql:$domain}' LIMIT 1
DB_ALIASES = SELECT deliver_to FROM aliases WHERE alias='${quote_mysql:$local_part}@${quote_mysql:$domain}'

domainlist local_domains = ${lookup mysql{DB_LOCAL_DOMAINS}}

begin routers

dnslookup:
driver = dnslookup
domains = !+local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

db_aliases_forward:
driver = redirect
data = ${lookup mysql{DB_ALIASES}}


begin transports

# transport for "otheruser@???"
remote_smtp:
driver = smtp

# transport for "localuser"
db_aliases_user:
driver = pipe
command = /usr/local/sbin/dbmail-smtp -u localuser
return_fail_output

# transport for "localuser/Sent"
db_aliases_user_mailbox:
driver = pipe
command = /usr/local/sbin/dbmail-smtp -u localuser -M Sent
return_fail_output

--
Regards,
Wallace Tan