[OT] SendMail in NT

Gerald Combs gerald at ethereal.com
Fri Mar 15 03:55:13 CST 2002


On Thu, 14 Mar 2002, Gerald Combs wrote:

> Any line beginning with a period has a period prepended on the sending
> side and removed on the receiving side.  I can verify this with a packet
> trace if anyone is interested.

No one indicated interest.  I did it anyway.  Here's what the data looks
like on the wire, according to tethereal:

Simple Mail Transfer Protocol
Message: Received: (from gerald at localhost)rn
Message: tby bam.zing.org (8.11.6/8.11.6) id g2F3lBE01850;rn
Message: tThu, 14 Mar 2002 21:47:11 -0600rn
Message: Date: Thu, 14 Mar 2002 21:47:11 -0600rn
Message: Message-Id: <200203150347.g2F3lBE01850 at bam.zing.org>rn
Message: From: gerald at zing.orgrn
Message: To: gerald at ethereal.comrn
Message: Subject: dot testrn
Message: rn
Message: The following line contains a single period:rn
Message: ..rn
Message: rn
Message: ..<-- This line has a period, plus other stuff.rn
Message: rn
Message: rn

0000  00 e0 29 68 8b fb 00 a0 cc 3b bf fa 08 00 45 00   ..)h.....;....E.
0010  01 b7 86 bf 40 00 40 06 cb 28 c0 a8 00 02 41 d0   .... at .@..(....A.
0020  e4 de 81 f6 00 19 6e 42 14 6c 6d 59 f7 99 80 18   ......nB.lmY....
0030  16 d0 6f 30 00 00 01 01 08 0a 00 14 93 a2 3d b1   ..o0..........=.
0040  b1 ac 52 65 63 65 69 76 65 64 3a 20 28 66 72 6f   ..Received: (fro
0050  6d 20 67 65 72 61 6c 64 40 6c 6f 63 61 6c 68 6f   m gerald at localho
0060  73 74 29 0d 0a 09 62 79 20 62 61 6d 2e 7a 69 6e   st)...by bam.zin
0070  67 2e 6f 72 67 20 28 38 2e 31 31 2e 36 2f 38 2e   g.org (8.11.6/8.
0080  31 31 2e 36 29 20 69 64 20 67 32 46 33 6c 42 45   11.6) id g2F3lBE
0090  30 31 38 35 30 3b 0d 0a 09 54 68 75 2c 20 31 34   01850;...Thu, 14
00a0  20 4d 61 72 20 32 30 30 32 20 32 31 3a 34 37 3a    Mar 2002 21:47:
00b0  31 31 20 2d 30 36 30 30 0d 0a 44 61 74 65 3a 20   11 -0600..Date:
00c0  54 68 75 2c 20 31 34 20 4d 61 72 20 32 30 30 32   Thu, 14 Mar 2002
00d0  20 32 31 3a 34 37 3a 31 31 20 2d 30 36 30 30 0d    21:47:11 -0600.
00e0  0a 4d 65 73 73 61 67 65 2d 49 64 3a 20 3c 32 30   .Message-Id: <20
00f0  30 32 30 33 31 35 30 33 34 37 2e 67 32 46 33 6c   0203150347.g2F3l
0100  42 45 30 31 38 35 30 40 62 61 6d 2e 7a 69 6e 67   BE01850 at bam.zing
0110  2e 6f 72 67 3e 0d 0a 46 72 6f 6d 3a 20 67 65 72   .org>..From: ger
0120  61 6c 64 40 7a 69 6e 67 2e 6f 72 67 0d 0a 54 6f   ald at zing.org..To
0130  3a 20 67 65 72 61 6c 64 40 65 74 68 65 72 65 61   : gerald at etherea
0140  6c 2e 63 6f 6d 0d 0a 53 75 62 6a 65 63 74 3a 20   l.com..Subject:
0150  64 6f 74 20 74 65 73 74 0d 0a 0d 0a 54 68 65 20   dot test....The
0160  66 6f 6c 6c 6f 77 69 6e 67 20 6c 69 6e 65 20 63   following line c
0170  6f 6e 74 61 69 6e 73 20 61 20 73 69 6e 67 6c 65   ontains a single
0180  20 70 65 72 69 6f 64 3a 0d 0a 2e 2e 0d 0a 0d 0a    period:........
0190  2e 2e 3c 2d 2d 20 54 68 69 73 20 6c 69 6e 65 20   ..<-- This line
01a0  68 61 73 20 61 20 70 65 72 69 6f 64 2c 20 70 6c   has a period, pl
01b0  75 73 20 6f 74 68 65 72 20 73 74 75 66 66 2e 0d   us other stuff..
01c0  0a 0d 0a 0d 0a                                    .....

The full capture file is attached.

BTW, this can have unexpected consequences if you're piping the output of
a program or file into 'sendmail -t', e.g. from a CGI script. By default,
sendmail will treat the data as if it's "off the wire" - lines containing
a single period will end the current message, giving people the
opportunity to abuse your mail server.  To get around this, you can use
"sendmail -ti":

-i     Ignore dots alone on lines by themselves in  incom=AD
ing  messages.  This should be set if you are read=AD
ing data from a file.





More information about the Kclug mailing list