]> git.sur5r.net Git - openldap/commitdiff
Sendmail is so weird that it passes us an address of <> as just
authorJulio Sánchez Fernández <jsanchez@openldap.org>
Tue, 27 Feb 2001 21:20:08 +0000 (21:20 +0000)
committerJulio Sánchez Fernández <jsanchez@openldap.org>
Tue, 27 Feb 2001 21:20:08 +0000 (21:20 +0000)
a zero-length argument, but will consider such thing unparseable.
So we do the translation...

clients/maildap/main.c

index f45d3fe9491a987254023bc89937dde498b357de..6233497d45217a87ad3b8c961b06e177f302c3c7 100644 (file)
@@ -218,6 +218,11 @@ main ( int argc, char **argv )
 
                case 'f':       /* who it's from & where errors should go */
                        mailfrom = strdup( optarg );
+                       /* Deal with <> */
+                       if ( mailfrom[0] == '\0' ) {
+                               free( mailfrom );
+                               mailfrom = strdup( "<>" );
+                       }
                        for ( j = 0; sendmailargs[j] != NULL; j++ ) {
                                if ( strcmp( sendmailargs[j], "-f" ) == 0 ) {
                                        sendmailargs[j+1] = mailfrom;