Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
|
|
11-14-2010, 02:30 PM
|
#1
|
Member
Registered: Sep 2006
Posts: 38
Rep:
|
postfix and gmail problems
I've setup postfox on Fedora 13 in order to send emails to and from gmail.
I thought this was working, but it is dropping approx 50% of mails with an error. The other 50% work OK. It seems completely random.
I've read the link but I stil dont quite understand.
My machine is just a PC, on talktalk's network in the UK.
I use dyndns to allocate a DNS alias (well several actually) to my dynamic IP address - not sure if this is relevent.
Is it failing due to a reverse DNS lookup on the dyndns host? Or is it because it cannot resolve my localhost.localdomain?
I used to have this running on opensuse and swear it used to work 100% of the time.
What am I doing wrong?
Quote:
Nov 14 18:12:40 linuxserver1 postfix/smtpd[14619]: connect from localhost.localdomain[127.0.0.1]
Nov 14 18:12:40 linuxserver1 postfix/smtpd[14619]: 367D428388: client=localhost.localdomain[127.0.0.1]
Nov 14 18:12:40 linuxserver1 postfix/cleanup[14622]: 367D428388: message-id=<20101114181240.367D428388@linuxserver1.localdomain>
Nov 14 18:12:40 linuxserver1 postfix/qmgr[2834]: 367D428388: from=<myaccount@gmail.com>, size=3309455, nrcpt=1 (queue active)
Nov 14 18:12:40 linuxserver1 postfix/smtpd[14619]: disconnect from localhost.localdomain[127.0.0.1]
Nov 14 18:12:40 linuxserver1 postfix/smtpd[14619]: connect from localhost.localdomain[127.0.0.1]
Nov 14 18:12:40 linuxserver1 postfix/smtpd[14619]: DFE0E296DC: client=localhost.localdomain[127.0.0.1]
Nov 14 18:12:41 linuxserver1 postfix/cleanup[14622]: DFE0E296DC: message-id=<20101114181240.DFE0E296DC@linuxserver1.localdomain>
Nov 14 18:12:41 linuxserver1 postfix/qmgr[2834]: DFE0E296DC: from=<myaccount@gmail.com>, size=3638758, nrcpt=1 (queue active)
Nov 14 18:12:41 linuxserver1 postfix/smtpd[14619]: disconnect from localhost.localdomain[127.0.0.1]
Nov 14 18:13:45 linuxserver1 postfix/smtp[14623]: 367D428388: to=<targetemail@googlemail.com>, relay=gmail-smtp-in.l.google.com[209.85.227.27]:25, delay=65, delays=0.56/0.01/1.2/63, dsn=2.0.0, status=sent (250 2.0.0 OK 1289758425 h11si9520838wer.0)
Nov 14 18:13:45 linuxserver1 postfix/qmgr[2834]: 367D428388: removed
Nov 14 18:14:00 linuxserver1 postfix/smtp[14625]: DFE0E296DC: to=<targetemail@googlemail.com>, relay=gmail-smtp-in.l.google.com[209.85.227.27]:25, delay=79, delays=0.57/0.01/0.73/78, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[209.85.227.27] said: 550-5.7.1 [1.2.3.4] The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at 550 5.7.1 http://mail.google.com/support/bin/a...y?answer=10336 q27si9508003wbc.50 (in reply to end of DATA command))
Nov 14 18:14:00 linuxserver1 postfix/cleanup[14622]: 334F7296DD: message-id=<20101114181400.334F7296DD@linuxserver1.localdomain>
Nov 14 18:14:00 linuxserver1 postfix/qmgr[2834]: 334F7296DD: from=<>, size=3218, nrcpt=1 (queue active)
Nov 14 18:14:00 linuxserver1 postfix/bounce[14626]: DFE0E296DC: sender non-delivery notification: 334F7296DD
Nov 14 18:14:00 linuxserver1 postfix/qmgr[2834]: DFE0E296DC: removed
Nov 14 18:14:02 linuxserver1 postfix/smtp[14623]: 334F7296DD: to=<myaccount@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.227.27]:25, delay=2.1, delays=0.04/0/0.93/1.1, dsn=2.0.0, status=sent (250 2.0.0 OK 1289758442 o10si9487033wee.149)
Nov 14 18:14:02 linuxserver1 postfix/qmgr[2834]: 334F7296DD: removed
|
Additions to bottom of main.cf
Quote:
#### GMail SSL SMTP Relay
relayhost = [smtp.gmail.com]:587
#auth
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
#tls
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/pki/tls/gmail_relay/server.key
smtp_tls_cert_file=/etc/pki/tls/gmail_relay/server.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no
|
and my sasl_passwd
Thanks
|
|
|
11-14-2010, 04:55 PM
|
#2
|
Member
Registered: Mar 2010
Location: Switzerland
Distribution: Slackware
Posts: 98
Rep:
|
Code:
smtp-in.l.google.com[209.85.227.27] said: 550-5.7.1 [1.2.3.4] The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at 550 5.7.1 http://mail.google.com/support/bin/a...y?answer=10336 q27si9508003wbc.50 (in reply to end of DATA command))
Seems you are not authenticated correctly there at gmail...
1. did you
Code:
postmap sasl_passwd
?
2. also try out to add following to the sender_canonical file:
Code:
my_account@linuxserver1.localdomain myaccount@gmail.com
change it to the appropriate names you use on your machine (accounts)
Last edited by wargus; 11-14-2010 at 04:56 PM.
Reason: typos
|
|
|
11-15-2010, 11:50 AM
|
#3
|
Member
Registered: Sep 2006
Posts: 38
Original Poster
Rep:
|
Thanks.
Quote:
1. did you
Code:
postmap sasl_passwd
?
|
Err, no. Didn't realise I had to.
However:
cd /etc/postfix
postmap sasl_passwd
postmap: fatal: open database sasl_passwd.db: Permission denied
Sure enough, it doesn't exist, just sasl_passwd
This file also doesn't exist. I have a canonical file, but its just a copy of a man page.
Any ideas?
|
|
|
11-15-2010, 12:21 PM
|
#4
|
Member
Registered: Mar 2010
Location: Switzerland
Distribution: Slackware
Posts: 98
Rep:
|
ok not sure now about your postfix installation... even since you write that 50% of your emails get delivered.
But maybe check this, it's from the co-author of the postfix book (also the command is a bit different, although it works on my slackware how I described in my post before), section 16.1.3
Postfix chapter about SMTP authentication
good luck
|
|
|
11-16-2010, 02:42 AM
|
#5
|
Member
Registered: Sep 2006
Posts: 38
Original Poster
Rep:
|
OK. I finally got the postmap thing working.
Looks like I had control characters in my sasl_passwd file somehow.
Now I'm getting errors re my cert files.
I'm going to try recreating all the certificates and take it from there.
I'll update when I've done all that.
Still makes now sense why some mails are sent and some aren't though. Although I suspect none are being sent now!
Thanks
|
|
|
All times are GMT -5. The time now is 07:25 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
|
|