Validating of email recipient is default off.
log_it("CRON", getpid(), "DEATH", "can't malloc");
exit(1);
}
+
+ if ( getenv("CRON_VALIDATE_MAILRCPTS") != 0L )
+ ValidateMailRcpts=1;
/* if there are no debug flags turned on, fork as a daemon should.
*/
* up the mail command and subjects and stuff...
*/
- if (mailto && safe_p(usernm, mailto)) {
+ if (mailto
+ &&( (ValidateMailRcpts==0) || safe_p(usernm, mailto) )
+ /* Why validate the mail recipient name ? All mailers do this anyway... JVD */
+ )
+ {
char **env;
char mailcmd[MAX_COMMAND];
char hostname[MAXHOSTNAMELEN];
XTRN time_t StartTime INIT(0);
XTRN int NoFork INIT(0);
XTRN int PermitAnyCrontab INIT(0);
+XTRN int ValidateMailRcpts INIT(0);
#if DEBUGGING
XTRN int DebugFlags INIT(0);