regexp for rewrite at SMTP time (was: RE: [Exim] rewrite que…

Top Page
Delete this message
Reply to this message
Author: Wouter Bakker
Date:  
To: Exim \(E-mail\)
Old-Topics: RE: [Exim] rewrite question
Subject: regexp for rewrite at SMTP time (was: RE: [Exim] rewrite question)
> Chris had an idea:
>
> >
> > Possibly multiple solutions, but one could be using a
> > virtualhost file ...
> >
> > e.g.
> >
> > /etc/exim/virtuals/mydomain.net containing
> > ---
> > nickname    john
> > john        othernick
> > ---
> > [ first]    [second]

> >
> > Will get ya: [first]@mydomain.net, put into local mailbox [second]
> >
> > router to use:
> > ---
> > virtualdomains:
> >   driver                = redirect
> >   domains               = dsearch;/etc/exim/virtuals
> >   data                  =
> > ${lookup{$local_part}lsearch*@{/etc/exim/virtuals/$domain}}
> >   pipe_transport        = address_pipe
> >   no_more
> > ---

> >
> > bye,
> > Chris
> >
> unfortunately, this causes a double rewrite as all mail to
> both aliases now
> ends up in one users' mailbox (othernick). the one_time
> option does not come
> to the rescue and the no_more option cannot be used as all
> other mail to the
> domain is no longer processed :(
>
> After reading some more of Philip Hazel's work, I figure that
> an SMTP time
> rewrite of only one of the nicknames could help me out; I do
> not, however,
> understand how to write such a line;
>
> john@??? othernick@??? STtcb
>
> does'nt work... HEEEEELP!
>
> TIA, Wouter.
>


I solved my problem by adding another nickname-local-user; one alias ends up
at one nick; the other alias at the other nick. done. as simple as that.
(why did I not think of that before?).

However; I'm still wondering what syntax to use for an SMTP time rewrite
that does:

<if you encounter john@???> <replace with othernick@???>
STtcb

anyone?

greetz, Wouter.