On I wrote Mail forwarding smtp server, on the subject of LazyWeb.
Qmail is in Debian, but is non-free. It's a pain to update from within apt, because it's only shipped as source; so, you need to recompile it yourself each time there's an update.
Postfix is pretty easy to learn to configure, if you did want a full-fledged mail server.
However, 'apt-cache search mail-transport-agent' lists all the mail servers in Debian, and a few of them (nullmailer, nbsmtp, ssmtp) might do what you want.
(Personally, I think it might be easier to brush up on Postfix. The Debian package even does most of the configuration for you.)
I did this some time ago, with Exim4 and Debian -- it's pretty straightforward -- simply run:
dpkg-reconfigure exim4-config
And choose to split the config in several files. Create the file ``/etc/exim4/conf.d/router/350_exim4-config_vdom_aliases`` with the following content:
vdom_aliases:
driver = redirect
allow_defer
allow_fail
domains = dsearch;/etc/exim4/virtual
data = ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual/$domain}}}
retry_use_local_part
pipe_transport = address_pipe
file_transport = address_file
no_more
Now create the directory ``/etc/exim4/virtual/``. This is where you put your redirectors. Create a file, say, ``example.com`` with the content:
* : your-address@gmail.com
And everything to ``example.com`` will go to your Gmail.
Sil, I uploaded the file to:
dealmeida.net/public/350_exim4-config_vdom_aliases
Since the formatting is broken in my comment.
When I got a bytemark server I wanted to host a mail server and looked around for the easiest way. I thought Hula would fit this case but it wouldn't work even when using the up-to-date repos from them. I ended up using this 'How to': http://flurdy.com/docs/postfix/ and I now have a working mail server using MySQL to use as the background. It was quite daunting to setup a mail server when you've never done anything like it before, but it works so I seemingly haven't messed it up.
Greg
Yes, postfix is the way to go. The docs are mostly sane and generally have examples for want you want to do. It also has enough features to do some fairly crackful mail processing that I haven't needed to look at exim yet.
[...] I was going to answer Stuart’s question to the Lazyweb in a quick comment, but I figured my email set up, while essentially not really special, is a bit peculiar and might be interesting to somebody out there. [...]
They're all lying. Have a look at Vexim which does this already. I use Vexim everywhere. You need MySQL, PHP, Pear and can add Clamav and Spamassassin trivially. You also need exim4-daemon-heavy for all the fancy shmancy ACLs and filtering, which is in the Debian repos. Someone was working on a Debian Vexim package but I'm not sure if was finished or apt-getable, besides the tarball isn't problem and I would prefer it.
You will want to dpkg-reconfigure exim4-config and have it a use single config file rather than all of the split files, then copy over Vexim's supplied Exim configure file and name it /etc/exim4/exim4.conf.template (whatever the existing exim config file is).
You might also want to change local_part_suffix = -* to local_part_suffix = +* if you use email addresses with hyphens in them. The rest is relatively simple, reasonably documented in the slightly outdated instructions and it gives you a web interface when it's all done. I can even help you if you get stuck. Add your domains as relay domains in the web interface and then Exim will do recipient verification to ask your primary MX if those users exist. Or add your domains as local domains in the web interface and then add users, forwards, catchalls and fails if necessary.
Well, maybe they're not lying about the Exim docs being a bit heavy, but you shouldn't need them. besides there's a Vexim mailing list and me for help. Don't blame me if you don't like it though.
metalu_123456
lilia
tina
ema
alin
tata
mama
I'd go for qmail, mostly because I like the way you configure it. (You'd need something like one line per domain in two dead-simple text files, and one .qmail-file per address, catch-all or not.)
Haven't checked if it's in debian, though, because I'm too lazy (and I've never used exim, so they could be equally confusing, for all I know). :)