Re: [Exim] rewriting rules

Etusivu
Poista viesti
Vastaa
Lähettäjä: Marc MERLIN
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] rewriting rules
On Thu, Aug 31, 2000 at 02:21:21AM +0300, Vadim Vygonets wrote:
> Ah, I got it.
>
> *@@    ${lookup{$1}lsearch{/etc/mail/localadds}{$1@???}fail}    T


Holly crap, this actually works!
Thank you, thank you, thank you :-)

(That's probably the last place where I would have expected '@' to work)

> Or, better yet, combine the three rules by _not_ rewriting what
> you don't need:
>
> *@@    ${lookup{$1}lsearch{/etc/mail/localadds}{$0}{$1@???}}    T
> *@@    $1@???                            Fh


My initial rule was buggy, but I think I got it right, now, thanks to you:

# We want to make sure we don't do any local deliveries, so we rewrite all
# the local Email to valinux.com, except for a few known mailboxes

# We want some receipients to stay local (to use the local /etc/aliases)
*@@     ${lookup{$1}lsearch{/etc/mail/localadds}{$0}{$1@???}}   Tt


# We need to make the internal hostname disappear because we don't want answers
# to come back to the machine or bounce because the hostname isn't resolvable
# outside of VA.
# As for addresses that aren't in /etc/mail/localadds, everything gets rewritten
*@@    $1@???                            Fbcfrs



Again, thanks a lot, that really helps.
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking

Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@??? for PGP key and other contact information