Postfix & Google Apps

Problem: contact forms on websites (wordpress) do not get sent.

  • I do NOT use BIND (DNS is hosted externally).
  • /etc/postfix/virtual is empty
  • /etc/postfix/ does NOT have a myhostname entry
  • “mail for domain” is disabled on “features and plugins”

I believe I’ve done my homework… why cant the websites send mail?!



Yeah, it sounds like you correctly disabled mail and such… the next step would be to review your mail logs, and see what sort of error(s) are showing up in there.

The mail logs would be in either /var/log/maillog, or /var/log/mail.log, depending on your distro.

Try and send an email, then take a peek at those logs, and see what shows up in there.

You also may want to verify that there aren’t any Apache errors in $HOME/logs/error_log that may related to the emails not being sent.


apache shows no errors. postfix shows it is delivering emails generated by the system (cron, virtualmin etc) fine, but it doesnt show anything related to the website emails.

i am mostly using contact form 7 with wordpress. google apps + this wordpress setup/plugin worked fine under plesk.


Yeah, there’s quite a few Virtualmin users doing exactly what you’re trying – running WordPress and Google Apps, and have emails go to a remote server. Chances are there’s a configuration issue there somewhere, or perhaps a missing dependency.

So you successfully receive emails sent from cron and such? If so, you may want to dig into the setup of your particular form. You should always see a notice in the email logs whenever it’s attempting to send a message. If there isn’t one, that means no message ever got to Postfix.

You may want to review the settings for your form, and make sure there’s nothing in those settings that may be causing problems in sending those emails.


Web software often offers a configuration option which method of sending email to use. Like, a local Postfix (which has a sendmail compatible executable), the PHP mail function, or directly via SMTP. Check if that option matches what you wish to do. E.g. if it’s configured to use PHP mail, then Apache’s error log might contain some info about problems.

it turns out the problem IS with contact form 7, a wordpress plugin. just FYI, this plugin uses the wp_mail() function, which is basically an implementation of php-mailer. it wasnt working because it just got stuck on submission. i am now using another contact form plugin.

thanks locutus and andrey!