LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-15-2011, 04:02 AM   #1
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Rep: Reputation: 1
ISPs SMTP service keeps bouncing mail when I send from my server.


I am having real problems sending emails using my ISPs SMTP service.

What I am getting back is exactly this:
Quote:
Nov 15 09:56:49 server postfix/smtp[18716]: 844E23A6EBC: to=<myemailuser@gmail.com>, relay=smtp.virgin.net[62.254.26.212]:25, delay=0.27, delays=0.09/0.03/0.14/0.02, dsn=5.0.0, status=bounced (host smtp.virgin.net[62.254.26.212] said: 555 Refused (external Mail From address). Please enable SMTP authentication to send mail. (in reply to MAIL FROM command))
I have tried the following steps:
http://www.cyberciti.biz/faq/postfix...t-smtp-client/

But this doesn't work, have replaced the username (email) on the steps with my own ISPs email address (which I won't give out here for obvious reasons) and my current password but still no luck.

By doing those steps it just says deffered, can someone help me to overcome this error?

I mean surely if I am a registered user on their network I should be able to send emails surely?

Any feedbacks greatly appreciated,
Jeremy.
 
Old 11-15-2011, 04:23 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Is this on a CentOS 5.5 system?

The linked procedure is for sending via multiple ISPs; unless you are actually using multiple ISPs there are simpler procedures (sorry - no links kept).

Are the logon and port details you are using for smtp.virgin.net known to work, for example from an email client such as Thunderbird?
 
Old 11-15-2011, 05:14 AM   #3
DaRkBoDoM
Member
 
Registered: Oct 2007
Location: Italy
Distribution: Debian
Posts: 72

Rep: Reputation: 17
What are you using to send email?
 
Old 11-15-2011, 05:21 AM   #4
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Yes it was working perfectly until today.

I firstly tried on the hope that it would work (doubtly though) to restart postfix, of course that failed though, as it's their smtp service smtp.virgin.net which says I need to authenticate myself.

This is the config of /etc/postfix/main.cf that used to make this work up to today:
Quote:
relayhost = smtp.virgin.net
I have tried adding following through on the actual Virgin Media's support forums:
http://community.virginmedia.com/t5/...mtp/td-p/66253

What I have come up with is something like (removing my real email address though):
Quote:
relayhost = smtp.virgin.net:465
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
Then /etc/postfix/sasl_passwd looks like:
Quote:
smtp.virgin.net:465 myuser123@my_isp_mail_domain:my_isp_email_password
However this is the error I am getting now:

Quote:
Nov 15 11:19:00 server postfix/smtp[23966]: 303893A65E1: to=<muser@myispdomain.com>, relay=smtp.virgin.net[62.254.26.212]:465, delay=727, delays=716/0.03/11/0, dsn=4.4.2, status=deferred (lost connection with smtp.virgin.net[62.254.26.212] while receiving the initial server greeting)
Any suggestions are really appreciated, sorry it is Centos 5.7 which I am using now, not that is should matter at the moment, but I am using iRedmail email services, that's how postfix was configured, with some amendments to allow me to use my ISPs SMTP service for any domains external to my own host as it where, I should be allowed to use their SMTP service since I hold a valid ISP email account with Virgin precisely shouldn't I?

Last edited by j.smith1981; 11-15-2011 at 05:25 AM.
 
Old 11-15-2011, 05:34 AM   #5
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by DaRkBoDoM View Post
What are you using to send email?
Postfix it's in the log output what service I am using sorry.

I have even run the postmap as it says in the topic link:
Quote:
you will probably also need to execute postmap /etc/postfix/sasl_passwd which will compile the sasl_password file into a hash-table for postfix to use...
After running postmap on the file I said, is it supposed to show the exact same file details by any chance?

Just wanted to make sure that's worked in its own manner and then really I don't know what to do if it has, any suggestions?
 
Old 11-15-2011, 05:57 AM   #6
DaRkBoDoM
Member
 
Registered: Oct 2007
Location: Italy
Distribution: Debian
Posts: 72

Rep: Reputation: 17
Probably you could:

1. Manually test your remote credentials: http://qmail.jms1.net/test-auth.shtml
2. Use tcpdump to see where your postfix goes wrong
3. Fix the issue

This should took you about an hour to solve the issue.

Anyway, probably it's even not trying auth at all.

On my config, i have this:
Code:
smtp_sasl_security_options = noanonymous
You need to run postmap to generate a /etc/postfix/sasl_passwd.db file, THEN restart postfix.
 
Old 11-15-2011, 06:29 AM   #7
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Right it is obviously contacting the server on smtp.virgin.net.

