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.
08-03-2010, 05:21 AM
#76
Guru
Registered: May 2009
Location: Barcelona, Spain
Distribution: LMDE + Linux 3.2.0-1.dmz.6-amd64, RHEL5+6, Mulltiple testing
Posts: 6,188
Quote:
Originally Posted by
Xanios
Add on: OK, so since in
main.cf it is written as "
/etc/postfix/sasl_passwd ",
i "
sudo vi /etc/postfix/sasl_passwd " first,
after that, i add inside
/etc/postfix/sasl_passwd with this:
Code:
[smtp.gmail.com]:587 xanios@gmail.com:p@55w0rd
Is that what you mean? Hope i didn't misunderstand what you're saying
That's also a way to do it. Don't forget to re-run the postmap command on it and restart postfix. Then test again.
Kind regards,
Eric
08-03-2010, 05:23 AM
#77
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Lucid, Ubuntu Server 9.10/10.04, CentOS 5.5 Final
Posts: 4,331
Rep:
I am still confused as to what are you trying to achieve? Are you trying to send mail to your gmail account or trying to use gmail SMTP server as relay to send mails. To send mails externally on internet requires a valid MX record for your domain that other domain SMTP servers can verify.
Here you are storing hash password for your gmail account and I do not understand why do you need it. Are you using gmail SMTP as a relay to send emails?
08-03-2010, 05:24 AM
#78
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
Code:
xanios@ubuntu:~$ ls -al | grep sasl
-rw-r--r-- 1 root root 62 2010-08-03 02:09 sasl_passwd
-rw-r--r-- 1 xanios xanios 12288 2010-08-03 00:38 sasl_passwd.db
I've moved it to the correct directory and changed the owner for the sasl_passwd file
08-03-2010, 05:28 AM
#79
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
Here's the last 20 lines of the output for log mail after sending the email.
Code:
xanios@ubuntu:~$ sudo postmap /etc/postfix/sasl_passwd
[sudo] password for xanios:
xaniosg@ubuntu:~$ sudo /etc/init.d/postfix restart
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]
xaniosg@ubuntu:~$ mail -s "test mail" -v xanios@gmail.com
test123
Cc:
Mail Delivery Status Report will be mailed to <layleng>.
xanios@ubuntu:~$ tail -n 20 /var/log/mail.log
Aug 3 02:31:00 ubuntu postfix/error[4552]: 3435340AFB: to=<xanios@gmail.com>, relay=none, delay=9596, delays=9574/22/0/0.18, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4572]: 5CD8840B19: to=<xanios@gmail.com>, relay=none, delay=9126, delays=9104/22/0/0.03, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/cleanup[4545]: ED7CA40BDE: message-id=<20100803093100.ED7CA40BDE@ubuntu>
Aug 3 02:31:01 ubuntu postfix/error[4550]: 54DCD40A56: to=<xanios@gmail.com>, relay=none, delay=12943, delays=12921/22/0/0.03, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/bounce[4558]: BAACD40A58: sender delivery status notification: ED7CA40BDE
Aug 3 02:31:01 ubuntu postfix/cleanup[4545]: 027FA40BCC: message-id=<20100803093101.027FA40BCC@ubuntu>
Aug 3 02:31:01 ubuntu postfix/bounce[4567]: AF96040AFA: sender delivery status notification: 027FA40BCC
Aug 3 02:31:01 ubuntu postfix/qmgr[4533]: ED7CA40BDE: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:31:01 ubuntu postfix/qmgr[4533]: 027FA40BCC: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:31:01 ubuntu postfix/error[4551]: 2B9B840B24: to=<layleng91@gmail.com>, relay=none, delay=8876, delays=8854/22/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4550]: 4613940B07: to=<xanios@gmail.com>, relay=none, delay=9286, delays=9264/22/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4572]: C227140B3F: to=<xanios@gmail.com>, relay=none, delay=10, delays=0.09/10/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4570]: 027FA40BCC: to=<xanios@server.com>, relay=none, delay=0.03, delays=0/0/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4555]: 693F640BA2: to=<xanios@server.com>, relay=none, delay=0.61, delays=0.03/0.56/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4563]: ED7CA40BDE: to=<xaniosg@server.com>, relay=none, delay=0.07, delays=0.04/0.01/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/error[4552]: 4E2AF40B88: to=<xaniosg@server.com>, relay=none, delay=0.72, delays=0.04/0.66/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:31:01 ubuntu postfix/cleanup[4545]: 13E2F40BE9: message-id=<20100803093101.13E2F40BE9@ubuntu>
Aug 3 02:31:01 ubuntu postfix/bounce[4567]: C227140B3F: sender delivery status notification: 13E2F40BE9
Aug 3 02:31:01 ubuntu postfix/qmgr[4533]: 13E2F40BE9: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:31:01 ubuntu postfix/error[4551]: 13E2F40BE9: to=<xanios@server.com>, relay=none, delay=0, delays=0/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Last edited by Xanios; 08-03-2010 at 05:29 AM .
08-03-2010, 05:31 AM
#80
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Lucid, Ubuntu Server 9.10/10.04, CentOS 5.5 Final
Posts: 4,331
Rep:
Your connection has been refused and as I say. I think this issue is caused because there is no MX record to your domain that points to your server. This will make gmail SMTP server reject the connections for it can not verify your server using reverse lookups. I suggest you use gmail SMTP server to relay your emails to external internet SMTP servers.
08-03-2010, 05:32 AM
#81
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Quote:
Originally Posted by
linuxlover.chaitanya
I am still confused as to what are you trying to achieve? Are you trying to send mail to your gmail account or trying to use gmail SMTP server as relay to send mails. To send mails externally on internet requires a valid MX record for your domain that other domain SMTP servers can verify.
Here you are storing hash password for your gmail account and I do not understand why do you need it. Are you using gmail SMTP as a relay to send emails?
Hi,
Hmm both sounds almost the same to me? I want to send mail to my gmail account, but before that i do have to use gmail SMTP server as a relay isn't it? So yesterday i created the CA Certificate to get postfix to work with gmail.
08-03-2010, 05:36 AM
#82
Guru
Registered: May 2009
Location: Barcelona, Spain
Distribution: LMDE + Linux 3.2.0-1.dmz.6-amd64, RHEL5+6, Mulltiple testing
Posts: 6,188
Hi,
One step closer to success! Looks from the log that you're connecting to the GMail smtp server. Bad new is that your connection is refused.
From what I see in your post at 11:24 is that the owner/group is wrong for the sasl_passwd.db file. Did you run the postmap command on the sasl_passwd file with sudo? Like this?:
Code:
sudo postmap /etc/postfix/sasl_passwd
If not, run it, check the permissions of the file after that, restart postfix and send a mail. Just like before post last 20 or so lines from the log.
Kind regards,
Eric
08-03-2010, 05:42 AM
#83
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
Yay, we are getting closer!
Quote:
From what I see in your post at 11:24 is that the owner/group is wrong for the sasl_passwd.db file.
Hmm you mean this line:
Code:
Mail Delivery Status Report will be mailed to <layleng >.
Hmm, actually the name of the user is that and not xanios. I changed to xanios when i posted my output here is to protect my identity. Well, hahahaa XD
And ya, i did run the postmap command on the sasl_passwd
Last edited by Xanios; 08-03-2010 at 05:44 AM .
08-03-2010, 05:45 AM
#84
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Lucid, Ubuntu Server 9.10/10.04, CentOS 5.5 Final
Posts: 4,331
Rep:
The security options that you are using are noanonymous. But I think you will need noplaintext as well.
08-03-2010, 05:47 AM
#85
Guru
Registered: May 2009
Location: Barcelona, Spain
Distribution: LMDE + Linux 3.2.0-1.dmz.6-amd64, RHEL5+6, Mulltiple testing
Posts: 6,188
Quote:
Originally Posted by
Xanios
Hi,
Yay, we are getting closer!
Hmm you mean this line:
Code:
Mail Delivery Status Report will be mailed to <layleng>.
Hmm, actually the name of the user is that and not xanios. I changed to xanios when i posted my output here is to protect my identity. Well, hahahaa XD
And ya, i did run the postmap command on the sasl_passwd
Hello,
I was referring to this output:
Code:
xanios@ubuntu:~$ ls -al | grep sasl
-rw-r--r-- 1 root root 62 2010-08-03 02:09 sasl_passwd
-rw-r--r-- 1 xanios xanios 12288 2010-08-03 00:38 sasl_passwd.db
where it shows that xanios:xanios is owner of the sasl_passwd.db file. But now looking for the second time I noticed you were in your home directory and moved the file later on.
Can you post output of the ls command on the postfix dir?
Code:
sudo ls -al /etc/postfix/
And it's good that you change your personal data like IP, logon, etc...
Kind regards,
Eric
08-03-2010, 05:47 AM
#86
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Lucid, Ubuntu Server 9.10/10.04, CentOS 5.5 Final
Posts: 4,331
Rep:
08-03-2010, 05:50 AM
#87
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Quote:
Originally Posted by
linuxlover.chaitanya
The security options that you are using are noanonymous. But I think you will need noplaintext as well.
Hi,
you mean this line?:
Code:
smtp_sasl_security_options = noanonymous
For that line i added it inside manually.
So, regarding that
noplaintext
Is it something like:
Code:
smtp_sasl_noplaintext = noanonymous
08-03-2010, 05:51 AM
#88
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi Eric,
here's the output:
Code:
xanios@ubuntu:~$ sudo ls -al /etc/postfix/
total 128
drwxr-xr-x 3 root root 4096 2010-08-03 02:55 .
drwxr-xr-x 136 root root 12288 2010-08-03 00:40 ..
-rw-r--r-- 1 root root 3329 2010-08-02 03:23 cacert.pem
-rw-r--r-- 1 root root 0 2010-07-21 01:00 canonical
-rw-r--r-- 1 root root 318 2010-07-18 23:28 dynamicmaps.cf
-rw-r--r-- 1 root root 3157 2010-08-02 03:23 FOO-cert.pem
-r-------- 1 root root 891 2010-08-02 03:23 FOO-key.pem
-rw-r--r-- 1 root root 1880 2010-08-03 02:55 main.cf
-rw-r--r-- 1 root root 4300 2010-07-18 23:28 master.cf
-rw-r--r-- 1 root root 18992 2009-09-22 06:52 postfix-files
-rwxr-xr-x 1 root root 8613 2009-09-22 06:52 postfix-script
-rwxr-xr-x 1 root root 24256 2009-09-22 06:52 post-install
drwxr-xr-x 2 root root 4096 2009-09-22 06:52 sasl
-rw-r--r-- 1 root root 62 2010-08-03 02:09 sasl_passwd
-rw-r--r-- 1 root root 12288 2010-08-03 02:30 sasl_passwd.db
-rw-r--r-- 1 root root 26 2010-08-02 19:54 transport
-rw-r--r-- 1 root root 12288 2010-08-02 23:50 transport.db
EDITED:
Sorry, should be this since it is inside postfix directory:
Code:
xanios@ubuntu:/etc/postfix $ ls -al
total 128
drwxr-xr-x 3 root root 4096 2010-08-03 02:55 .
drwxr-xr-x 136 root root 12288 2010-08-03 00:40 ..
-rw-r--r-- 1 root root 3329 2010-08-02 03:23 cacert.pem
-rw-r--r-- 1 root root 0 2010-07-21 01:00 canonical
-rw-r--r-- 1 root root 318 2010-07-18 23:28 dynamicmaps.cf
-rw-r--r-- 1 root root 3157 2010-08-02 03:23 FOO-cert.pem
-r-------- 1 root root 891 2010-08-02 03:23 FOO-key.pem
-rw-r--r-- 1 root root 1880 2010-08-03 02:55 main.cf
-rw-r--r-- 1 root root 4300 2010-07-18 23:28 master.cf
-rw-r--r-- 1 root root 18992 2009-09-22 06:52 postfix-files
-rwxr-xr-x 1 root root 8613 2009-09-22 06:52 postfix-script
-rwxr-xr-x 1 root root 24256 2009-09-22 06:52 post-install
drwxr-xr-x 2 root root 4096 2009-09-22 06:52 sasl
-rw-r--r-- 1 root root 62 2010-08-03 02:09 sasl_passwd
-rw-r--r-- 1 root root 12288 2010-08-03 02:30 sasl_passwd.db
-rw-r--r-- 1 root root 26 2010-08-02 19:54 transport
-rw-r--r-- 1 root root 12288 2010-08-02 23:50 transport.db
Well, both outputs are the same O_O
Last edited by Xanios; 08-03-2010 at 05:55 AM .
08-03-2010, 05:54 AM
#89
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Lucid, Ubuntu Server 9.10/10.04, CentOS 5.5 Final
Posts: 4,331
Rep:
Code:
smtp_sasl_security_options = noanonymous
Change the above code to:
Code:
smtp_sasl_security_options = noanonymous, noplaintext
08-03-2010, 06:03 AM
#90
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Quote:
Originally Posted by
linuxlover.chaitanya
Code:
smtp_sasl_security_options = noanonymous
Change the above code to:
Code:
smtp_sasl_security_options = noanonymous, noplaintext
Hi,
i have changed it.
The last 20 lines of output from mail log:
Code:
xanios@ubuntu:~$ sudo /etc/init.d/postfix restart
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]
xanios@ubuntu:~$ mail -s "test mail" -v xanios@gmail.com
test123
Cc:
Mail Delivery Status Report will be mailed to <xanios>.
xanios@ubuntu:~$ tail -n 20 /var/log/mail.log
Aug 3 02:55:39 ubuntu postfix/qmgr[4533]: 4E2AF40B88: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:55:39 ubuntu postfix/qmgr[4533]: 693F640BA2: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:55:39 ubuntu postfix/qmgr[4533]: 13E2F40BE9: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:55:39 ubuntu postfix/qmgr[4533]: 027FA40BCC: from=<>, size=1810, nrcpt=1 (queue active)
Aug 3 02:56:00 ubuntu postfix/smtp[4838]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug 3 02:56:00 ubuntu postfix/smtp[4839]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug 3 02:56:00 ubuntu postfix/smtp[4839]: ED7CA40BDE: to=<xanios@server.com>, relay=none, delay=1499, delays=1478/0.03/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:56:00 ubuntu postfix/smtp[4838]: C227140B3F: to=<xanios1@gmail.com>, relay=none, delay=1509, delays=1488/0.03/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:56:00 ubuntu postfix/smtp[4842]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug 3 02:56:00 ubuntu postfix/smtp[4840]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug 3 02:56:00 ubuntu postfix/smtp[4841]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug 3 02:56:00 ubuntu postfix/smtp[4842]: 13E2F40BE9: to=<xanios@server.com>, relay=none, delay=1499, delays=1478/0.07/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:56:00 ubuntu postfix/smtp[4840]: 4E2AF40B88: to=<xanios@server.com>, relay=none, delay=1500, delays=1479/0.04/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:56:00 ubuntu postfix/smtp[4841]: 693F640BA2: to=<xanios@server.com>, relay=none, delay=1500, delays=1479/0.06/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 02:56:00 ubuntu postfix/error[4846]: 027FA40BCC: to=<xanios@server.com>, relay=none, delay=1499, delays=1478/21/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug 3 03:02:45 ubuntu postfix/master[4529]: terminating on signal 15
Aug 3 03:02:47 ubuntu postfix/master[5056]: daemon started -- version 2.6.5, configuration /etc/postfix
Aug 3 03:04:28 ubuntu postfix/pickup[5057]: 031DA40BEB: uid=1000 from=<layleng>
Aug 3 03:04:28 ubuntu postfix/cleanup[5074]: 031DA40BEB: message-id=<20100803100428.031DA40BEB@ubuntu>
Aug 3 03:04:28 ubuntu postfix/qmgr[5060]: 031DA40BEB: from=<xanios@server.com>, size=289, nrcpt=1 (queue active)
Last edited by Xanios; 08-03-2010 at 06:08 AM .
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 03:23 AM .
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