Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
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.
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.
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?
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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.