Mail sent using php mail() function does not properly send

Hi again,

I’ve got a few wordpress sites setup on several virtualmin domains. These domains are located with Godaddy, and I’ve pointed the @ field in the zone file, to my new VPS IP.

The sites all work perfectly, except for the contact forms that use wp_mail() or php’s mail() function. The email accounts are all on Godaddy’s servers, and it seems that Virtualmin is trying to use Postfix Mail Server to send any php mail. The accounts all work if you send from an external mail client like just typing it into Gmail or something. However, if you try to send to the same address with the php mail function from a form it gets hung up in the server. Below are a couple attachments showing the error message saved in the mailboxes on the VPS server from Postfix.

How can I configure the server to just forward the mail out to the big internet and not mess around with these mail servers?

I went and unchecked the Mailman for domain enabled feature, as well as the spam filter, virus filter, and mailman lists on the domain I’m using to test with, and it’s still giving the same issues. Any ideas how I can essentially get the server to ignore email and just get it sent out to the go daddy email I already have set up?


added picture attachment


Hmm, is the “Mail for Domain” feature enabled for these domains?

If Mail for Domain is enabled, it would try to deliver the messages locally, rather than having them go out onto the Internet.

You can set that in Edit Virtual Server -> Enabled Features.


Hi Eric,

The virtual servers were originally set up with Mail for Domain enabled, but I’ve disabled it and all the other dependencies (spam, virus, mailman) and the same issue with mail not sending is happening. The front end of the site is definitely working because the emails get sent into the mailbox for that virtual server that I can see if I look at the mailboxes from webmin, and they each have that same error that whatever email it’s trying to send to (this occurs on any site on the server), “User unknown in virtual alias table”.

Any more thoughts?



What is your system’s hostname?

You can determine that by running the “hostname” command.

Also, what output do you receive when running this command:

grep antiquesnuffboxes /etc/postfix/virtual

Hi Eric,

The hostname is:

the grep command did not return anything.

It seems the mail makes it to the queue in the postfix server, but can’t get through, see attached image of the queue

Hi Eric,

It seems from reading some things like this might be an issue with the smtp relay server. Where in virtualmin can I edit that or see what the server is set to?


Also here is the current config page in the postfix server