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

I have set-up postfix on Debian 6 and I would like to forward emails to my gmail account. This is my /etc/postfix/ file:

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =, localhost
relayhost =
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

# configure for virtual hosting
virtual_alias_domains =
virtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = mail/

In my /etc/postfix/virtual file I have:

But when I send an email from hotmail to I get the following error:

Final-Recipient: rfc822;
Action: failed
Status: 5.7.1
Diagnostic-Code: smtp;554 5.7.1 < Relay access denied

and /var/log/mail.log says:

postfix/smtpd[31752]: connect from[]
postfix/smtpd[31752]: NOQUEUE: reject: RCPT from[]: 554 5.7.1 <>: Relay access denied; from=<> to=<> proto=ESMTP helo=<>
postfix/smtpd[31752]: disconnect from[]

Do I need to be doing something with SMTP authentication?

Fixed. In the /etc/postfix/ file I had:

mydestination =, localhost

replacing with the following got it working:

mydestination =, localhost
share|improve this question
I should have been less obtuse in my original question. As my problem was with mydestination param and I just wrote mydestination. In my file I had and it should have been –  xylar Aug 16 '11 at 8:33

2 Answers 2 is in mydestination. Why don't you add to /etc/aliases:


Don't forget to run newaliases after updating aliases file.

share|improve this answer
That is the simplest option, and as long as the rest of the postfix config is working to handle mail sent to your domain it will do the trick. –  dunxd Jan 25 '13 at 9:37

I do not see the "virtual_alias_domains" parameter in your /etc/postfix/ file. Try adding that in:

virtual_alias_domains =

Also, make sure you run the following command:

postmap /etc/postfix/virtual

service postfix reload

share|improve this answer
Tried adding it and reloading but still getting the same error –  xylar Aug 16 '11 at 7:26
Edit your question and show the virtual_alias_domains –  mailq Aug 16 '11 at 8:17

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.