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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Due to, ahem, unknown enthusiasm, we probably have a broken postfix config somewhere, without knowing what actually happened (which is a wtf in itself..): all forwarding of e-mail has stopped (no virtual_alias_maps, and even .forward files have ceased to work). postmap seems to indicate that retrieving is not the problem:

postmap -q "" proxy:mysql:/etc/postfix/

Enabling the general query log, I can even see the (correct) queries coming through looking for a forward destination on the live server. Now, we have several domains, configured with virtual_mailbox_domains & virtual_mailbox_maps(which are working). However, we used to use the virtual_alias_maps to forward mails like to or even something@anothereserver.tld, which is now broken. Those accounts have always had a 'local' config, but now only arrive at their local maildirs with a ``, and according to the logs, postfix does not even try/know to forward them.

sendmail -bv just gives:

<>: delivery via virtual: delivers to maildir

postconf -n, all mysql maps indvidually tested & work, the correct sql queries show in our logs:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no 
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_time_limit = 100s
config_directory = /etc/postfix
daemon_timeout = 180s
default_process_limit = 200
forward_path = /home/vmail/${domain}/${user}/.forward${recipient_delimiter}${extension},/home/vmail/${domain}/${user}/.forward,${home}/.forward${recipient_delimit
helpful_warnings = yes
html_directory = /usr/share/doc/postfix/html
initial_destination_concurrency = 2
ipc_idle = 30s
ipc_timeout = 60s
local_destination_concurrency_limit = 2000
mailbox_command = procmail -a $EXTENSION
mailbox_size_limit = 0
message_size_limit = 33554432
minimal_backoff_time = 60s
mydestination =, localhost, localhost.localdomain,,,
myhostname =
mynetworks =
myorigin = /etc/mailname
propagate_unmatched_extensions = canonical, virtual, alias, forward
queue_run_delay = 180s
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
smtp_data_done_timeout = 60s
smtp_data_init_timeout = 12s
smtp_data_xfer_timeout = 18s
smtp_helo_timeout = 30s
smtp_mail_timeout = 30s
smtp_quit_timeout = 30s
smtp_rcpt_timeout = 30s
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/examplemx-cert.pem
smtp_tls_key_file = /etc/postfix/examplemx-key.pem
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_error_sleep_time = 0
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/blacklist, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/examplemx-cert.pem
smtpd_tls_key_file = /etc/postfix/examplemx-key.pem
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = mysql:/etc/postfix/
unknown_local_recipient_reject_code = 550
virtual_alias_domains = 
virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/
virtual_mailbox_maps = proxy:mysql:/etc/postfix/
virtual_uid_maps = static:5000

One thing of note is the virtual_alias_domains is empty (these are already in virtual_mailbox_domains, and as far as out lousy backups tell us... that's always been the case).

Trying to fix this I created a flat /etc/postfix/virtual file & used postmap, which showed the same symptoms (no error, but no forward), and then I even tried to use those good ol' .forward files in the maildirs, but even those don't seem to work. What are further usual suspects if all forwarding is non-existent, or does anything stand out in the given postconf?

share|improve this question
up vote 0 down vote accepted

Pff, found it, we're using amavis and clamav to scan mails, and due to errors in clamav, amavis had problems delivering, fixing those errors in there, restarting clamav-daemon & amavis, and everything worked again. Moral of the story: make sure what kind of transport is used to deliver the mails to maildirs.

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.