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...
This commit is contained in:
Julio Sánchez Fernández 2001-02-27 21:20:08 +00:00
parent bc5afe9176
commit d8bf048f17

View 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;