SMTP not sending emails but I can receive emails: Centos Linux VPS

Posted on 2014-02-16
Last Modified: 2014-08-06

I'm wondering why I can receive emails for my domain but not send any emails. I'm on a Centos VPS using WHM/cPanel.

I read that it could be my iptables so I turned off (temporarily) my iptables using:
/sbin/iptables -F

But still can't send the emails.

I noticed in my WHM->Mail Queue Manager that I have emails that are frozen. Why is it frozen?

So I clicked on "unfreeze" on one of them and it's now in queue.

On a couple of other emails I tried to "Deliver Now" but I get this error message:

  cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1WF2oO-0006mf-R9
delivering 1WF2oO-0006mf-R9
  Unfrozen by forced delivery
Connecting to []:25 from ... connected
  SMTP<< 220 : DED : ESMTP
  SMTP<< hello [],
         250-SIZE 30000000
         250 OK
  SMTP>> MAIL FROM:<myultrat@${lc:${domain:$h_from:}}> SIZE=2182
  SMTP<< 550 5.1.0 <myultrat@${lc:${domain:$h_from:}}> SIZE=2182 invalid address
  ** R=send_to_smart_host T=remote_smtp: SMTP error from remote mail server after MAIL FROM:<myultrat@${lc:${domain:$h_from:}}> SIZE=2182: host []: 550 5.1.0 <myultrat@${lc:${domain:$h_from:}}> SIZE=2182 invalid address
  cwd=/var/spool/exim 8 args: /usr/sbin/exim -v -t -oem -oi -f <> -E1WF2oO-0006mf-R9
  Error while reading message with no usable sender address (R=1WF2oO-0006mf-R9): at least one malformed recipient address: myultrat@${lc:${domain:$h_from:}} - domain missing or malformed
  Process failed (1) when writing error message to myultrat@${lc:${domain:$h_from:}} (frozen)

Open in new window

So something isn't set up correctly. What do I need to set up? I had a similar message when trying to send an email using webmail in cPanel for this domain.

the domain is

Here's some extra info:

exigrep /var/log/exim_mainlog
2014-02-16 08:10:41 1WF3Mf-0007GS-QY <= []:55868 P=esmtps X=TLSv1:RC4-SHA:128 S=1718 T="test" for
2014-02-16 08:10:41 1WF3Mf-0007GS-QY => test <> R=virtual_user T=virtual_userdelivery
2014-02-16 08:10:41 1WF3Mf-0007GS-QY Completed

root@ip-184-168-116-73 [~]# cat /etc/resolv.conf

Open in new window

Much thanks for your help in advance<><
Question by:Victor Kimura

Expert Comment

ID: 39863571
cPanel changes many configuration files for exim.

One of the changes is change the sender name.

It's using a template: myultrat@${lc:${domain:$h_from:}} (probably username@...) but it can't get the domain name for some reason.

I know that with cPanel there are several options for config files rebuilding.

If the problem persists, upload a copy of your exim config files.

Author Comment

by:Victor Kimura
ID: 39863705
Hi YoavZ,

Thank you for that good information.

I can see the exim options in the WHM->Exim Configuration Manager->Advanced Editor tab. But you probably mean upload and manually configure, correct?

I don't have a working copy of the exim config files. Where are the exim config files that I should look for? Do you have some good examples of files and what to change? I'm still a bit new to exim.

thank you.
LVL 13

Expert Comment

ID: 39864438
Do you have CSF installed ? if yes just try once with #csf -x and try to send the mails.


Author Comment

by:Victor Kimura
ID: 39864603
I don't think I have it. When I'm in WHM->Manage Plugins I don't see it.
LVL 13

Expert Comment

ID: 39864611
while looking for error msgs you are getting i can say it is like exim sender verification and few more settings which can be modify in tweak settings.

Pls check once.


Author Comment

by:Victor Kimura
ID: 39864846
You mean like SPF (Sender Policy Framework) and Domain Keys? I can show you what I have in my DNS. Is it safe to send all that information here publicly?
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 13

Expert Comment

ID: 39864954
yes, same as those, its purely safe to put content here but i suggest to remove hostname and IP's while putting anything here.

I am more concern about Tweak settings of mail.


Author Comment

by:Victor Kimura
ID: 39865368
Ok, thanks. Here is a snapshot of my DNS settings. I'm not quite sure what is wrong. This is the settings for the

The second snapshot is the DNS settings for another domain on the same VPS server. I have set up SPF and am using as the external send out. However, the external SMTP is used for sending out bulk emails for email marketing. I don't use it for normal email send outs.

I haven't got the SMTP server to work for any domain on this VPS. Even when I try via cPanel using the web mail. See the third screenshot. The Identity in the 3rd photo looks malformed. So some setting I'm thinking is misconfigured.

Thanks for your help. =)

Accepted Solution

Victor Kimura earned 0 total points
ID: 39869404
It's figured out. Praise the Lord!

I called the VPS tech and he tried and changed the setting from Dovecot to Courier and then it worked! =)

Author Closing Comment

by:Victor Kimura
ID: 39880403
Changing from Dovecot to Courier in WHM solved it. =)
LVL 34

Expert Comment

ID: 40243794
I know this is an old thread, but I just came across it. Since others might also come across it, I wanted to add my two cents here. Changing Dovecot to Courier is not going to solve SMTP issues. Those two programs have nothing to do with SMTP at all.

Changing Dovecot to Courier is like changing the person that sits behind the desk at the post office. They may have a different personality, but it doesn't change the delivery of inbound or outbound messages. It just changes who you're talking to when you want to get your mail. Courier and Dovecot both simply provide a way for email clients to retrieve existing messages from a mailbox.

If SMTP started working after that change, my guess is that there was an unrelated change that may have happened at the same time that actually did fix the problem. It's like deciding to get a new car one day and your dinner just happens to taste fantastic that same day. They don't have anything to do with each other - they just happened to be in a similar timeframe.

Author Comment

by:Victor Kimura
ID: 40245150
Perhaps, then because it's WHM/cPanel then maybe changing it in WHM from Dovecot to Courier changes some additional settings that made the SMTP work. That'll be my guess.

Thanks, gr8gonzo, for that insight.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Mint 18 31 76
Error installing extension Linux 4 59
Linux hostname change 2 54
Ubunto LTS Server 16.04 for Intel Processors 2 21
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now