Disabling local relays.
to=<email@example.com>, relay=none, delay=0.16, delays=0.08/0/0/0.08, dsn=5.0.0, status=bounced (User unknown in virtual alias table)
The postfix server is not sending mail right. I just moved my site to this server this morning, not expecting any email issues. We use google apps for email, so there need not be any virtual alias. All this server needs to do is send an email from a script. If the email is hotmail, gmail, anything but my domains on the server, it works fine. I can not find an option to disable local relay. This really needs to be fixed, because delivery to these domains is all this script is for. Can anyone help me configure postfix? I am so frustrated and discouraged, and my boss is pissed. Someone please help, I need to make it so there are NO virtual aliases. I tried emptying the file 'virtual' in the postfix /etc directory but it does nothing.
[edited by: jatar_k at 6:52 pm (utc) on Feb 18, 2010]
[edit reason] please use example.com [/edit]
afaik, sending mail from a script (e.g. php) will use sendmail, not postfix. perhaps look there?
On a linux system the installed mail transfer agent will be used for sending mail. This is sendmail on many systems, but can also be postfix, qmail or another package.
If I understand the question, Postfix handles outbound emails correctly as long as they have to be delivered to "foreign" domain names, but it tries to deliver emails with known domainnames to your local server, where you would like to have them delivered to Google Apps instead.
The problem here might be the confusion in Postfix between the virtual alias table, and virtual domain list. The virtual alias table is a list of email addresses and where they should be delivered, virtual domains are the domains that should be treated as local domains. If you empty the aliases list, Postfix won't know which email address matches to which user anymore, but as long as your domains are listed as virtual domains, it still will try to deliver messages locally. Because it has no translation list from email addresses to mailboxes, these deliveries will fail.
You should look in your configuration file for the $virtual_mailbox_domains parameter, and remove all domains which should be forwarded to Google Apps instead of delivered locally.
A detailed but somewhat technical explanation of the processing of virtual addresses in Postfix can be found here [postfix.org].