[SA-exim] Header Problem.

Marc MERLIN marc at merlins.org
Mon Dec 30 07:17:15 2002


On Tue, Dec 03, 2002 at 08:19:11AM -0800, Marc MERLIN wrote:
> > A quick hack of the sa-exim.c code (about line 274) to alter the header_add
> > bit from this:
> > 
> > 	header_add(' ', "X-SA-Exim-Rcpt-To: %s\n", rcptlist);
> > 
> > to this:
> > 
> > 	if (strlen(rcptlist)<8192)
> > 		header_add(' ', "X-SA-Exim-Rcpt-To: %s\n", rcptlist);
> > 	else
> > 		header_add(' ', "X-SA-Exim-Rcpt-To: WARNING - STRING TOO BIG\n");
> 
> Mmmh, indeed, I hadn't thought about that.
> I'll add a patch like this one in the next version.
> (I  think I'll  add an  option that  doesn't add  the X-SA-Exim-Rcpt-To:
> header if  it is bigger  than a configurable  size, giving the  user the
> option to set it to 0)

Ok, so I made a quick patch that should take care of this, and also
deals with the feature request of disabling the header altogether.
(This wasn't the only place where you had to fix this, rcptlist is
pieced up together with an string_sprintf that also hits the 8K limit)

spamassassin.conf now has:

# You can have SA-Exim add a X-SA-Exim-Rcpt-To header, which will list all
# the receipients for the Email, unless the list gets bigger than 
# SAmaxrcptlistlength bytes.
# The default value of 0 disables the header for privacy reasons (the header
# exposes Bcced receipients)
# Any value bigger than 8000 will be ignored because there is a limit on the
# size of headers that you can have and exim's string_sprintf
SAmaxrcptlistlength: 0

This is not tested, I'm on vacation in France on a modem, so I'll check
it in CVS and let you guys check it out, but eh, it compiles, so it has
to work, right :)

(in other words, please give me feedback)

Happy upcoming new year to you all

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger marc_f@merlins.org for PGP key



More information about the SA-Exim mailing list