[CentOS] Rewriting outgoing email addresses

Thu Apr 28 12:17:59 UTC 2005
Lee W <centos-list at unassemble.co.uk>

Hi Everyone,

I have a query which I hope others may find interesting as well.

The company that I work for has users that subscribe to many different 
mailing lists for marketting and informational purposes.

What I would like to be able to do is centrally manage this internally 
so that only one copy of the message is received regardless of the 
number of people subscribed to each list which we can then either 
deliver the message internally to anyone interested or via public 
folders on Cyrus IMAP/MS Exchange.

The second thing I would like to be able to do is allow people to send 
to the appropriate list but for their email address to be rewritten to 
that of the registered email address of the list therefore everyone in 
the company who is subscribed to the list gets the replies.

I am guessing that the following steps would have to be done:-

* Setup an internal email account for each list (e.g. 
centos-list at companya.com)
* Configure sendmail to either forward the message onto the exchange 
server and store in public folders or use filtering rules to deliver it 
to the appropriate Cyrus mailbox.
* Maintain a list of all mailing lists subscribed to and have sendmail 
rewrite the from headers if anyone tries to send a message to one of the 
registered list addresses.

I'm sure I've forgotten things here but I haven't got a clue how to set 
this up.  Is this possible using the included programs with Centos 
(Sendmail, Cyrus IMAP, procmail)?

As a second query but still related is it possible for sendmail to 
rewrite incoming email addresses? At the company we have various 
addresses in the format of firstname.surname.ext at company.com (where ext 
could be support or devel, etc).  At present we setup distribution lists 
on exchange for everyone of these addresses for every user and it is 
becoming a management nightmare.  What I would like to be able to do is 
for sendmail to notice this double-dot format and based on the ext bit 
to forward it onto the appropriate user as well as the relevent catch 
all address (i.e. send to firstname.surname at company.com and then also 
send to ext at company.com).

Sorry if this is a bit long winded but hopefully I've explained clearly 
enough for someone to offer some insight

Thanks in advance