But it's deffering.

I have gone through the steps on the link you sent me, seems fine to me but I am questioning this part here:
Quote:
AUTH PLAIN AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=
235 ok, go ahead (#2.0.0)

If you see this message, you are authenticated. If you see this one instead...

AUTH PLAIN AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=
535 authorization failed (#5.7.0)
What my question being should I replace the bit after AUTH PLAIN?

It's just it says too many signals to the smpt.virgin.net could cause me to get blocked and I do not obviously want to do that.

Can you help please?

I mean this is what I get when I run the 'ehlo testing' after 'openssl s_client -crlf -connect smtp.virgin.net:465' command:
Quote:
220 Virgin Media SMTP server ready [ e4c558782VM ].
ehlo test
250-Virgin Media SMTP Proxy at your service.
250-SIZE 35651584
250-8BITMIME
250 AUTH LOGIN PLAIN
Seems fine to me it's got auth login plain hasn't it?

Last edited by j.smith1981; 11-15-2011 at 06:32 AM.
 
Old 11-15-2011, 06:40 AM   #8
DaRkBoDoM
Member
 
Registered: Oct 2007
Location: Italy
Distribution: Debian
Posts: 72

Rep: Reputation: 17
The guide says you can build your secret auth string using

Code:
perl -MMIME::Base64 -e 'print encode_base64("\000jms1\@jms1.net\000not.my.real.password")'
from command line. Obv, replace jms1\@jms1.net and not.my.real.password with your real username and password
 
Old 11-15-2011, 07:03 AM   #9
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Ok I will do that within the next 2 hours.

Thank you though ever so much for your support truly appreciate it!

I mean to be fair this does make some sense in a manner of speaking, tried that stunnel stuff on the community forums for virgin media but of course didn't work.

Will try this though and carry on, so I would use that code generated from that perl command as my password then would I?

Sorry it's just I don't quite get where I should be using that as my password.
 
Old 11-15-2011, 07:07 AM   #10
DaRkBoDoM
Member
 
Registered: Oct 2007
Location: Italy
Distribution: Debian
Posts: 72

Rep: Reputation: 17
Quote:
Originally Posted by j.smith1981 View Post
Will try this though and carry on, so I would use that code generated from that perl command as my password then would I?
This code is a "compressed" version of your username and password together.
Also, have you tried smtp_sasl_security_options = noanonymous?
 
Old 11-15-2011, 08:37 AM   #11
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
I have enabled what you said yes, still absolutely no effect at all, sorry, with regards to this:
Quote:
Originally Posted by DaRkBoDoM View Post
This code is a "compressed" version of your username and password together.
Also, have you tried smtp_sasl_security_options = noanonymous?
Is there a way of viewing what's in the database files and remove rows if necessary?

I am saying that because every time I issue the command say portmap /etc/postfix/<file that has my password for sasl> keeps adding to that one file each time, just wondering if I have entered a wrong character in there and it's taking that value first off.

Is there a command I can use to view what's in there and possibly remove any entries that should not be in there?

I appreciate any replies,
Jeremy.

I ran the command (copy of the whole telnet conversation with smtp.virgin.net):
Quote:
220 Virgin Media SMTP server ready [ e4c558782VM ].
ehlo mail.myhosts.com <replaced with my actual dns MX record>
250-Virgin Media SMTP Proxy at your service.
250-SIZE 35651584
250-8BITMIME
250 AUTH LOGIN PLAIN
AUTH LOGIN PLAIN amF0LnNtaXRoLmNvbUdpbm9sYXgyMg==
334 VXNlcm5hbWU6

Last edited by j.smith1981; 11-15-2011 at 08:53 AM.
 
Old 11-16-2011, 12:09 PM   #12
DaRkBoDoM
Member
 
Registered: Oct 2007
Location: Italy
Distribution: Debian
Posts: 72

Rep: Reputation: 17
Better remove the login string from the previous post.

btw, the command is
Code:
AUTH PLAIN <login_string>
The hasmap is regenerated every time you issue the command, from the text file.
 
  


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
Send mail from already exist SMTP server Mouglou Linux - Server 3 04-04-2011 08:41 AM
Exim4 won't let me send email relaying it to ISPs SMTP server spaceuser Linux - Server 2 09-19-2009 06:10 AM
Postfix Mailserver connecting to ISPs SMTP-server via Proxy/Router saavik Linux - Networking 2 07-17-2006 01:05 AM
Help needed to send mail using a remote smtp server with php s1mpl1c1ty Programming 4 09-19-2005 12:53 AM


All times are GMT -5. The time now is 04:11 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration