-1

i have a debian vps with webmin,

The TLD for the server has its MX pointing to a different server,

I would like it so any mail generated locally, say by the shopping cart would be relayed/forwarded onto the third party mail server,

While a few chosen address's say those with user accounts/mail boxes like root and postmaster would have their mail delivered locally.

Is this possible, how ?

thanks, Hayden.

Hayden Thring
  • 147
  • 14
  • You want SOME email addresses in the TLD to be delivered locally, do not you? Is the TLD on the list of local email doamins? `echo '$=w' | sendmail -bt` – AnFi Jul 08 '13 at 13:44

1 Answers1

0

For local delivery add an alias in /etc/aliases to the user-id prefixed with real-, for example:

john:   real-john

root should already be aliased to a local user-id. Configure it as above or alias it to a different user.

For delivery to a relay server configure your mail server to use a smarthost, and specify the desired server as the smarthost.

Typically, Debian will use exim4 or postfix rather than sendmail. exim4 should already be configured for the above to work. I believe postfix is also configured similarly. The real- prefix is used internally to deliver some failure notices, and is available for other uses, such as yours.

BillThor
  • 27,354
  • 3
  • 35
  • 69