Dest-dependent source rewrite?

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Dr. Rich Artym
Fecha:  
A: exim-users
Cc: rich
Asunto: Dest-dependent source rewrite?
Question: How can I do a rewrite of one header line in a manner that is
dependent on the content of another header line? The specific problem
that I'm trying to address is to rewrite local domain names in outgoing
mail to names that correspond to the domain into which the mail is being
sent, for hosts that are multihomed into several domains and therefore
do not have any single "primary" domain. In such circumstances, the
domains specified in From_ and From: lines are more often wrong than
right, and unfortunately not all user mailers set the Reply-To: sensibly.
In any event, one shouldn't have to rely on users to set this correctly,
especially when they don't have control over most of their header lines.

Routers are ideally placed to trigger the rewriting, since typically
there would be a router dedicated to delivering into each of the home
target domains. This suggests that perhaps such functionality could
be implemented by allowing a router to set a boolean variable which
can then enable the matching against the regular expression in a
rewrite rule, in one of two ways: either by extending the regular
expression syntax to allow an enabling boolean to be specified, or
by extending the rewrite flags syntax (much easier!). For example,
the string "bcfrF" in the rewrite example in spec.txt could appear as
"bcfrF&$xdomain", in which case "bcfrF" lines would be rewritten only
if variable $xdomain had been asserted by a driver. A more general
expression syntax in the flags field would be more elegant, but it's
probably not needed if drivers can be made to assert and negate vars
to enable and disable particular rewrite rules.

Comments, queries, suggestions?

Cheers,

Rich.
-- 
###########  Dr. Rich Artym  ================  PGP public key available
# galacta #  Email   : rich@???         158.152.156.137
# ->demon #  Web     : http://www.galacta.demon.co.uk  - temp page only
# ->ampr  #  AMPR    : rich@g7exm[.uk].ampr.org 44.131.164.1 BBS:GB7MSW
# ->NTS   #  Fun     : Unix, X, TCP/IP, kernel, O-O, C++, SoftEng, Nano
###########  More fun: Regional IP Coordinator Hertfordshire + N.London