Re: [Exim] PCRE regex

Top Page
Delete this message
Reply to this message
Author: Oliver Eikemeier
Date:  
To: Michael Jakscht, exim-users
Subject: Re: [Exim] PCRE regex
This is a cryptographically signed message in MIME format.
--
Hey, fun with regular expressions...

Michael Jakscht wrote:

> with some notes5-addresses we have a problem here (mostly addresses with
> german umlauts).
> I want to rewrite some notes stuff into a normal internet e-mail-address.
> At the start I'm trying to get this done via regexp's and I'm experiencing
> one problem.
>
> The "source" notes5 broken address is a kind of the following:
>
> User_Name/InfoTL.RZV@???
>
> I want to rewrite it with exim via regexp's into an address such as the
> following:
>
> user.name@???


Ok, what do you want? A rule for exim to rewrite the addresses
on-the-fly or a tool to convert a list of addresses to a different format?

If you want to rewrite the adresses with exim you can try:

\N^([^_/]+)_([^_/]+)/InfoTL\.RZV@???$\N $1.$2@??? Eh

somewhere in the rewrite section (*after* 'begin rewrite'). The quoting
is explained in

<http://exim.work.de/exim-html-4.10/doc/html/spec_11.html#SECT11.1>

The Flags 'Eh' may *not* be what you want, see

<http://exim.work.de/exim-html-4.10/doc/html/spec_30.html#SECT30.9>

and you can test the rule with

exim -brw User_Name/InfoTL.RZV@???

What these rules do *not* do is:

- converting upper case letters into lower case (i.e.
User_Name/InfoTL.RZV@??? gets User.Name@???, *not* user.name@???)
- handle umlauts

Greetings
     Oliver
--
Content-Description: S/MIME Cryptographic Signature


[ smime.p7s of type application/x-pkcs7-signature deleted ]
--