[exim] virtual aliases

Pàgina inicial
Delete this message
Reply to this message
Autor: Robin Becker
Data:  
A: exim-users
Assumpte: [exim] virtual aliases
I'm running ubuntu 12.04 with

$ exim4 --version
Exim version 4.76 #1 built 28-Dec-2012 16:45:26
Copyright (c) University of Cambridge, 1995 - 2007
Berkeley DB: Berkeley DB 5.1.25: (January 28, 2011)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DKIM
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /var/lib/exim4/config.autogenerated


I am trying to use the scheme proposed here

http://n3mesisfixx.blogspot.co.uk/2013/07/configuring-exim4-to-route-to-many.html

to allow mail for bbb.domain.com to be sent to aaa.domain.com and routed to a
local user on aaa.domain.com.

I created

/etc/exim4/domains.virtual
#######################
bbb.domain.com
aaa.domain.com
#######################

and /etc/exim4/aliases.virtual
#######################
@bbb.domain.com:userbbb
@aaa.domain.com:useraaa
#######################

defined /etc/exim4/conf.d/router//350_exim4-config_vdom_aliases
#######################
#---------------------------
# This router is added so that we can use this server for multiple domains
# And also be able to define custom aliases for each of these domains...
# NOTE : this router is placed before the system_aliases router so that
# virtual domain routing takes precedence over system_aliases
#----------------------------

#allows for aliases of the sort==>
#alias@??? : local_user, other@???

domains_virtual:
         driver = redirect
         data = ${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases.virtual}}


#allows for a special catch-all alias of the sort==>
# @host.com : local_user, other@???
domains_virtual_others:
         driver = redirect
         data = ${lookup{@$domain}lsearch{/etc/exim4/aliases.virtual}}
#######################


and edited my update-exim4.conf.conf
#######################
dc_eximconfig_configtype='internet'
dc_other_hostnames='/etc/exim4/domains.virtual'
dc_local_interfaces=''
dc_readhost='aaa.domain.com'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
#######################

updated the config with
# update-exim4.conf
restarted the service
# service exim4 restart
* Stopping MTA for restart ... [ OK ]
* Restarting MTA

but my aliases aren't working mail for userbbb@??? is routed to useraaa

# exim4 -bt userbbb@???
R: system_aliases for useraaa@???
R: userforward for useraaa@???
R: procmail for useraaa@???
R: maildrop for useraaa@???
R: lowuid_aliases for useraaa@??? (UID 1000)
R: local_user for useraaa@???
useraaa@???
     <-- useraaa@???
     <-- userbbb@???
     <-- userbbb@???
   router = local_user, transport = mail_spool




any ideas why this is failing? Do I need to get rid of my local aliases? I have
checked file /var/lib/exim4/config.autogenerated and it seems to contain all the
bits.
--
Robin Becker