Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

address rewriting help

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


Paul.Walsh at bcu

Nov 25, 2009, 2:05 AM

Post #1 of 2 (497 views)
Permalink
address rewriting help

I'm afraid I'm a bit rusty with regards to rewriting and pattern matching. What I'm trying to do is rewrite the sender
address where the local part starts with either F or S followed by 8 digits, for example

S01234567 [at] example needs to be rewritten as S01234567 [at] another

I've tried the following rule

\N[fs]\d{8}\N [at] example $1 [at] another Ffrs

but it doesn't seem to match:

exim -d -C /usr/local/exim/conftest1 -brw S01234567 [at] example
trusted user
admin user
changed uid/gid: privilege not needed
uid=7000 gid=7000 pid=32384
auxiliary group list: 7000
user name "root" extracted from gecos field "root"
originator: uid=0 gid=0 login=root name=root
address match: subject=s01234567 [at] example pattern=[fs]\d{8}@example.com
s01234567 [at] example in "[fs]\d{8}@example.com"? no (end of list)

I'm obviously missing something somewhere. Could someone point me in the right direction (I've already looked in the
Exim doc, before anyone tells me to rtfm :) )

Thanks

--
Paul Walsh


--
## List details at http://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/


john.horne at plymouth

Nov 25, 2009, 3:50 AM

Post #2 of 2 (455 views)
Permalink
Re: address rewriting help [In reply to]

On Wed, 2009-11-25 at 10:05 +0000, Paul Walsh wrote:
> I'm afraid I'm a bit rusty with regards to rewriting and pattern matching. What I'm trying to do is rewrite the sender
> address where the local part starts with either F or S followed by 8 digits, for example
>
> S01234567 [at] example needs to be rewritten as S01234567 [at] another
>
> I've tried the following rule
>
> \N[fs]\d{8}\N [at] example $1 [at] another Ffrs
>
As far as I remember the rewriting is not case-independant, so use
'[fsFS]' instead.



John.

--
John Horne Tel: +44 (0)1752 587287
University of Plymouth, UK Fax: +44 (0)1752 587001

--
## List details at http://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/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.