[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dumb clients, trailing spaces, and smtpserver



I was going through the smptserver log today and found that
there were a fair number of failures caused by trailing
spaces in e-mail addresses:
  RCPT TO:<foo@bar.com        >
  501-                ^
  501 Path data: Extra garbage before terminating ">"

Looking at some of the specific cases in my log I'd guess that this
is often caused by a CGI which just passes the e-mail address entered
through a Web form directly to the mail system.  The user entering the
e-mail address will not usually notice if s/he places extra trailing
spaces into the field.  Dealing with trimming trailing whitespace is
not a common practice in CGIs that I have seen.

In an ideal world the mail client software would trim trailing
whitespace from the e-mail destination before shunting the message
through SMTP, but that obviously is not this world.  How hard would
it be to modify smtpserver to recognize (and fix on the fly) this
particular problem?

		--Ken Pizzini