I am unable to get forwarding to work. Here's my postconf output:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_verp_delimiters = +=
disable_verp_bounces = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = jubero.com
myhostname = h2.jubero.com
mynetworks =,
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_domains = 
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions =      permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
unknown_local_recipient_reject_code = 550
verp_delimiter_filter = -=+
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-     maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot

When I send an email to [email protected], it is bounced:

postfix/pipe[7039]: 013309E0C8: to=<[email protected]>, relay=dovecot, delay=1, delays=0.92/0/0/0.08, dsn=5.1.1, status=bounced (user unknown)

However, when I query postmap, the forwarding email is printed:

postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-alias-maps.cf
[email protected]

Delivering to virtual users work just fine. Only forwarding is not working.

How can I correct this?

  • The log message says dovecot bounced the message, you need to make sure that dovecot knows who the users are as well, or it will not know where to store the mail, and bounce the message.
    – NickW
    Mar 13, 2013 at 9:29
  • NickW, storing the email is not required. It just needs to be forwarded to another email.
    – Sudheer
    Mar 13, 2013 at 10:19
  • You see the line to=<[email protected]>, relay=dovecot relay dovecot means that the server thinks the destination is local storage, which is why it passed it to the MDA (dovecot).
    – NickW
    Mar 13, 2013 at 10:26
  • From what I understand, the forwarding is done by Postfix and not Dovecot. Correct me if I am wrong. If that is the case, how can I tell Postfix not to send to MDA but to the forward destination?
    – Sudheer
    Mar 13, 2013 at 10:29
  • Try adding the smtpd_relay_restrictions line..
    – NickW
    Mar 13, 2013 at 11:00

2 Answers 2


I fixed this by removing:


The option was originally added to avoid double delivery of emails that went through the SPAM filter. It was making forwarding impossible.

  • Cool, never seen that option used before, I'll read up on it.
    – NickW
    Mar 14, 2013 at 12:06

You need to tell postfix what methods are valid for people who want to relay through your server. A line like this will go a long way towards resolving your problems.

 smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

Read more here

  • I tried adding that line and there were no changes. Perhaps, I have to clarify the situation. I have setup a MySQL table, virtual_aliases. In that MySQL table, I have the source and destination email columns. In the configuration, I have virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf. I am expecting Postfix to read this configuration file and send the forward. Not sure where exactly it is failing.
    – Sudheer
    Mar 13, 2013 at 12:21
  • Ah, so you're providing local user to remote user mapping? You probably need to add a virtual_alias_domains map, the virtual_mailbox_domains file is for local virtual domains only, unless you then change the transport in transport maps.
    – NickW
    Mar 13, 2013 at 12:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .