From: David Ehle [mailto:eh...@agni.phys.iit.edu]
I am trying to consolidate multiple mail servers w/ assort MTAs to
one established mail serverr with Courier-MTA. Moving mail from mbox
format went beautifully with mb2mb, but now I have run into a
stumper.
Since most of the machines I am conslidating were small user run
systems, there were a number of cases where bad usernames were
chosen - joe, john ect. As I consolidate it looks like there will be
a number of overlapping usernames. The main server has a good
username policy, but I want to be able to switch over mail delivery
with minimal interrruption and without my users having to send out a
warning to all their contacts that their email has changed, so I
need to be able to re-reoute
jo...@domain0.com to jsmi...@primemail.ex.com
and jo...@domain2.com to jjon...@primemail.ex.com
I think the solution is to use maildrop with a filter but it looks
like a pretty steep learning curve on the maildrop filter scripting
language.
Has any one run into a similar situation?
I thouht that it would be as simple as doing a .mailfilter that
looked like this:
if ( /^To: john@old.domain/)
{
to "/home/jsmith/Maildir"
}
But when I test it as a .mailfilter in a testing account it appears
that since the user doesn't have write access to the other users
Maildir it just deffers delivery. (tried it with both suid and guid
for maildrop)
I don't want to put it in maildroprc till i'm sure all is working
correctly for fear that I could mess up ALL my delivery ;)
Is there an easy way to bounce or otherwise redirect the mail?
something like
to | mail jsmith@localhost
but I'm just not sure.
Thanks for any suggestions! Just trying to avoid re-inventing the
wheel.
Have you looked into using aliases?
Add a file to /etc/courier/aliases with a line like:
john@old.domain: jsmi...@primemail.ex.com
The substitution will happen at the beginning of the delivery and so
the message will go through all of the normal filtering that jsmith01
would get.
Bowie