Discussion:
[exim] Selecting rewriting flags based on a condition
Jeremy Harris
2018-01-11 21:37:16 UTC
Permalink
I'd like to rewrite both Envelope and header addresses if the connection is
from an on-site IP address, but only the Envelope otherwise.
Since you have adopted the Mortal Sin (per Chapter 31, Section 1)...
I assumed I could just change the Eh flags to something like
${if match_ip{$sender_host_address}{144.32.0.0/16} {Eh} {E}}
But
So it looks like that whilst the pattern and replacement strings are
expanded the flags aren't. (The documentation says that the pattern and
replacement strings are expanded, but doesn't mention this for the flags.
I'd lived in hope! :-)
Does anyone know a way (ideally simple/elegant!) of achieving this
selective rewriting?
Two separate rewrite rules; for E and h. Make the latter have a pattern
which expands to something that will only match for an on-site source;
never for off-site.
--
Cheers,
Jeremy
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Continue reading on narkive:
Loading...