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

I want to all mails form my server to be relay through my private google email account. But all email are bounced and the return mail stands:

I got info: <test.user@domain.com>: host smtp.gmail.com[173.194.69.109]
said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1
support.google.com/mail/bin/answer.py?answer=14257 fc7sm2465531bkc.3 - gsmtp
(in reply to MAIL FROM command) - so in such configuration MAIL FROM must be
included in relay definition. How can I do it?

How and in which file i have to add line to define MAIL FROM parameter.

Below my main.cf file

readme_directory = /usr/share/doc/postfix/README_FILES
html_directory = /usr/share/doc/postfix/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix

# listen on localhost only
inet_interfaces = 127.0.0.1
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
mynetworks = 192.168.0.0/24

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

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

relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

And how to make port 25 (at this moment nmap show it is not open) be active to receive mail from my local network?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

inet_interfaces = 127.0.0.1 says to only listen on localhost. Change that as appropriate to get it listening on port 25.

I'm going to guess that /etc/postfix/sasl_passwd isn't quite right, but I'll need to see the contents to be sure. Make sure to mask out your real password! :)

share|improve this answer
    
Hmmm. My /etc/postfix/sasl_passwd file contains --> [smtp.google.com]:587 my_account@gmail.com:maypass and it looks to be good. Whats wrong? I done postmap sasl_passwd as necessary. –  mackowiakp Jul 18 '13 at 6:07
    
I think that the problem is in "MAIL FROM command". But maybe I am wrong.. –  mackowiakp Jul 18 '13 at 7:02
    
"smtp.gmail.com" and "smtp.google.com" aren't the same, so it won't match anything from your smtp_sasl_password_maps. –  Bill Weiss Jul 18 '13 at 15:56
    
Oh s*&^*t ! In /etc/postfix/sasl_passwd was [smtp.google.com]:587 instead [smtp.gmail.com]:587. Sometimes is terribly difficult to find out such simple error. THX! WORKS! –  mackowiakp Jul 18 '13 at 17:17
    
Great! Mind marking my answer as accepted, so others can see what worked for you? –  Bill Weiss Jul 18 '13 at 18:59

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.