LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-05-2013, 07:17 PM   #1
Usalabs
Member
 
Registered: Jan 2004
Distribution: OpenSUSE 42.1 Server
Posts: 158

Rep: Reputation: 15
Problem with sendmail smtp test shows refused.


Ok here's the biggest problem I'm having with sendmail, I made sure my isp doesn't block port 25 and 110, I set up the server's host name with an FQDN, gave the server a static LAN IP, set my domain name providers DNS, A, cname and MX records accordingly, Installed apache, mysql, php5, sendmail and dovecot, a port scan on 25 and 110 from outside the router, shows as 'closed', firewall and ports 25, 80 and 110 are open in the firewall and forwarded in the router, web pages serve up fine when accessed from the WAN, php5 and mysql work fine, going to mxtoolbox.com and checking the DNS records they all show fine, including the MX record which points correctly to my WAN IP address, but an SMTP test shows:-

'No connection could be made because the target machine actively refused it'

If everything checks out fine, then there shouldn't be a problem.

When I try to send an email from sendmail, nothing is sent,,, nothing is in the mail.log file(s), and nothing in the queue.

Oh and I'll mention that I'm also using webmin for configuring sendmail and dovecot and also for sending the test emails.

Last edited by Usalabs; 01-05-2013 at 07:20 PM.
 
Old 01-05-2013, 07:29 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Can you connect to the SMTP port from another host on your LAN? telnet <LAN IP> 25 should result in a "220" response from sendmail.

Is port 25 on your router correctly forwarded to the server LAN IP?

Are there any firewall settings on the server that might interfere with incoming SMTP traffic?

If you do a portscan of port 25 from the outside, can you see incoming packets arriving at your server? tcpdump -i eth0 tcp dst port 25 should work, assuming eth0 is your LAN NIC.
 
Old 01-05-2013, 07:42 PM   #3
Usalabs
Member
 
Registered: Jan 2004
Distribution: OpenSUSE 42.1 Server
Posts: 158

Original Poster
Rep: Reputation: 15
Yes I can telnet to port 25, and as a test from outside the router, I used telnet <WAN IP> 25 and got:-

220 <FQDN> ESMTP Sendmail (Ubuntu)

I even did the same from inside the LAN using my WAN IP and got the same results.

I read somewhere earlier that sendmail is prone to blocking everything, so I uninstalled sendmail and installed postfix, and now the SMTP test show great, even a relay test shows the server is not set up as a relay, but the server still can't send out emails, nothing in the logs, and nothing in the queue.

Is there something that can intercept outgoing on a particular port and show me if anything is actually leaving that port?
 
Old 01-05-2013, 08:13 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Quote:
Originally Posted by Usalabs View Post
Yes I can telnet to port 25, and as a test from outside the router, I used telnet <WAN IP> 25 and got:-

220 <FQDN> ESMTP Sendmail (Ubuntu)
OK, so sendmail is working.

Quote:
Originally Posted by Usalabs View Post
I read somewhere earlier that sendmail is prone to blocking everything,
Where on earth did you read that? The only problem with sendmail that I'm aware of, is that the config file is cryptic to the point where the recommended practice is to use an only slightly more user-friendly M4 macro file to generate sendmail.cf.

Also, historically, sendmail has had more than its fair share of security-related bugs, but nowadays it's no better or worse than any other moderately complex piece of software.

Quote:
Originally Posted by Usalabs View Post
so I uninstalled sendmail and installed postfix, and now the SMTP test show great, even a relay test shows the server is not set up as a relay, but the server still can't send out emails, nothing in the logs, and nothing in the queue.

Is there something that can intercept outgoing on a particular port and show me if anything is actually leaving that port?
Have you configured sendmail/postfix/whatever to use the Smart Host provided by your ISP for outgoing mails? If not, I bet your emails end up in the nearest spam filter.

The tcpdump command I listed earlier will catch all packets to tcp port 25, both incoming from the Internet and outgoing from your server.
 
  


Reply



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
[SOLVED] sendmail problem, Connection refused by [127.0.0.1] qrange Solaris / OpenSolaris 6 07-14-2011 03:49 AM
smtp problem in sendmail linuxcoo Linux - Newbie 16 04-01-2010 02:39 AM
sendmail smtp problem nithin_bhaskar Linux - Networking 1 07-10-2004 06:07 AM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - Networking 5 10-22-2003 11:02 AM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - General 5 10-20-2003 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:23 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
Open Source Consulting | Domain Registration