On Tue, 22 Nov 2011, Dave Lugo wrote:
>
> Hi,
>
> I seem to have some apps that are sending with a underscore in
> the domain part. Searching the exim-user archives suggests that
> I can work around this by rewriting the MAIL FROM address,
> replacing the domain part _ chars with . chars.
>
> Can anyone offer a rewrite rule that will do this? I'm going
> to try to figure it out myself now, but for someone more versed
> in rewriting rules, this may be trivial.
>
> Thanks,
>
> Dave
>
I decided to try to be simple - any MAIL FROM with a domain part
ending in example.com, that is preceeded by an element containing
an underscore, gets replaced with example.com.
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...
--
--------------------------------------------------------
Dave Lugo dlugo@??? No spam, thanks.
Are you the police? . . . No ma'am, we're sysadmins.
--------------------------------------------------------