[exim] spamd: bad protocol: header error: (closed before hea…

Top Page
Delete this message
Reply to this message
Author: Cyborg
Date:  
To: <exim-users@exim.org>
Subject: [exim] spamd: bad protocol: header error: (closed before headers)
Hello everyone,

does anyone know how to prevent this :

Apr 9 04:59:03 s36 spamd[18422]: spamd: connection from localhost
[127.0.0.1] at port 54293
Apr 9 04:59:03 s36 spamd[18422]: spamd: bad protocol: header error:
(closed before headers)


heres our config, which is running fine, i just removed the exact
conditions , as they do not matter for this case.

# For spam scanning, there is a similar option that defines the interface to
# SpamAssassin. You do not need to set this if you are using the
default, which
# is shown in this commented example. As for virus scanning, you must also
# modify the acl_check_data access control list to enable spam scanning.

spamd_address = 127.0.0.1 783

*....*other exim lines ....


# Run SpamAssassin, but allow for it to fail or time out. Add a
warning message
# and accept the mail if that happens. Add an X-Spam-Flag: header if
the SA
# score exceeds the SA system threshold.

   warn    condition  = ${if eq{$authenticated_id}{} {1}{0}}
           condition  = [PRIVATE CONDITION]
           condition  = [PRIVATE CONDITION]
           spam       = nobody/defer_ok
           add_header = X-Spam-Flag: YES


   accept  condition  = [SKIP IF spam_score_int is not set OR user has 
no spamfilter]
           add_header = X-Spam-Note: SpamAssassin skipped for 
domain=${domain:$h_to:}


Is there a way to notice that there was an error in the spamd and to
repeat the check ? ( see below )

What i dont get is, how it could happen in the first place, as at the
similar time, another exim process connected to
spamd without problems :

Apr 9 04:59:03 s36 spamd[18422]: spamd: connection from localhost
[127.0.0.1] at port 54293
Apr 9 04:59:03 s36 spamd[18422]: spamd: bad protocol: header error:
(closed before headers)
Apr 9 04:59:03 s36 spamd[18398]: prefork: child states: II
Apr 9 04:59:03 s36 spamd[18422]: spamd: connection from localhost
[127.0.0.1] at port 54299
Apr 9 04:59:03 s36 spamd[18422]: spamd: setuid to nobody succeeded
Apr 9 04:59:03 s36 spamd[18422]: spamd: checking message
<001701ce34ce$24afa040$274c9469@ANDONGNHIh6oh> for nobody:99

Could that be the problem ?

The Exim mainlog looks like this:

2013-04-09 04:59:03 H=r186-52-209-172.dialup.adsl.anteldata.net.uy
(anteldata.net.uy) [186.52.209.172] F=<soupedd18@???> rejected
RCPT <THIS IS PRIVATE -3->: you have been blacklisted.
2013-04-09 04:59:03 1UPOlz-0003yf-53 H=(113.168.76.149) [113.168.76.149]
Warning: send for [THIS IS PRIVATE]
2013-04-09 04:59:03 1UPOlz-0003za-Oa
H=173-14-41-118-michigan.hfc.comcastbusiness.net [173.14.41.118]
Warning: send for [THIS IS PRIVATE -2-]
2013-04-09 04:59:03 1UPOlz-0003za-Oa <= clanks3@???
H=173-14-41-118-michigan.hfc.comcastbusiness.net [173.14.41.118] P=esmtp
S=1823 id=4397822670.2DL0IZRA973795@???
2013-04-09 04:59:03 1UPOlz-0003yf-53 <= [THIS IS PRIVATE] P=smtp S=3179
id=001701ce34ce$24afa040$274c9469@ANDONGNHIh6oh
2013-04-09 04:59:04 1UPOlz-0003za-Oa => [THIS IS PRIVATE -2-]
R=virtual_user T=address_directory
2013-04-09 04:59:04 1UPOlz-0003za-Oa => [THIS IS PRIVATE -2-]
R=virtual_user T=address_directory
2013-04-09 04:59:04 1UPOlz-0003za-Oa Completed
2013-04-09 04:59:04 1UPOlz-0003yf-53 => [THIS IS PRIVATE] R=virtual_user
T=address_directory
2013-04-09 04:59:04 1UPOlz-0003yf-53 Completed
2013-04-09 04:59:08 no IP address found for host
186-59-75-238.speedy.com.ar (during SMTP connection from [186.59.75.238])

There have been two messages at the "same" time, with i guess, two exims
connecting to spamd at the same time, one succeeds, one fails.

Is it possible that there is a race condition for gaining the pipe to
spamd ?

I checked the exim spec for "defer_ok" , but only found what it used
for, not what happens exactly if it's not used.
It defers, ok, does it get queued for later rechecks ? If so, that would
be great. If not, could that be arranged ?

best regards,
Marius