Message contains NUL characters ...

John Fawcett johnml at
Mon Apr 25 12:43:27 EDT 2005

Marc G. Fournier wrote:
> On Mon, 25 Apr 2005, Michael Sims wrote:
>> Marc G. Fournier wrote:
>>> Apr 24 15:29:02 hub postfix/lmtp[54800]: 0367A1298D0:
>>> to=<admin at>, relay=/var/run/socket/lmtp[/var/run/socket/lmtp],
>>> delay=273190, status=bounced (host
>>> /var/run/socket/lmtp[/var/run/socket/lmtp] said: 554 5.6.0 Message
>>> contains NUL characters (in reply to end of DATA command))
>> Hi,
>> This is a FAQ (although it appears not to be in the actual FAQ or the
>> wiki...). Basically you want to configure your MTA so that NULs are
>> stripped
>> before the messages containing them are passed to LMTP.  Check the
>> archives
>> (watch for wrapping on this URL):

This question has cropped up on the postfix list before and, if I
remember, the thinking was that there is no reason why the
MTA should be changed to strip out NULs. Why not have an
option to strip these out when cyrus receives the message?

One workaround was to add a content filter in postfix via the pipe
delivery agent.
I did not want to complicate my setup with  another content filter.

I already had amavisd-new and spamassassin, and
seeing that these mails were almost always spam, I just added a rule
to spamassassin to score messages containing NULS above the spam
discard threshold.

Bouncing them was not an option since the addresses were often forged
or when they came from mailing lists I ended up being unsubscribed
because of the occasional bouncing message.

>> +postfix&q=b
>> As for why this suddenly became a problem when it wasn't before, I
>> have no
>> idea; maybe someone else can shed some light on that...
> It may have been a problem before, but only gotten noticeable in the
> past little while ... from what I can tell, most of hte ones 'stuck in
> the queue' with this were spam, from doing random queues ...
> Thanks ...

Sometimes I check what I'm discarding and only remember seeing spam.
That could explain the upward trend in these messages (in line with
the general increase in spam), although I've not seen that and have
too small numbers to draw conclusions.


> ----
> Marc G. Fournier           Hub.Org Networking Services (
> Email: scrappy at           Yahoo!: yscrappy              ICQ: 7615664
> ---
> Cyrus Home Page:
> Cyrus Wiki/FAQ:
> List Archives/Info:

Cyrus Home Page:
Cyrus Wiki/FAQ:
List Archives/Info:

More information about the Info-cyrus mailing list