Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

I have created virtual hosts for 3 domains following this serverfault.com 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 mail-gy0-f176.google.com[209.85.160.176]: 554 5.7.1 <support@example.com>: Relay access denied; from=<testacct@gmail.com> to=<support@example.com> proto=ESMTP helo=<mail-gy0-f176.google.com>

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 55.55.55.55 for privacy)

May 24 13:40:54 uc6 postfix/smtpd[29311]: NOQUEUE: reject: RCPT from 123-204-7-37.dynamic.seed.net.tw[123.204.7.37]: 554 5.7.1 <sseenndd0101@yahoo.com.hk>: Relay access denied; from=<h6koo9b46u@yahoo.com.tw> to=<sseenndd0101@yahoo.com.hk> proto=SMTP helo=<55.55.55.55>
share|improve this question
1  
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
1  
did you check the logs in /var/log/mail.log, /var/log/user.log, /var/log/mail.info, /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

1 Answer 1

up vote 1 down vote accepted

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

/etc/postfix/main.cf

And add in this line...

virtual_alias_domains = example1.com example2.com

...where exampel1.com and example2.com 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: http://www.postfix.org/VIRTUAL_README.html (search for "relay access denied")

share|improve this answer

Your Answer

 
discard

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.