Question

I think the crux of this issue is that I'm a postfix neophyte, but here goes.

I'm using postfix's sendmail on a 1&1 VPS account to post messages from a webserver (through PHP; contact forms, password resets, etc.). It's working fine, except mail cannot be sent to the local domain. That is, if the host is example.com, any messages to x@example.com simply aren't delivered.

I've seen suggestions that this is due to the fact that the server recognizes that the mail is coming to itself, and shortcuts the outbound SMTP methods. Trouble is, we're using 1&1's email manager to assign forwarding addresses, so redirecting x@example.com to x's server account isn't good for our case (through the host's web interface, we can set x@example.com to forward to x@gmail.com, which is what we're doing).

Thanks for the help.

Was it helpful?

Solution

Besides not being clear about whether you're running postfix or sendmail (and you can't run both, it doesn't work), you also aren't clear about where you want "example.com"'s email to go.

If you want it delivered to local accounts on that machine, then you have to tell postfix (assuming you really are running postfix) that you're the end point delivery for example.com. You do that in the /etc/postfix/main.cf file. I forget the exact name of the option, but it's pretty obvious when you see it.

Then if you want specific addresses forwarded elsewhere, you can forward them in /etc/postfix/aliases (sometimes /etc/aliases, depending on the setup) or /etc/postfix/virtual. Don't forget to run "postmap /etc/postfix/aliases; postfix reload" after updating that file.

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top