int i, j;
char *conffile = NULL;
- if ( (myname = strrchr( argv[0], '/' )) == NULL )
+ if ( (myname = strrchr( argv[0], *LDAP_DIRSEP )) == NULL )
myname = strdup( argv[0] );
else
myname = strdup( myname + 1 );
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;
free( localpart );
free( domainpart );
} else {
- sprintf( address, "%s@%s", localpart, domainpart );
+ sprintf( address, "%s", localpart );
free( localpart );
}
do_address( address, &tolist, &numto, &togroups, &ngroups,