I need to set up a CentOS 5.3 server to forward e-mails to another e-mail address. The server doesn't currently have any mail server software installed. What's the simplest way to do this? (aside setting up MX records for the domain)
(I'm aware I could just pick up any mailserver software and configure it to do this, I'd just like to know the simplest solution.)
As an alternative to setting up your own email server you may want to check with your Domain Name Registrar they often provide low cost email services that would let you do forwarding. A service such as Google Apps would also allow forwarding (and a bunch more) and is easy to setup.
Your milage of course may vary but I've always found the "simplest" servers to be the ones I don't have to setup.
How about a transparent proxy? Redirect all incoming port 25 on that machine to the machine of your choice.
You could also install somethin like nullmailer, it forwards local mails to a remote smarthost , if that's what you want to do.
If you need to do a little more work, i'd go for postfix or exim which both have A LOT of features :)
It looks like a very simple way to do this is to set up sendmail+esmtp and add a line to
/etc/aliases
. You can apparently forward to other e-mail addresses using that file. Don't forget to runnewaliases
after you edited the file.Will accept this as answer when I confirm it works, and if no one comes up with something better.