Minor Bugfix Request in helohost check

[email protected] Tue, 29 Apr 2003 17:04:28 +0200
Newsgroups gmane.mail.serialmail
Message-ID <3EAEB09C.19294.7213BFA4@localhost>
Hello,

we discovered a problem in maildirserial/serialsmtp.c :
if you invoke maildirserial without the fourth parameter (helohost),
maildirserial invokes serialsmtp as follows:
/usr/local/bin/serialsmtp "$2" "$4"

so if you omit the helohost-parameter when you call maildirserial, serialsmtp gets an 
empty string, so the rfc-check in serialsmtp.c 
if (!helohost) die_usage();
does not match the emtpy string.
Maybe it would be better to check:
if (!helohost || !(*helohost)) die_usage();
So we can match emtpy helohosts too (which does not conform to rfc).
We found this problem when talking to postfix, which refuses empty helo greetings

here is my diff -u
--- serialsmtp.orig     Tue Apr 29 16:46:01 2003
+++ serialsmtp.c        Tue Apr 29 16:47:56 2003
@@ -283,7 +283,7 @@
   if (!prefix) die_usage();
 
   helohost = *++argv;
-  if (!helohost) die_usage();
+  if (!helohost || !(*helohost)) die_usage();
 
   remoteip = env_get("TCPREMOTEIP");
 

Ingo Neis
eurodata GmbH & Co. KG