Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
08-04-2010, 04:57 AM
#136
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
hmm? so i just added
relayhost=gmail-smtp-msa.l.google.com in
main.cf , restarted postfix and sent a mail.
i got:
Code:
Aug 4 03:01:03 ubuntu postfix/error[3974]: BDBD841469: to=<xanios@server.com>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
main.cf :
Code:
xanios@ubuntu:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
disable_dns_lookups = yes
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = smtp.gmail.com, $myhostname, $mydomain, localhost.localdomain, localhost
myhostname = ubuntu
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = gmail-smtp-msa.l.google.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
xanios@ubuntu:~$
Last edited by Xanios; 08-04-2010 at 05:00 AM .
08-04-2010, 05:11 AM
#137
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
Just a minute. Your password hash file is sasl_passwd. Are you sure about it? Or there were typo mistakes in the previous posts? And you need to have noplaintext option in tls_security_options as well.
08-04-2010, 05:16 AM
#138
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
i have set accordingly and still got this:
Code:
xanios@ubuntu:~$ tail -n 20 /var/log/mail.log
Aug 4 03:11:03 ubuntu postfix/error[4101]: 1A13D40CF8: to=<xanios@gmail.com>, relay=none, delay=8033, delays=8012/21/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
Aug 4 03:11:03 ubuntu postfix/smtp[4092]: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused
Aug 4 03:11:03 ubuntu postfix/smtp[4093]: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused
Aug 4 03:11:03 ubuntu postfix/error[4101]: BDBD841469: to=<xanios@server.com>, relay=none, delay=600, delays=579/21/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
Aug 4 03:11:03 ubuntu postfix/smtp[4092]: 2568B40CFA: to=<xanios@gmail.com>, relay=none, delay=8033, delays=8012/0.08/21/0, dsn=4.4.1, status=deferred (connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
Aug 4 03:11:03 ubuntu postfix/error[4100]: 10CEA40D02: to=<xanios@gmail.com>, relay=none, delay=7923, delays=7902/21/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
Aug 4 03:11:03 ubuntu postfix/smtp[4093]: 3E14540CEF: to=<xanios@gmail.com>, relay=none, delay=8073, delays=8052/0.08/21/0, dsn=4.4.1, status=deferred (connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
Aug 4 03:15:22 ubuntu postfix/master[3945]: terminating on signal 15
Aug 4 03:15:23 ubuntu postfix/master[4264]: daemon started -- version 2.6.5, configuration /etc/postfix
Aug 4 03:15:33 ubuntu postfix/pickup[4268]: 58E024146B: uid=1000 from=<xanios>
Aug 4 03:15:33 ubuntu postfix/cleanup[4273]: 58E024146B: message-id=<20100804101533.58E024146B@ubuntu>
Aug 4 03:15:33 ubuntu postfix/qmgr[4269]: 58E024146B: from=<xanios@server.com>, size=285, nrcpt=1 (queue active)
Aug 4 03:15:33 ubuntu postfix/smtp[4275]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd
Aug 4 03:15:54 ubuntu postfix/smtp[4275]: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused
Aug 4 03:15:54 ubuntu postfix/smtp[4275]: 58E024146B: to=<xanios@gmail.com>, relay=none, delay=21, delays=0.04/0.04/21/0, dsn=4.4.1, status=deferred (connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
Aug 4 03:15:54 ubuntu postfix/cleanup[4273]: 6009F4146D: message-id=<20100804101554.6009F4146D@ubuntu>
Aug 4 03:15:54 ubuntu postfix/bounce[4282]: 58E024146B: sender delivery status notification: 6009F4146D
Aug 4 03:15:54 ubuntu postfix/qmgr[4269]: 6009F4146D: from=<>, size=1772, nrcpt=1 (queue active)
Aug 4 03:16:15 ubuntu postfix/smtp[4275]: connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused
Aug 4 03:16:15 ubuntu postfix/smtp[4275]: 6009F4146D: to=<xanios@server.com>, relay=none, delay=21, delays=0.01/0/21/0, dsn=4.4.1, status=deferred (connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25: Connection refused)
here's my main.cf:
Code:
xanios@ubuntu:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
disable_dns_lookups = yes
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = smtp.gmail.com, $myhostname, $mydomain, localhost.localdomain, localhost
myhostname = ubuntu
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = gmail-smtp-msa.l.google.com
smtp_cname_overrides_servername = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
08-04-2010, 05:46 AM
#139
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
Code:
smtp_sasl_tls_security_options = noanonymous
You have not changed this. And look at the link that I have given previously. Just sending mails using external SMTP relay is not too difficult. You just need to know what you are doing. Thats it. Read the link from top to bottom and you will get what you need to do.
08-04-2010, 09:26 AM
#140
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
Sorry i missed out the link given earlier.
I amended, and now seems that i'm getting closer to making the postfix works:
Code:
xanios@ubuntu:~$ tail -n 20 /var/log/mail.log
Aug 4 07:20:26 ubuntu postfix/master[2784]: terminating on signal 15
Aug 4 07:20:27 ubuntu postfix/master[2941]: daemon started -- version 2.6.5, configuration /etc/postfix
Aug 4 07:20:34 ubuntu postfix/pickup[2945]: 1F452419CC: uid=1000 from=<xanios>
Aug 4 07:20:34 ubuntu postfix/cleanup[2950]: 1F452419CC: message-id=<20100804142034.1F452419CC@ubuntu>
Aug 4 07:20:34 ubuntu postfix/qmgr[2946]: 1F452419CC: from=<xanios@server.com>, size=285, nrcpt=1 (queue active)
Aug 4 07:20:35 ubuntu postfix/smtp[2952]: certificate verification failed for gmail-smtp-msa.l.google.com[74.125.127.109]:25: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Aug 4 07:20:36 ubuntu postfix/smtp[2952]: 1F452419CC: to=<xanios@gmail.com>, relay=gmail-smtp-msa.l.google.com[74.125.127.109]:25, delay=2, delays=0.13/0.09/1.5/0.2, dsn=5.5.1, status=bounced (host gmail-smtp-msa.l.google.com[74.125.127.109] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 t11sm10636078wfc.16 (in reply to MAIL FROM command))
Aug 4 07:20:36 ubuntu postfix/cleanup[2950]: 6926C419CE: message-id=<20100804142036.6926C419CE@ubuntu>
Aug 4 07:20:36 ubuntu postfix/qmgr[2946]: 6926C419CE: from=<>, size=2291, nrcpt=1 (queue active)
Aug 4 07:20:36 ubuntu postfix/bounce[2954]: 1F452419CC: sender non-delivery notification: 6926C419CE
Aug 4 07:20:36 ubuntu postfix/cleanup[2950]: 73C11419C1: message-id=<20100804142036.73C11419C1@ubuntu>
Aug 4 07:20:36 ubuntu postfix/bounce[2955]: 1F452419CC: sender delivery status notification: 73C11419C1
Aug 4 07:20:36 ubuntu postfix/qmgr[2946]: 1F452419CC: removed
Aug 4 07:20:36 ubuntu postfix/qmgr[2946]: 73C11419C1: from=<>, size=2135, nrcpt=1 (queue active)
Aug 4 07:20:37 ubuntu postfix/smtp[2952]: certificate verification failed for gmail-smtp-msa.l.google.com[74.125.127.109]:25: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Aug 4 07:20:37 ubuntu postfix/smtp[2956]: certificate verification failed for gmail-smtp-msa.l.google.com[74.125.127.109]:25: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Aug 4 07:20:38 ubuntu postfix/smtp[2956]: 73C11419C1: to=<layleng@server.com>, relay=gmail-smtp-msa.l.google.com[74.125.127.109]:25, delay=1.8, delays=0.01/0.03/1.6/0.2, dsn=5.5.1, status=bounced (host gmail-smtp-msa.l.google.com[74.125.127.109] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 d39sm15957609wam.16 (in reply to MAIL FROM command))
Aug 4 07:20:38 ubuntu postfix/smtp[2952]: 6926C419CE: to=<layleng@server.com>, relay=gmail-smtp-msa.l.google.com[74.125.127.109]:25, delay=1.8, delays=0.04/0/1.6/0.2, dsn=5.5.1, status=bounced (host gmail-smtp-msa.l.google.com[74.125.127.109] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 d35sm15958351waa.9 (in reply to MAIL FROM command))
Aug 4 07:20:38 ubuntu postfix/qmgr[2946]: 73C11419C1: removed
Aug 4 07:20:38 ubuntu postfix/qmgr[2946]: 6926C419CE: removed
Authentication Required. The email address and password i entered in sasl_passwd are correct. What caused this? :S
EDITED:
i tried this:
Code:
xanios@ubuntu:~$ postmap -q mailrelay.example.com /etc/postfix/sasl_passwd
postmap: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd
xanios@ubuntu:~$
I guess it is because of the above problem that caused them to give me 'Authentication Required'. But how to resolve it x_x
Last edited by Xanios; 08-04-2010 at 09:57 AM .
08-04-2010, 08:51 PM
#141
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
x_x
it's crazy lol.
yesterday when i tried at home, i could still ping to google.com, now can't ):
in
resolv.conf , i've changed to
google.com and
8.8.8.8 respectively, still can't.
everything i have followed, it now gave me back the same error:
Code:
Aug 4 18:51:41 ubuntu postfix/smtp[2929]: 0E8E440A57: to=<xanios@gmail.com>, relay=none, delay=1000, delays=980/0.03/20/0, dsn=4.3.5, status=deferred (unable to look up host gmail-smtp-msa.l.google.com: No address associated with hostname)
T_T
08-04-2010, 10:03 PM
#142
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
UPDATE:
now i can ping to google.com.. after restarting my computer and using my backup copy.
the ping finally works....
i wonder whats wrong with linux.. or is it my school's network..
anyways,
still got the same error:
Code:
Aug 4 19:56:22 ubuntu postfix/error[3361]: D78BD419D7: to=<xanios@server.com>, relay=none, delay=0.05, delays=0.04/0.01/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host gmail-smtp-msa.l.google.com: No address associated with hostname)
no address associated with hostname..i have set what needs to be set still i got this.
nothing to say .
08-04-2010, 10:24 PM
#143
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
back to connection refused error lol x.x
Code:
Aug 4 20:25:38 ubuntu postfix/smtp[3114]: E305C419E0: to=<xanios@server.com>, relay=none, delay=21, delays=0.01/0/21/0, dsn=4.4.1, status=deferred (connect to gmail-smtp-msa.l.google.com[72.14.213.109]:25 : Connection refused)
@ that bolded 25, is that supposed to be 25? i thought we are connecting to 587..
08-05-2010, 12:03 AM
#144
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
It should be 587. Google I guess uses 587 port for SMTP. You need to read the link I have posted and try accordingly first.
08-05-2010, 12:41 AM
#145
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
i read the link, but there didn't really specify how to change it to 587 instead of 25.
But i changed this:
Code:
relayhost = gmail-smtp-msa.l.google.com:587
and i still got connection refused:
Code:
Aug 4 22:43:40 ubuntu postfix/smtp[4861]: 2517340A63: to=<xanios@server.com>, relay=none, delay=21, delays=0.01/0/21/0, dsn=4.4.1, status=deferred (connect to gmail-smtp-msa.l.google.com[74.125.127.109]:587: Connection refused)
It has changed from 25 to 587, but the error still remains.
08-05-2010, 12:45 AM
#146
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
This does mean that your sasl_passwd file has something to do with it. Delete the file and then as a root user run
echo smtp.gmail.com
user@gmail.com assword > /etc/postfix/sasl_passwd
postmap hash:/etc/postfix/sasl_passwd
08-05-2010, 12:53 AM
#147
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Just want to confirm:
to delete the sasl_passwd file,
Code:
rm -r /etc/postfix/sasl_passwd
am i right? i scare i use wrong command and delete wrongly
08-05-2010, 12:56 AM
#148
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
Yes that is correct. You need to be root. So either login as root on terminal or use sudo.
08-05-2010, 12:59 AM
#149
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
i got :
Code:
xanios@ubuntu:~$ sudo echo smtp.gmail.com user@gmail.com:password > /etc/postfix/sasl_passwd
bash: /etc/postfix/sasl_passwd: Permission denied
layleng@ubuntu:~$
they don't let me create sasl_passwd
08-05-2010, 01:01 AM
#150
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hmm, when i was trying to delete the file:
Code:
xanios@ubuntu:~$ rm -r /etc/postfix/sasl_passwd
rm: remove write-protected regular file `/etc/postfix/sasl_passwd'? [i pressed 'enter' here]
in my previous sasl_passwd file, the password is my REAL password for gmail account. that should be okay right? or should i just put 'password' instead?
All times are GMT -5. The time now is 11:57 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News