Postfix Loopback Only setup not working...sometimes

Ubuntu 16.04

Postfix

Multiple WordPress websites

I have spent a lot of time on this and it is really slaying me. I am trying to use Postfix as a send only solution for WordPress contact form fills.

I have the main.cf set-up to the postfix loopback only specifications. My server hostname is (I think) a properly set up FQDN.

With the current configurations when I set everything up and tested the form fill, I immediately received the emails, everything worked as it should. I had a friend try both from his home, both worked. I tried from my mobile phone, turned off WiFi, that worked as well.

The problem is, I tried again the next day from my browser - private mode, regular, multiple different browsers - and nothing is sending. I had a different friend try, and again, nothing received.

I am not really sure what could be causing this. A slightly separate problem, but relevant here: I don't seem to have a mail.logs and have not been able to figure out how to get that set up either.

I can't figure out why it would work and then not work? Something I investigated was perhaps WordPress was timing out the request to my server after a certain length of time. I dove into the mail PHP and from what I could tell, the standard configuration is 5 minutes for this. Where else could the mail be getting lost?

1 Reply

/var/log/mail.log should exist on all Debian based systems. If it doesn't, check your syslog configuration and restart it. Without it, you will not be able to debug Postfix.

Check the postfix process is actually running.

Test remote delivery with mail -s "test" some@mail.address.com < /dev/null, and see in the log what happens.

Verify that postfix smtp is working by telnetting into localhost port 25. If the connection does not success or Postfix SMTP banner does not appear, something is wrong.

If you can deliver successfully outside of Wordpress, chances are it is a PHP/wordpress problem.

I highly suggest not to run local MTAs for website submission only. Mail servers require proper configuration on several levels to function correctly and if that is not done you are very likely to experience delivery problems, especially to free mail services such as hotmail and gmail. Instead, have websites use a third party SMTP authenticated delivery.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct