dccifd hung when header section omited in message body

Martin Pála Martin.Pala@oskar.cz
Tue Aug 16 11:49:25 UTC 2005


Hello,

during dccifd testing i tried this simple test (connect to dccifd smtp proxy running on 10025):

--8<--
[root@e2sgw01 ~]# telnet 127.0.0.1 10025
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 e2sgw01.oskarmobil.cz ESMTP Postfix
EHLO e2sgw01.oskarmobil.cz
250-e2sgw01.oskarmobil.cz
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-XFORWARD NAME ADDR PROTO HELO SOURCE
250 8BITMIME
XFORWARD NAME=e2sgw01.oskarmobil.cz ADDR=217.77.161.168 HELO=[127.0.0.1] PROTO=ESMTP SOURCE=LOCAL
250 Ok
MAIL FROM: <martinp@tildeslash.com>
250 Ok
RCPT TO: <martin.pala@mujoskar.cz>
250 Ok
DATA
354 Enter mail to dccifd
test
.
--8<--

Immediately after final 'dot' the connection hung forever. I tried to trace the communication with following result:

1.) after final dot, dccifd send report and query to dccd, which responded in 0.01s
2.) dccifd then sent the DATA command to the backend postfix instance (running on 10026), but (!) no message body
3.) backend postfix instance closed the connection from dccifd after timeout occured


It seems to me that dccifd interpreted the standalone 'test' string as header (?) and that it lost somehow the message body with the final dot, then it doesn't send any data nor close the connection to smtp backend.


dccifd and postfix log related to above attempt:
--8<--
Aug 16 12:22:57 e2sgw01 postfix/smtpd[18059]: connect from localhost.localdomain[127.0.0.1]
Aug 16 12:22:57 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 220 e2sgw01.oskarmobil.cz ESMTP Postfix
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO SMTP command: EHLO e2sgw01.oskarmobil.cz
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250-e2sgw01.oskarmobil.cz
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250-PIPELINING
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250-SIZE 10240000
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250-VRFY
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250-ETRN
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250-XFORWARD NAME ADDR PROTO HELO SOURCE
Aug 16 12:23:01 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250 8BITMIME
Aug 16 12:23:06 e2sgw01 dccifd[17943]: 2vEYjO SMTP command: XFORWARD NAME=e2sgw01.oskarmobil.cz ADDR=217.77.161.168 HELO=[127.0.0.1] PROTO=ESMTP SOURCE=LOCAL
Aug 16 12:23:06 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250 Ok
Aug 16 12:23:09 e2sgw01 dccifd[17943]: 2vEYjO SMTP command: MAIL FROM: <martinp@tildeslash.com>
Aug 16 12:23:09 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250 Ok
Aug 16 12:23:12 e2sgw01 dccifd[17943]: 2vEYjO SMTP command: RCPT TO: <martin.pala@mujoskar.cz>
Aug 16 12:23:12 e2sgw01 postfix/smtpd[18059]: 50AFF1804A: client=e2sgw01.oskarmobil.cz[217.77.161.168]
Aug 16 12:23:12 e2sgw01 dccifd[17943]: 2vEYjO pass SMTP response: 250 Ok
Aug 16 12:23:14 e2sgw01 dccifd[17943]: 2vEYjO SMTP command: DATA
Aug 16 12:23:14 e2sgw01 dccifd[17943]: 2vEYjO SMTP response: 354 Enter mail to dccifd
Aug 16 12:23:54 e2sgw01 postfix/smtpd[18032]: timeout after DATA from localhost.localdomain[127.0.0.1]
Aug 16 12:23:54 e2sgw01 postfix/smtpd[18032]: disconnect from localhost.localdomain[127.0.0.1]
Aug 16 12:28:16 e2sgw01 postfix/smtpd[18059]: timeout after DATA from localhost.localdomain[127.0.0.1]
Aug 16 12:28:16 e2sgw01 postfix/smtpd[18059]: disconnect from localhost.localdomain[127.0.0.1]
--8<--


the message logged by dccifd:
--8<--
[root@e2sgw01 ~]# cat /var/dcc/log/tmp.2vEYjO
VERSION: 3
DATE: 08/16/05 12:22:57 CEST
IP: e2sgw01.oskarmobil.cz  ::ffff:217.77.161.168
HELO: [127.0.0.1]
env_From: <martinp@tildeslash.com>  mail_host=tildeslash.com
env_To: <martin.pala@mujoskar.cz>  addr=  dir=

test

### end of message body ########################
2vEYjO pass SMTP response: 220 e2sgw01.oskarmobil.cz ESMTP Postfix
2vEYjO SMTP command: EHLO e2sgw01.oskarmobil.cz
2vEYjO pass SMTP response: 250-e2sgw01.oskarmobil.cz
2vEYjO pass SMTP response: 250-PIPELINING
2vEYjO pass SMTP response: 250-SIZE 10240000
2vEYjO pass SMTP response: 250-VRFY
2vEYjO pass SMTP response: 250-ETRN
2vEYjO pass SMTP response: 250-XFORWARD NAME ADDR PROTO HELO SOURCE
2vEYjO pass SMTP response: 250 8BITMIME
2vEYjO SMTP command: XFORWARD NAME=e2sgw01.oskarmobil.cz ADDR...

X-DCC-OSKAR-Metrics: e2sgw01.oskarmobil.cz 100; Body=0
                            reported: 1               checksum
                       IP: df769584 d584a974 0f1c5464 4d2b5373
                 env_From: 066f68b9 64694338 39badaf1 8398c003
               Message-ID: d41d8cd9 8f00b204 e9800998 ecf8427e
--8<--



When i tried the same test but included the empty line to separate the header and body section, the message passed:
--8<--
[root@e2sgw01 ~]# telnet 127.0.0.1 10025
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 e2sgw01.oskarmobil.cz ESMTP Postfix
EHLO e2sgw01.oskarmobil.cz
250-e2sgw01.oskarmobil.cz
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-XFORWARD NAME ADDR PROTO HELO SOURCE
250 8BITMIME
XFORWARD NAME=e2sgw01.oskarmobil.cz ADDR=217.77.161.168 HELO=[127.0.0.1] PROTO=ESMTP SOURCE=LOCAL
250 Ok
MAIL FROM: <martinp@tildeslash.com>
250 Ok
RCPT TO: <martin.pala@mujoskar.cz>
250 Ok
DATA
354 Enter mail to dccifd

test
.
250 Ok: queued as A753518049
quit
221 Bye
Connection closed by foreign host.
--8<--



And final test just to make sure that backend postfix (port 10026) is able to accept the 'problematic' message with missing header section:
--8<--
[root@e2sgw01 ~]# telnet 127.0.0.1 10026
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 e2sgw01.oskarmobil.cz ESMTP Postfix
EHLO e2sgw01.oskarmobil.cz
250-e2sgw01.oskarmobil.cz
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-XFORWARD NAME ADDR PROTO HELO SOURCE
250 8BITMIME
XFORWARD NAME=e2sgw01.oskarmobil.cz ADDR=217.77.161.168 HELO=[127.0.0.1] PROTO=ESMTP SOURCE=LOCAL
250 Ok
MAIL FROM: <martinp@tildeslash.com>
250 Ok
RCPT TO: <martin.pala@mujoskar.cz>
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
test
.
250 Ok: queued as D855118049
quit
221 Bye
Connection closed by foreign host.
--8<--

=> postfix is able to accept such message without problems


Martin




More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.