LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-04-2010, 05:57 AM   #136
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30

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 06:00 AM.
 
Old 08-04-2010, 06:11 AM   #137
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 08-04-2010, 06:16 AM   #138
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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
 
Old 08-04-2010, 06:46 AM   #139
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 08-04-2010, 10:26 AM   #140
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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 10:57 AM.
 
Old 08-04-2010, 09:51 PM   #141
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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
 
Old 08-04-2010, 11:03 PM   #142
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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 .
 
Old 08-04-2010, 11:24 PM   #143
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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..
 
Old 08-05-2010, 01:03 AM   #144
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 08-05-2010, 01:41 AM   #145
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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.
 
Old 08-05-2010, 01:45 AM   #146
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.comassword > /etc/postfix/sasl_passwd
postmap hash:/etc/postfix/sasl_passwd
 
Old 08-05-2010, 01:53 AM   #147
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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
 
Old 08-05-2010, 01:56 AM   #148
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Yes that is correct. You need to be root. So either login as root on terminal or use sudo.
 
Old 08-05-2010, 01:59 AM   #149
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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
 
Old 08-05-2010, 02:01 AM   #150
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Migration Assistant In Ubuntu 9.04 LXer Syndicated Linux News 0 01-08-2009 02:40 PM
not throws evolution setup assistant dissident_goodchild Linux - Software 0 11-16-2007 10:00 PM
Evolution pppoe setup in Ubuntu won't work with dsl Thane Ubuntu 1 08-16-2006 02:11 PM
evolution mail setup hariiyer Linux - Networking 1 03-03-2006 08:41 AM
Evolution - problems after first setup jburford Linux - Software 2 09-08-2002 05:14 PM


All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration