Sendmail and Exim not working
Hi,
I have recently set up WHM on a cloud server, and I am having problems sending mail. I do not receive notifications from cPanel, and sendmail does not work at all. I have a web site running but without mail functions including php mail, but the DNS servers are OK and I can traceroute domains. If I run the mail troubleshooter on an email address, it reports the correct lookup host.
In WHM the mail queue has every email in it that has been sent so far. The mail delivery reports are either 'retry timeout exceeded', 'connection timed out', or 'retry time not reached for any host after a long failure period'.
If I try to use sendmail from the command line, I get this in exim_mainlog:
I have changed the Exim listening port from 25, although I don't see how this would cause a problem sending mail. Apart from that, everything is still in the default configuration when WHM was set up. Any help would be greatly appreciated.
2017-02-01 16:10:18 1cYxUA-0009rM-Fh ** richard@domain.co.uk R=dkim_lookuphost T=dkim_remote_smtp: retry time not reached for any host after a long failure period
2017-02-01 16:10:18 1cYxUA-0009rM-Fh Frozen (delivery error message)I have changed the Exim listening port from 25, although I don't see how this would cause a problem sending mail. Apart from that, everything is still in the default configuration when WHM was set up. Any help would be greatly appreciated.
-
Hello, Outgoing traffic over Port 25 is required in order for Exim to connect to the remote mail server. Could you verify you can successfully telnet to one of the remote mail servers listed in the logs over port 25 from the cPanel server? EX: telnet remote-mail-server 25
I recommend reaching out to your data center or hosting provider to verify if there's anything filtering port 25 traffic in their network or firewall rules if the telnet connection fails. Providers will often block port 25 as a SPAM prevention technique. Thank you.0 -
Thanks, I tried telnet on port 25 which I know is blocked, didn't work but I could telnet on port 587. I've already added that port to 'Exim Mail Server (on another port)' in WHM and opened the port in the server firewall. This is what I got from telnet: Connected to mx1.server.com. Escape character is '^]'. 220 antispam3.server.com ESMTP Exim 4.86-111764 Wed, 01 Feb 2017 17:10:54 +0000 So I assume the port is not an issue? Or does it have to be 25 to send mail out? 0 -
Outgoing traffic over Port 25 is required in order for your system to connect to remote mail servers. The following post explains the reason for this: change port 25 Thank you. 0 -
Thanks for the link which explains the problem very well. I have had my hosting company remove the block on port 25 and now email is sending from the server. However, when I use mail from the console to send an email, I get this error '550-Sender has no A, AAAA, or MX DNS records. whm.hostname.co.uk'. Here is the output from mail: LOG: MAIN cwd=/ 5 args: send-mail -i -v -- me@domain.com[/EMAIL] LOG: MAIN <= root@whm.hostname.co.uk[/EMAIL] U=root P=local S=508 T="test" [root@whm /]# LOG: MAIN cwd=/var/spool/exim 4 args: /usr/sbin/exim -v -Mc 1cZFHx-0001Zb-Sk delivering 1cZFHx-0001Zb-Sk Connecting to mx1.spamfiltering.com [72.249.150.158]:25 ... connected SMTP<< 220 antispam3.spamfiltering.com ESMTP Exim 4.86-111764 Thu, 02 Feb 2017 11:10:55 +0000 SMTP>> EHLO whm.hostname.co.uk SMTP<< 250-antispam3.spamfiltering.com Hello whm.hostname.co.uk [77.68.8.55] 250-SIZE 250-8BITMIME 250-STARTTLS 250-PRDR 250 HELP SMTP>> STARTTLS SMTP<< 220 TLS go ahead LOG: MAIN [72.249.150.158] SSL verify error: certificate name mismatch: "/OU=Domain Control Validated/OU=Hosted by UNITED COMMUNICATIONS LIMITED/OU=COMODO SSL/CN=antispam1.spamfiltering.com" SMTP>> EHLO whm.hostname.co.uk SMTP<< 250-antispam3.spamfiltering.com Hello whm.hostname.co.uk [77.68.8.55] 250-SIZE 250-8BITMIME 250-PRDR 250 HELP SMTP>> MAIL FROM: SIZE=1546 SMTP<< 250 OK SMTP>> RCPT TO: SMTP<< 550-Sender has no A, AAAA, or MX DNS records. whm.hostname.co.uk 550 whm.hostname.co.uk SMTP>> QUIT
All the outgoing emails are frozen in the mail queue with the error '550-Sender has no A, AAAA, or MX DNS records. whm.hostname.co.uk'. But in the DNS zone for whm.hostname.co.uk, there is an A entry (points to the server IP) and an MX entry (just points to the FQDN of whm.hostname.co.uk) The problem seems to be with the FQDN of the hostname, which in my case is something like whm.hostname.co.uk. If I run nslookup I get the following output:[root@whm /]# nslookup whm.hostname.co.uk Server: x.x.x.x Address: x.x.x.x#53 ** server can't find whm.hostname.co.uk: NXDOMAIN
But when I run it without the whm part, I get this:[root@whm /]# nslookup hostname.co.uk Server: x.x.x.x Address: x.x.x.x#53 Non-authoritative answer: Name: hostname.co.uk Address: x.x.x.x
Any help greatly appreciated.0 -
Ah, missed an A entry on the hostname! With the port unblocked, email is now working. Thanks. 0 -
Thanks for updating the thread. 0
Please sign in to leave a comment.
Comments
7 comments