Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a postfix installation handling mail for a couple of domains, for which all mail goes to one real local user (cmb), and I want to add a new domain (let's call it for a second user, but everything is being delivered to cmb. Here is /etc/postfix/virtual: cmb cmb cmb newperson

Here is most of /etc/postfix/, full file on request. I have not set luser_relay.

myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin =
mydestination =,, nova, localhost.localdomain, localhost
mynetworks_style = host
mailbox_command = procmail -a "$EXTENSION"
virtual_alias_domains   =
virtual_alias_maps      = hash:/etc/postfix/virtual
smtpd_sender_login_maps = hash:/etc/postfix/virtual

Here is /etc/aliases:

# See man 5 aliases for format
postmaster: cmb
root: cmb

Note that aliases.db and virtual.db are both more recent than their plain-text counterparts, and postfix has been restarted to no effect. A test mail to does this in mail.log (I've edited this log extract to make the domain

Aug 30 12:48:59 nova postfix/smtpd[32520]: 795B53D558:[]
Aug 30 12:48:59 nova postfix/cleanup[32530]: 795B53D558: message-id=<>
Aug 30 12:48:59 nova dkim-filter[2074]: 795B53D558 external host attempted to send as
Aug 30 12:48:59 nova dkim-filter[2074]: 795B53D558 ASP query: missing parameter(s) in policy data
Aug 30 12:48:59 nova spamd[2385]: spamd: connection from localhost [] at port 38371 
Aug 30 12:49:00 nova spamd[2385]: spamd: using default config for /srv/ 
Aug 30 12:49:00 nova spamd[2385]: spamd: processing message <> for 
Aug 30 12:49:05 nova spamd[2385]: spamd: clean message (-5.2/5.0) for in 5.3 seconds, 1002 bytes. 
Aug 30 12:49:05 nova spamd[2385]: spamd: result: . -5 - AWL,BAYES_00,LOCALPART_IN_SUBJECT,RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY scantime=5.3,size=1002,,uid=1000,required_score=5.0,rhost=localhost,raddr=,rport=38371,mid=<>,bayes=0.000000,autolearn=ham 
Aug 30 12:49:05 nova postfix/qmgr[32518]: 795B53D558: from=<>, size=966, nrcpt=1 (queue active)
Aug 30 12:49:05 nova postfix/smtpd[32520]: disconnect from[]
Aug 30 12:49:05 nova postfix/local[32533]: 795B53D558: to=<>, orig_to=<>, relay=local, delay=6.1, delays=6.1/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Aug 30 12:49:05 nova postfix/qmgr[32518]: 795B53D558: removed

Notice it being delivered to cmb at the end: I'd really love to know why.

share|improve this question

migrated from Aug 30 '09 at 17:21

This question came from our site for computer enthusiasts and power users.

1 Answer 1

up vote 1 down vote accepted

Robot101 helped me solve this. The trick is that virtual_alias_maps will effectively recurse until the address is unchanged, and unqualified local parts on the right-hand side of the map will be qualified with myorigin, so this happens:  -> ->

I can therefore work around it by changing myorigin to (and fixing my address canonicalisation (using canonical_maps) to use in sender addresses). This way, the mapping is onto, which the map will not alter any further, and which still has this machine as its final destination. Alternatively, I could have fully qualified the mappings with

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.