[prev in list] [next in list] [prev in thread] [next in thread] 

List:       osiris
Subject:    Re: [osiris] unfriendly smtp server
From:       Stewart James <stewart.james () vu ! edu ! au>
Date:       2005-01-04 22:02:43
Message-ID: 41DB1283.30707 () vu ! edu ! au
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Seems the 1024 limit is wrong. 512 not 1024.

http://rfc.net/rfc2821.html#s4.5.3

~   command line
~      The maximum total length of a command line including the command
~      word and the <CRLF> is 512 characters.  SMTP extensions may be
~      used to increase this limit.

~   reply line
~      The maximum total length of a reply line including the reply code
~      and the <CRLF> is 512 characters.  More information may be
~      conveyed through multiple-line replies.

~   text line
~      The maximum total length of a text line including the <CRLF> is
~      1000 characters (not counting the leading dot duplicated for
~      transparency).  This number may be increased by the use of SMTP
~      Service Extensions.

Stewart :)

Stewart James wrote:
|
| I am getting a nice "unfriendly smtp server" error in my daemon log from
| osiris.
|
| I started looking at the source code and got into read_smtp_response.
|
| Now my deduction is that my smtp header response is > MAX_SMTP_LINE.
| (184 chars in a 128 byte buffer).
|
| I was going to log a bug in the debian package I am using as the SMTP
| greet is the standard debian sendmail one, so it would make sense for
| the debian osiris package to have MAX_SMTP_LINE increased, however....
|
| It struck me that smtp servers have a 1024 string limit per line. (I
| read this somewhere once and for some reason I have remembered it). If
| that is the case wouldn't it be wise to make osiris use this as the
| default length for data it reads from an SMTP server?
|
| The other thought I have was that the "220" that osiris is looking for
| would be at the start of a line. In my case it is. So if osiris is going
| to be looking for a 220 and use a limited buffer. Perhaps changing the
| if the triggers the string compare:
| ~  if (buf[pos++] == '\n')
| To something like:
| if ((buf[pos++] == '\n') || (pos == MAX_SMTP_LINE))
|
| So that the code that checks for the 220 would be triggered even if the
| MAX_SMTP_LINE value is reached before a "\n" is seen? Even if
| MAX_SMTP_LINE is increased to 1024?
|
| Thoughts?
|
| Stewart
|
|
|
|
_______________________________________________
osiris mailing list
osiris@lists.shmoo.com
https://lists.shmoo.com/mailman/listinfo/osiris

- --
Stewart James
IT Security Officer
- ---------------------------------
Networks and Computing, ITS
Victoria University of Technology
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB2xKD1W2w7eInQAoRAssnAJ98XYXQ1uLgxlr1f0hMSeE5pPAemACg8M0L
3WYY70/ctY0WxbnzivUYxiA=
=mx3P
-----END PGP SIGNATURE-----

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic