Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've set up a simple email server with exim that I use for various tasks, such as sending myself reminders. Is there a file that has a similar functionality to /etc/aliases but only for one user instead of system wide (just like a contact list)? I looked at ~/.foreward, but that only seems to work for mail coming in, forewarding it.

share|improve this question

2 Answers 2

There is not an easy solution such as the aliases file as far as I know. But exim is very flexible. If your users submit email through authentication (port 587 using TLS ought to be the default) you have a way of making sure which user is submitting email. You can then write rules to select the outgoing email address and rewrite it into something else based on which user submits email, you can even compare the outgoing address against a list of addresses in a file, say in the user's $HOME.

How to write these rules I leave as an exercise to the reader (or the next one writing an answer), there are many ways to go about it.

But take a look in /etc/exim4/update-exim4.conf.conf especially the transport and rewrite sections.

share|improve this answer

A few options:

  • Use procmail for delivery. procmail has a lot of power not only to deliver mail based on delivered-to address, but Subject, Sender, content, and pretty well anything in the headers and/or body.
  • Look at the capabilities available with suffixes and/or prefixes. You might need one of the other options if your mail user agent can't sort the mail for you.
  • Look at the current aliases router. You could modify a copy to use an aliases or .aliases file in the home directory. Also look at the settings for virtual servers. (You basically are looking at a personal virtual domain, although the specification might be a little different.
  • Look at what your mail user agent can do for you. Thundebird has some pretty powerful capabilities. (Although these solutions would depend on the MUA running to be effective.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.