milter_write error on large header
am 20.11.2007 21:05:22 von a
Hi,
I am using
# Maximum length of the sum of all headers
O MaxHeadersLength=1048576
to allow longer headers, but the milter interface is reporting error
and the xxfi_abort routine
is called, though the message is accepted and delivered.
I don't see any error in the milter; is this a bug / limitation in the
milter interface?
How do I fix it? I am using sendmail 8.13.7 on Solaris 9.
Sample sendmail log is below.
Thanks
=========== BEGIN sendmail log ==============
Nov 20 14:38:00 myhost mta-server[15696]: [ID 801593 mail.info]
lAKJbxH0015696: from=, size=180555,
class=0, nrcpts=1, msgid=<473AC077.000001.01120@mycompany.com>,
bodytype=8BITMIME, proto=ESMTP, daemon=MSA, relay=myhost.mycompany.com
[10.40.40.14]
Nov 20 14:38:00 myhost mta-server[15696]: [ID 801593 mail.error]
lAKJbxH0015696: milter_write(mymilter): length 133974 out of range
Nov 20 14:38:00 myhost mta-server[15696]: [ID 801593 mail.info]
lAKJbxH0015696: Milter (mymilter): to error state
Nov 20 14:38:01 myhost mta-server[15697]: [ID 801593 mail.info]
lAKJbxH0015696: to=, delay=00:00:01,
xdelay=00:00:01, mailer=local, pri=210765, relay=local, dsn=2.0.0,
stat=Sent
=========== END sendmail log ==============
Re: milter_write error on large header
am 22.11.2007 18:48:03 von ca+sendmail(-no-copies-please)
A wrote:
> O MaxHeadersLength=1048576
> to allow longer headers, but the milter interface is reporting error
> Nov 20 14:38:00 myhost mta-server[15696]: [ID 801593 mail.error]
> lAKJbxH0015696: milter_write(mymilter): length 133974 out of range
The size of a single data exchange between MTA and libmilter is
restricted to 64K. Having a header that is more than twice that
long is "a bit unusual". What kind of header is that?
Anyway, if you want to change that, you can increase the constant
MILTER_MAX_DATA_SIZE or compile with _FFR_MAXDATASIZE and set the
Milter suboption maxdatasize in your cf file and call
smfi_setmaxdatasize() to change the value in your milter too.
Note: you have to set the same value on both sides.
PS: this can be considered a bug in the MTA (and libmilter), it
should transmit longer headers in parts (just as it does for the
body). However, it's not high priority, as headers longer than 64K
are really unusual (and not possible in the default configuration).
--
PPS: This article "Supersedes" an earlier reply (if it works...)
Re: milter_write error on large header
am 27.11.2007 22:20:18 von a
On Nov 22, 12:48 pm, Claus Aßmann
please)@mine.informatik.uni-kiel.de> wrote:
> A wrote:
> > O MaxHeadersLength=3D1048576
> > to allow longer headers, but the milter interface is reporting error
> > Nov 20 14:38:00 myhost mta-server[15696]: [ID 801593 mail.error]
> > lAKJbxH0015696:milter_write(mymilter): length 133974 out of range
>
> The size of a single data exchange between MTA and libmilter is
> restricted to 64K. Having a header that is more than twice that
> long is "a bit unusual". What kind of header is that?
>
> Anyway, if you want to change that, you can increase the constant
> MILTER_MAX_DATA_SIZE or compile with _FFR_MAXDATASIZE and set the
> Milter suboption maxdatasize in your cf file and call
> smfi_setmaxdatasize() to change the value in your milter too.
> Note: you have to set the same value on both sides.
>
> PS: this can be considered a bug in the MTA (and libmilter), it
> should transmit longer headers in parts (just as it does for the
> body). However, it's not high priority, as headers longer than 64K
> are really unusual (and not possible in the default configuration).
>
> --
> PPS: This article "Supersedes" an earlier reply (if it works...)
Thanks for your mail.
Good to know about the smfi_setmaxdatasize(), I was using the
"sendmail Milters" book by Costales and Flynt and didn't see it there.
Either option requires recompiling sendmail, so I'll try the
MILTER_MAX_DATA_SIZE
first because then I won't have to recompile the milter right now.
btw, yes these message headers are unusually large; they are generated
by an application
which sends messages to thousands of recipients at a time, hence the
size.
Best regards