Emails sent by the Contact Form 7 is sent but not arriving.

December 4, 2014 2.2k views

Emails sent by the Contact Form 7 is sent but not arriving.

8 Answers

Check your MTA logs.

  • Hello!
    Dec 4 11:43:32 grandvista postfix/pickup[6915]: 8000D61F8C: uid=33 from=<www-data>
    Dec 4 11:43:32 grandvista postfix/cleanup[6943]: 8000D61F8C: message-id=ed2c67e930e3125ddc8183dc5108a9b5@
    Dec 4 11:43:32 grandvista postfix/qmgr[6916]: 8000D61F8C: from=www-data@localhost, size=844, nrcpt=1 (queue active)

I have this same problem but not sure how to fix it or even check MTA logs.

  • Do you have an MTA installed? The most common ones are exim, postfix, and sendmail, so we can check if there are any running processes with these names:

    sudo ps wwaux | grep -E "(exim|postfix|sendmail)"

    If that outputs any of exim, postfix, and sendmail, then you already have one installed. exim uses /var/log/exim_mainlog while sendmail and postfix use /var/log/mail.err. To check the error logs, run the following command:

    sudo tail -40 path

    That should output the last 40 lines of the file path (replace path with the actual path above).

    Otherwise, you'll need to install one. I recommend installing Postfix:

    sudo apt-get install postfix

    After installing it, I suggest blocking external access to it as you're only going to be sending email from your droplet and not receiving email. Edit /etc/postfix/ and set inet_interfaces to loopback-only:

    inet_interfaces = loopback-only

    and finally, restart postfix:

    sudo service postfix restart
  • Thank you so much for responding. I did install postfix, checked the error log and got a few saying unqualified host name (znmedia2) and the latest saying Postfix mail system is not running.

    The reason why I'm not able to follow any other tutorials to find the correct Postfix configuration is I have multiple sites on one droplet so I can't just enter in a single domain name.

you have to install postfix to make it work.

Have another answer? Share your knowledge.