>> > Could be the problem relate to the "<crlf>" of the telnete session?
>>
>> No.
>
> Sorry Rick but the problem is crlf, the domain are only for example (on my
> server i have used real domain name like gmail.com), but the problem is
> the .qmail generated by the add_alias, infact if i run dos2unix
> .qmail-prova
> the alias works.
>
> Also if i open the same .qmail vith vim i see [DOS] for encoding.
>
Actually, looking at the code, he's right - the line in question is in
vpopmaild.c, line 1002:

    if ((alias_line=strtok(NULL, "\n"))==NULL) {

The strtok tokenizes after the '\n' (<LF>), leaving the '\r' (<CR>) as the
last character of the alias_line, which would have the exact effect he's
seeing.  Looks like the same bug exists on line 1051 as well (identical
code block in remove_alias).  Every other instance of strtok() uses one of
two defines for the token list - TOKENS or PASS_TOKENS, these are the only
two strtok() calls using an explicit token list.  Patch is attached.

Josh
Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
  - Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]
--- ../vpopmail-5.4.20/vpopmaild.c	2007-08-22 02:17:45.000000000 -0400
+++ vpopmaild.c	2007-09-06 09:47:04.000000000 -0400
@@ -999,7 +999,7 @@
     return(-1);
   }
 
-  if ((alias_line=strtok(NULL, "\n"))==NULL) {
+  if ((alias_line=strtok(NULL,TOKENS))==NULL) {
     show_error( ERR_ALIAS_LINE_REQD, 906 );
     return(-1);
   }
@@ -1048,7 +1048,7 @@
     return(-1);
   }
 
-  if ((alias_line=strtok(NULL, "\n"))==NULL) {
+  if ((alias_line=strtok(NULL,TOKENS))==NULL) {
     show_error( ERR_ALIAS_LINE_REQD, 1006 );
     return(-1);
   }

Reply via email to