mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-23 14:09:39 +08:00
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:
parent
bc5afe9176
commit
d8bf048f17
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user