Email problem

Hello,

I’ve just had a server die that was running Virtualmin, so I deployed the server in pretty much the same fashion as the old one. However there is something odd this time with emails.

One of the scripts I wrote would happily send emails out to my gmail account but not to any email addresses that were hosted on the server.

I suspect Postfix is attempting local delivery of the emails and simply throwing them on the floor somewhere. I performed a yum erase postfix and sendmail delivers the emails fine. However, try using Virtualmin to set up the Virtual hosts and it needs postfix installed.

Can someone advise how to either get virtualmin to work without postfix or to get postfix to not locally deliver any emails and behave like sendmail?

Thanks in advance,

John

Howdy,

You may want to take a peek in the email logs, either /var/log/maillog or /var/log/mail.log, whenever trying to send a message. You can use that to track down what’s going on.

Also, if there’s any glaring configuration issues, they may show up when going into Virtualmin, and running System Settings -> Re-Check Config.

-Eric

With Sendmail, it simply sends to the MX record of the domain. Postfix attempts local delivery and fails miserably, here is an example:

Jul 3 10:19:00 IS-07088 postfix/pickup[5912]: 3C89C618042B: uid=48 from=
Jul 3 10:19:00 IS-07088 postfix/cleanup[8867]: 3C89C618042B: message-id=59bfb284448987dfc2fbcb0210ba6075@domain.com
Jul 3 10:19:00 IS-07088 postfix/qmgr[25830]: 3C89C618042B: from=apache@www.domain.com, size=1442, nrcpt=1 (queue active)
Jul 3 10:19:00 IS-07088 postfix/local[8869]: 3C89C618042B: to=production@domain.com, relay=local, delay=0.05, delays=0.04/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: “production”)
Jul 3 10:19:00 IS-07088 postfix/cleanup[8867]: 42E1B6180434: message-id=20110703091900.42E1B6180434@www.domain.com
Jul 3 10:19:00 IS-07088 postfix/qmgr[25830]: 42E1B6180434: from=<>, size=3405, nrcpt=1 (queue active)
Jul 3 10:19:00 IS-07088 postfix/bounce[8870]: 3C89C618042B: sender non-delivery notification: 42E1B6180434
Jul 3 10:19:00 IS-07088 postfix/qmgr[25830]: 3C89C618042B: removed
Jul 3 10:19:00 IS-07088 postfix/local[8869]: 42E1B6180434: to=root@www.domain.com, orig_to=apache@www.domain.com, relay=local, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Jul 3 10:19:00 IS-07088 postfix/qmgr[25830]: 42E1B6180434: removed

I basically need postfix to do what Sendmail would do. If I yum erase postfix and restart sendmail it will deliver perfectly well.

I’m using the GPL version 3.86 with Webmin 1.550

Best,

John

I think I’ve found the solution though, in /etc/postfix/master.cf I commented out local and restarted and it seems to ignore local delivery now.

Howdy,

So are you saying that the MX record for one particular domain points to an external server?

If that’s the case, you would need to uncheck the “Mail for Domain” feature in “Edit Virtual Server”.

When that is set, that means Postfix is configured to deliver email locally.

It only works on Sendmail, because Virtualmin wasn’t configured to use Sendmail when the Virtual Server was added.

But, if a particular domain doesn’t have local email addresses – you’d want to disable the Mail for Domain feature… once you do that, email should go through correctly.

-Eric