Can't email my own domain using php mail()

I've got a form that uses PHP's mail() function to send emails. The function works fine as I can send emails to various domains, providing it's not the domain of the website itself.

I did the default install of postfix (I'm a n00b and all about hitting "Next" on installs), then I went through these steps to install msmtprc. It's still sending to other domains fine, but still not to my domain.

I'm using Google Apps, in case that matters. And sending to the address in question works fine if I send it from normal mail client.

Any help much appreciated,


2 Replies

Make your your domain isn't in the "mydestination" option in /etc/postfix/

Thanks obs, that worked.



Please enter an answer

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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct