From: Julio Sánchez Fernández Date: Tue, 27 Feb 2001 21:20:08 +0000 (+0000) Subject: Sendmail is so weird that it passes us an address of <> as just X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1498 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d8bf048f17ddcbaa1d0604e4accd91a41441bb3c;p=openldap Sendmail is so weird that it passes us an address of <> as just a zero-length argument, but will consider such thing unparseable. So we do the translation... --- diff --git a/clients/maildap/main.c b/clients/maildap/main.c index f45d3fe949..6233497d45 100644 --- a/clients/maildap/main.c +++ b/clients/maildap/main.c @@ -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;