Skip to main content

Sendmail and Exim not working

Comments

7 comments

  • cPanelMichael
    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
  • richardwatton
    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
  • cPanelMichael
    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
  • richardwatton
    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
  • richardwatton
    Do I need to configure reverse DNS for BIND in WHM, as per
    0
  • richardwatton
    Ah, missed an A entry on the hostname! With the port unblocked, email is now working. Thanks.
    0
  • Infopro
    Thanks for updating the thread.
    0

Please sign in to leave a comment.