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

Etusivu
Poista viesti
Vastaa
Lähettäjä: Dave Lugo
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] need to rewrite _ characters in MAIL FROM domain part
On Tue, 22 Nov 2011, Dave Lugo wrote:
>
> eg:
>
> user@???_asd_asd.example.com ---> user@???
>
> But trying to go with this:
>
> \N^(.*)@*_*.example.com(.*)$\N    $1@???$4        SF

>
> yields:
>
> [root@ews-pgh1-exmp2 exim]# /usr/sbin/exim -C exim.conf.tst -brw
> user@???_asd_asd.example.com
> 2011-11-22 09:34:00 Rewrite of user@???_asd_asd.example.com yielded
> unparseable address: malformed address: _asd_asd@??? may not follow
> user@??? in address user@???_asd_asd@???
> Syntax error in user@???_asd_asd.example.com
> Malformed address: _asd_asd.example.com may not follow user@???
>
> adding Rq to the rewrite flags didn't help.
>
> Suggestions gratefully appreciated...
>


closer...

\N^(.*)@.*_.*\.example.com(.*)$\N    $1@???$4        SF


works, but not very well - depending on whether or not the sender
correctly uses < > characters, it breaks.

Ideas? Should i break this out into multiple rewrite lines?

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