Re: [exim] need to rewrite _ characters in MAIL FROM domain …

Top Page
Delete this message
Reply to this message
Author: Dave Lugo
Date:  
To: exim-users
Subject: Re: [exim] need to rewrite _ characters in MAIL FROM domain part
On Tue, 22 Nov 2011, Todd Lyons wrote:
>
> On Tue, Nov 22, 2011 at 7:24 AM, Todd Lyons <tlyons@???> wrote:
>>
>> CentOS56[root@ivwm51 ~]# grep example.com /etc/exim/exim_TEST.conf
>> \N^<?(.*)@.*_.*.example.com>?$\N    $1@???        SF
>
> Oops, make sure to escape the dot before "example.com" :
>
> CentOS56[root@ivwm51 ~]# grep example.com /etc/exim/exim_TEST.conf
> \N^<?(.*)@.*_.*\.example.com>?$\N    $1@???        SF

>


Followup..

had to add (?i) after the ^ :

\N^(?i)<?(.*)@.*_.*\.example.com>?$\N    $1@???        SF


Section 31.5 states:

Domains in patterns should be given in lower case. Local parts in patterns
are case-sensitive. If you want to do case-insensitive matching of local
parts, you can use a regular expression that starts with ^(?i).


Per the above, it sounds like the domain part of a pattern isn't
case-sensitive, but my testing shows it is. Passing:

asd@asd_asd@???

... fails to match the pattern.

Deficiency in docs with regards to the domain part in a pattern, or
deficiency in the exim code? Dunno which. Adding the case-insensitive
bits to the pattern lets it match both lower and upper case domain
variants.


-- 
--------------------------------------------------------
  Dave Lugo     dlugo@???      No spam, thanks.
  Are you the police?  . . .  No ma'am, we're sysadmins.
--------------------------------------------------------