On Tue, 2010-02-09 at 13:03 -0700, Vadnais, Kevin wrote:
> Where joe.blow is the sender username I want to validate, and "some" is the
> destination address.  The RCPT field of this message is correct, so I'm not
> too worried about it.   I need the F field to read F=<[email protected]>

I do this a different way, by having a router which un-munges the
address (we outsourced our student email to Google recently so this is
very valid for forwarded mail):

staff_and_student_system_aliases_google_forwarder:
  driver = redirect
  domains = OURDOMAINS
  data = ${lookup mysql{\
                        select target from map where lhs =\
                       '${quote_mysql:${sg\
                                          {$local_part}\
                                          {\N\+caf_=.+\N}\
                                          {}\
                                       }\
                         }'\
                       }\
           {$value}fail}
  file_transport = address_file
  pipe_transport = address_pipe
  allow_defer

The regex replace in the middle there strips the "+caf..." part from the
address, and the OURDOMAINS macro limits this to, well, our domains.

No rewriting necessary.

Graeme


-- 
## 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/

Reply via email to