LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-07-2012, 02:47 PM   #1
conflicker
Member
 
Registered: Sep 2011
Posts: 89

Rep: Reputation: Disabled
SMTP no error, but no email sent.


Hi everybody,

I was having a bad time looking for some solution of my server problem. I'am using phpmailer to send mails using smtp server, it gives me no error but no email sent.

When I try my script on other server, and it works. I'm just wondering if there are some webmail configuration that I messed up.

Any idea on things that need to consider to make everything works? Please help. Thanks
 
Old 03-07-2012, 05:12 PM   #2
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
What happens when you telnet to the smtp server where the script is not working?
telnet <server> 25
 
Old 03-08-2012, 10:20 AM   #3
conflicker
Member
 
Registered: Sep 2011
Posts: 89

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ArcLinux View Post
What happens when you telnet to the smtp server where the script is not working?
telnet <server> 25
Ahhmm.. do I need to install application like telnet on my server or there are some place on the server that I can enable this telnet application. Cause when I try to use this command, it says command not found.
 
Old 03-08-2012, 10:30 AM   #4
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
that all depends on your distro.
debian, ubuntu and etc... would probably be: aptget install telnet
redhat, suse and other rpm distros would greatly depend on what you have available and prefered packagemanager.

slackware. it should just be there.
 
Old 03-08-2012, 10:36 AM   #5
conflicker
Member
 
Registered: Sep 2011
Posts: 89

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ArcLinux View Post
that all depends on your distro.
debian, ubuntu and etc... would probably be: aptget install telnet
redhat, suse and other rpm distros would greatly depend on what you have available and prefered packagemanager.

slackware. it should just be there.
I'm using CENTOS 6.2, and when I do a google search it gaves me this command to install telnet:
Quote:
yum install telnet*
I just want to confirm if this is the right command. I don't want to messed up with my server due to unsure command.
 
Old 03-08-2012, 10:37 AM   #6
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
Quote:
Originally Posted by conflicker View Post
I'm using CENTOS 6.2, and when I do a google search it gaves me this command to install telnet:


I just want to confirm if this is the right command. I don't want to messed up with my server due to unsure command.
Looks right to me.
 
Old 03-08-2012, 10:44 AM   #7
conflicker
Member
 
Registered: Sep 2011
Posts: 89

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ArcLinux View Post
that all depends on your distro.
debian, ubuntu and etc... would probably be: aptget install telnet
redhat, suse and other rpm distros would greatly depend on what you have available and prefered packagemanager.

slackware. it should just be there.
When I do telnet <host> 25 it says:

Quote:
Connected to hostname.
Escape character is '^]'.
220-ns1.hostname.com ESMTP Exim 4.69 #1 Thu, 08 Mar 2012 10:39:17 -0500
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
421 ns1.hostname.com: SMTP command timeout - closing connection
Connection closed by foreign host.
What does it mean?
 
Old 03-08-2012, 10:52 AM   #8
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by conflicker View Post
When I do telnet <host> 25 it says:

Quote:
Connected to hostname.
Escape character is '^]'.
220-ns1.hostname.com ESMTP Exim 4.69 #1 Thu, 08 Mar 2012 10:39:17 -0500
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
421 ns1.hostname.com: SMTP command timeout - closing connection
Connection closed by foreign host.
What does it mean?


What does it mean?
I'm sorry I don't know how to configure, but it shows that your EXIM is not configured for sending or receiving.

But on the other way CentOS 6.x doesn't have Exim configured "out of box" when installed, so someone had to do it.
 
Old 03-08-2012, 10:59 AM   #9
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
Quote:
Originally Posted by conflicker View Post
When I do telnet <host> 25 it says:

Connected to hostname.
Escape character is '^]'.
220-ns1.hostname.com ESMTP Exim 4.69 #1 Thu, 08 Mar 2012 10:39:17 -0500
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
421 ns1.hostname.com: SMTP command timeout - closing connection
Connection closed by foreign host.

What does it mean?
Well it looks like it is working to me. The 220 MOTD for Exim and the 421 is the timeout after waiting and not receiving any input. How long did you have to wait before the prompt timed out?
 
Old 03-08-2012, 11:01 AM   #10
conflicker
Member
 
Registered: Sep 2011
Posts: 89

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ArcLinux View Post
Well it looks like it is working to me. The 220 MOTD for Exim and the 421 is the timeout after waiting and not receiving any input. How long did you have to wait before the prompt timed out?
Maybe 1 or 2 mins.
 
Old 03-08-2012, 11:15 AM   #11
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
Find yourself a manual online to test smtp from command line. send yourself some mail. if that works we can rule out the smtp server and move on. I am guessing that you will have a setting in the php.ini on the failing web server that will fix it if you find that the smtp server responds correctly.
 
Old 03-08-2012, 05:50 PM   #12
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
how to test mail with telnet, another example

good luck
 
Old 03-08-2012, 09:38 PM   #13
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,332
Blog Entries: 12

Rep: Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727Reputation: 2727
Are Apache and php configured to send mail from scripts on the server in question?

It might be worth while to compare the php configuration on the server where the script works with that on the server where the script doesn't work and to look for the php error log, wherever it might be located. If php is not sending the mail, the absence of smtp errors would be explained.
 
  


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
Command based email client to send email through secure smtp havolinec Linux - Newbie 2 07-27-2010 08:40 AM
Send email to specific SMTP servers per email from my server? neilius Linux - Server 6 06-25-2009 07:31 AM
SMTP email messages tekmann33 Linux - Newbie 1 05-28-2008 10:41 AM
SMTP Email Problem qtzaman Linux - Software 1 08-31-2006 10:21 PM
Java Email Smtp keikun_naruchan Programming 3 04-07-2006 05:42 PM


All times are GMT -5. The time now is 10:32 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