LinuxQuestions.org
Visit Jeremy's Blog.
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-03-2010, 05:21 AM   #76
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

Quote:
Originally Posted by Xanios View Post
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
 
Old 08-03-2010, 05:23 AM   #77
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
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?
 
Old 08-03-2010, 05:24 AM   #78
Xanios
Member
 
Registered: Jul 2010
Posts: 216

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

Original Poster
Rep: Reputation: 30
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.
 
Old 08-03-2010, 05:31 AM   #80
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
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.
 
Old 08-03-2010, 05:32 AM   #81
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
Old 08-03-2010, 05:36 AM   #82
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
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
 
Old 08-03-2010, 05:42 AM   #83
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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.
 
Old 08-03-2010, 05:45 AM   #84
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
The security options that you are using are noanonymous. But I think you will need noplaintext as well.
 
Old 08-03-2010, 05:47 AM   #85
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by Xanios View Post
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
 
Old 08-03-2010, 05:47 AM   #86
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
http://www.kreci.net/linux/how-to-se...external-smtp/
 
Old 08-03-2010, 05:50 AM   #87
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by linuxlover.chaitanya View Post
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
 
Old 08-03-2010, 05:51 AM   #88
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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.
 
Old 08-03-2010, 05:54 AM   #89
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_security_options = noanonymous
Change the above code to:

Code:
smtp_sasl_security_options = noanonymous, noplaintext
 
Old 08-03-2010, 06:03 AM   #90
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
  


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 06:37 PM.

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