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

I'm running Ubuntu Server 9.10 with Postfix and Webmin.

I have created virtual hosts for 3 domains following this answer.

But the mail isn't relaying out to the world. I have 3 domains tied into my DNS in webmin, as well as inside DNS clicked Mail Server and followed that instruction using this article on the web.

The domains and the web servers work just fine. I also have FTP working just fine. So, the remaining problem I have is mail. Can't forward mail out to a Gmail account for some reason. Note I'm just trying to do the "easy version" of Postfix config and if your answer is in Webmin-ease, that would help me. However, I can edit a text file if you suggest.

I was asked to include some /var/log/mail.log stuff, so here it is:

May 24 16:43:26 uc6 postfix/smtpd[432]: NOQUEUE: reject: RCPT from[]: 554 5.7.1 <>: Relay access denied; from=<> to=<> proto=ESMTP helo=<>

Also, looks like I'm getting hit by random port scanners trying to look for open relays:

(note I changed my IP address below to for privacy)

May 24 13:40:54 uc6 postfix/smtpd[29311]: NOQUEUE: reject: RCPT from[]: 554 5.7.1 <>: Relay access denied; from=<> to=<> proto=SMTP helo=<>
share|improve this question
To start with, why not post your maillog so we can see what kind of error you get when you try to relay a mail to google. – pehrs May 24 '10 at 23:21
did you check the logs in /var/log/mail.log, /var/log/user.log, /var/log/, /var/log/mail.warn, /var/log/mail.err ? easy to see them all, egrep -r '(mail|postfix):' /var/log – risyasin May 24 '10 at 23:22
Okay, edited my original post, so look at that. – ServerChecker May 24 '10 at 23:35
Note on the mail spam issue, I installed Postgrey as well as installed recommended Postfix tweaks, and the spam went away. But that's another thing for me to post separately. – ServerChecker May 26 '10 at 2:50
up vote 1 down vote accepted

Found it. After setting up mail aliases in Webmin's Postfix module, I had to edit:


And add in this line...

virtual_alias_domains =

...where and are 2 domains I want to forward mail on...

...added above this line...

virtual_alias_maps = hash:/etc/postfix/virtual

I then had to run these commands:

postmap /etc/postfix/virtual
postfix reload

It then worked after that.

SOURCE: (search for "relay access denied")

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.