Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently got a request from my boss, essentially he needs this:

Clients will send email to a,

a. Dispatch emails from clients to agents according to some rule, like:

  1. Forward emails from to
  2. Forward emails containing word "cat" to
  3. Forward emails which subject contain some word to
  4. Forward any email to to
  5. agents can send internal emails to each other
  6. Keep an copy of all incoming and outgoing emails on the mail server

b. While hiding the email address of clients. i.e. agent1, agent2, agent3 have no idea where the emails coming from(can only see Where they can simply reply to the email then the reply will be forwarded to the right client, masking agents' emails address, so the clients only see the email is coming from

Then he need some content filtering of the incoming and outgoing emails, best using regex, to replace or delete certain contents in emails. Say some email contain a SIN number then it will be replaced with "***".

I would imaging it will be possible using some certain kinds of mail server? or some email "proxy"? I tried some keywords like "email routing" "email proxy" and "mail server" on google but didn't find anything do what boss want. Please give me some pointer on what softwares to look at.

share|improve this question
It's not difficult to do, depending on what type of mail system you are running on or looking to use. Can you give us some details as to your email environment? – Rilindo Sep 30 '11 at 18:22
Depending on what you're really trying to do, this is either called an issue tracker or a double blind email system. – Alex Holst Sep 30 '11 at 19:10
@Rilindo Our email system is currently hosted at Google Apps. As you see boss want some control over the mail system and it's basically an overhaul. Currently enterprise network is Windows server 2003 based, so I guess I need to set up my own mx server. – xbtsw Oct 1 '11 at 1:57
up vote 1 down vote accepted

Email server are designed to transport mails. It is not their job to manipulate mails. So you will not find any mailserver that has this functionality out-of-the-box.

Some servers provide the possibility to integrate plug-ins for mail manipulations. So for example Postfix, Exim or Sendmail can integrate software like MIMEdefang, procmail or sieve to do manipulation/filtering. It is up to you to integrate them and do the mapping between public and scrambled addresses in a lookup-database.

But I don't think that this will satisfy your need. Think of a mail with a signature "John Doe, Head of Human Resources, Oceanic Airlines". Does your approach hide the identity of the sender?

share|improve this answer
I don't think you would need a plugin to do what he is asking with EXIM, most of the things he described could be done with a filter and standard exim configuration. But building the filters would be an extreme PITA. – Zoredache Sep 30 '11 at 19:07
@Zoredache Yes. Exim is powerful for this problem and can do it on it's own. The scripting language is said to be Turing complete. But other MTAs need additional software and my list of MTAs and add-ons was not meant to be complete. – mailq Sep 30 '11 at 19:13
@mailq Thanks for the great info. Yes boss is trying to hide the identity of client from agent and vice versa. But his business model is too deeply integrated with emails thus can't made clients fill up a form on our website or similar. What do you suggest the best practise achieving that? – xbtsw Oct 1 '11 at 2:19
@xbtsw You have to do it manually. It's a hell of work. And as Zoredache recommends use Exim and it's powerful scripting language. Good luck. But before starting I would give you the advice to deeply think about that. Hiding the address does not hide the identity. – mailq Oct 1 '11 at 7:57

Your Answer


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.