[Exim] Rewrite Help

Pàgina inicial
Delete this message
Reply to this message
Autor: Padraic Renaghan
Data:  
A: exim-users
Assumpte: [Exim] Rewrite Help
I'm having a heck of a time figuring out this rewrite rule.
I did my best searching/reading documentation and list posts, but no
luck yet. Hopefully someone here can help...

I am trying to say:
for any mail from foo.com
  if the sender address matches -bounce (e.g., testlist-bounce)
  fail and skip further processing this rule
  otherwise, if the from header is defined
    rewrite the From envelope and sender header with the
    value of the from header


Here is what I have so far:

^.*@.*foo\.com$ "${if match{$sender_address}{.*-bounce}\
fail${if def:header_from:{$h_from:} fail}}" Fs

I've tried a number of sytaxes for this, sometimes getting "misplaced
{ or }", other times getting "yielded unqualified local address:
fail".

Also, is there a good way to test rewrite rules like this that depend
on other headers short of sending test messages through exim?

Please help.

Thanks
Padraic Renaghan