Hi,

I run my OpenSMTPD setup with ClamAV as the first relay, mails are scanned and 
tagged with "CLAM_IN" and then relayed back to OpenSMTPD. CLAM_IN mails will be 
relayed to SpamAssassin, tagged with SPAM_IN and then relayed back and finally 
delivered using LMPT to Dovecot.

I have an intermittent issue with mails getting stuck between ClamAV and 
SpamAssassin (tagged CLAM_IN) with the errorline "Bad response: line too short".


I currently struggle to debug the issue as it works if I just re-schedule the 
mail (smtpctl schedule <id>)... so there doesn't really seem to be any issues 
with the envelope it self. My current suspect is SpamAssasin due to the mailing 
being stuck before SpamAssassin and smtp-out is reporting the error.

One of the failing envelopes are below (this one was sent using Apple mail but 
it doesn't seem to related as other clients are doing the same, seemingly 
random).

$ cat /var/log/maillog

smtpd[28345]: smtp-in: Accepted authentication for user user1 on session 
48564f41d712ab30
smtpd[28345]: smtp-in: Accepted message 0263357d on session 48564f41d712ab30: 
from=<us...@example.com>, to=<us...@example.com>, size=3949, ndest=1, 
proto=ESMTP
smtpd[28345]: smtp-in: Accepted message 5ea15501 on session 48564f3f50fb464d: 
from=<us...@example.com>, to=<us...@example.com>, size=4265, ndest=1, 
proto=ESMTP
clamsmtpd: 100788: from=us...@example.com, to=us...@example.com, status=CLEAN
smtpd[28345]: relay: Ok for 0263357d268939e2: session=48564f3e1e72328f, 
from=<us...@example.com>, to=<us...@example.com>, rcpt=<->, source=127.0.0.1, 
relay=127.0.0.1 (localhost), delay=1s, stat=250 2.0.0: 5ea15501 Message 
accepted for delivery
smtpd[28345]: smtp-out: Connecting to smtp://127.0.0.1:10035 (localhost) on 
session 48564f4200bb91cf...
smtpd[28345]: smtp-out: Connected on session 48564f4200bb91cf
smtpd[28345]: smtp-out: Error on session 48564f4200bb91cf: Bad response: line 
too short
smtpd[28345]: relay: TempFail for 5ea1550136f47d84: session=48564f4200bb91cf, 
from=<us...@example.com>, to=<us...@example.com>, rcpt=<->, source=127.0.0.1, 
relay=127.0.0.1 (localhost), delay=2s, stat=Bad response: line too short

$ smtpctl show envelope 5ea1550136f47d84
version: 2
tag: CLAM_IN
type: mta
smtpname: mail.example.com
helo: mail.example.com
hostname: localhost
errorline: Bad response: line too short
sockaddr: 127.0.0.1
sender: us...@example.com
rcpt: us...@example.com
dest: us...@example.com
ctime: 1426518720
last-try: 0
last-bounce: 0
expire: 345600
retry: 1
dsn-notify: 0
esc-class: 4
esc-code: 0
mta-relay: smtp://127.0.0.1:10035 <smtp://127.0.0.1:10035>


$ smtpctl show message 5ea1550136f47d84
Received: from mail.example.com (localhost [127.0.0.1]);
        by mail.example.com (OpenSMTPD) with ESMTP id 5ea15501;
        for <us...@example.com>;
        Mon, 16 Mar 2015 16:12:00 +0100 (CET)
Received: from par-olof.lan (90-229-230-87-no153.tbcn.telia.com 
[90.229.230.87]);
        by mail.example.com (OpenSMTPD) with ESMTPSA id 0263357d;
        TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO;
        for <us...@example.com>;
        Mon, 16 Mar 2015 16:11:59 +0100 (CET)
From: user1 <us...@example.com>
Content-Type: multipart/alternative; 
boundary="Apple-Mail=_3E00CA8D-BF5A-448A-8085-3389D2B50BED"
Subject: test subject
Message-Id: <0fc7bf64-c401-4d4b-a791-dff0e5642...@example.com>
Date: Mon, 16 Mar 2015 16:11:56 +0100
To: us...@example.com
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
X-Mailer: Apple Mail (2.1878.6)
X-Virus-Scanned: ClamAV using ClamSMTP

--Apple-Mail=_3E00CA8D-BF5A-448A-8085-3389D2B50BED
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
        charset=iso-8859-1


Thanks,
Eric Ripa
e...@stickybit.se




Reply via email to