Postfix Backend

This is postfix on the backend imap mail servers. It handles final delivery to user’s maildirs.

codetitle. /etc/postfix/

myhostname =
alias_maps = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =, localhost
mynetworks =,

virtual_destination_concurrency_limit = 1
virtual_mailbox_domains =
virtual_transport = maildrop
virtual_mailbox_maps =
virtual_alias_maps =

transport_maps = mysql:/etc/postfix/maps/

codetitle. /etc/postfix/maps/

hosts           =
dbname          = nest
user            = nest_mail
password        = xxxxxxxx
query = SELECT storage_ip
   FROM mailboxes
   WHERE address = '%s' AND storage_host != ''
result_format  =  smtp:[%s]

codetitle. /etc/postfix/

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=mail argv=/usr/bin/maildrop -d ${recipient}


the transport map works like this: if the mailbox for the user DOESN’T have a mailbox on this server, then we return the appropriate transport. If the mailbox is on this server, we return nothing, which allows the message to be delivered locally.

the virtual stuff just passes on mail for directly to maildrop. aliases should have all be resolved already.