Re: header_rewrite To: Field

2009-07-30 Thread David B Funk
On Thu, 30 Jul 2009, Bryan Haase wrote:

 I am currently using the header_rewrite for the subject. Wondering if it is  
 possible to use header_rewrite to change the To: field to a sub-domain?



 Example
 Mail comes in for u...@domain.com

 Spamassassin flags message as Spam, rewrites the subject to include 
 ***SPAM*** then rewrites the To: field to be u...@sub.domain.com

 Is this possible?

 Thanks
 Bryan

What, specifically, are you trying to achieve?

Changing the 'To:' HEADER  would be a cosmetic change but will -not-
affect mail routing. To change the address that a message gets delivered
to you need to change what's called the ENVELOPE to address.
Doing that will depend upon your MTA and how SA is glued into your system.

-- 
Dave Funk  University of Iowa
dbfunk (at) engineering.uiowa.eduCollege of Engineering
319/335-5751   FAX: 319/384-0549   1256 Seamans Center
Sys_admin/Postmaster/cell_adminIowa City, IA 52242-1527
#include std_disclaimer.h
Better is not better, 'standard' is better. B{


Re: header_rewrite To: Field

2009-07-30 Thread Karsten Bräckelmann
On Thu, 2009-07-30 at 16:50 -0500, Bryan Haase wrote:
 I am currently using the header_rewrite for the subject. Wondering if
 it is  possible to use header_rewrite to change the To: field to a
 sub-domain?

Nope. Which part of the docs [1] isn't clear? See rewrite_header, first
item in the Basic Message Tagging Options section.

 For the From or To headers, this will take the form of an RFC 2822
  comment following the address in parantheses.

I believe I've written something like this a few months ago. You can
change the comment (or real name), but you cannot change the address. As
David said, this is syntactic sugar only anyway, and does not have any
impact whatsoever, where the mail gets delivered to.


[1] http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html

-- 
char *t=\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4;
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}