<listitem>
<para><emphasis><type>boolean</type></emphasis>(<constant>false</constant>)</para>
<para>Mail output even if zero-length.</para>
+ <para>Setting this option to true will also set &optmail; to true.</para>
<para>&seealso; options &optmail;, &optmailto;,
&opterroronlymail;, &optnolog;.</para>
</listitem>
<listitem>
<para><emphasis><type>boolean</type></emphasis>(<constant>true</constant>)</para>
<para>Mail output (if any) or not.</para>
+ <para>Setting this option to false will also set &optforcemail; to false.</para>
<para>&seealso; options &optmailto;, &optforcemail;,
&opterroronlymail;, &optnolog;.</para>
</listitem>
* we don't store it in the same way. */
/* please note that we check if the mailto is valid in conf.c */
if ( strcmp(name, "MAILTO") == 0 ) {
- if ( strcmp(val, "\0") == 0 )
+ if ( strcmp(val, "\0") == 0 ) {
clear_mail(default_line.cl_option);
+ clear_forcemail(default_line.cl_option);
+ }
else {
Set(default_line.cl_mailto, val);
set_mail(default_line.cl_option);
else if(strcmp(opt_name, "m")==0 || strcmp(opt_name, "mail")==0){
if ( in_brackets && (ptr = get_bool(ptr, &i)) == NULL )
Handle_err;
- if ( i == 0 )
+ if ( i == 0 ) {
clear_mail(cl->cl_option);
+ clear_forcemail(cl->cl_option);
+ }
else
- set_mail(cl->cl_option);
+ set_mail(cl->cl_option);
if (debug_opt)
fprintf(stderr, " Opt : \"%s\" %d\n", opt_name, i);
}
Handle_err;
if ( i == 0 )
clear_mailzerolength(cl->cl_option);
- else
- set_mailzerolength(cl->cl_option);
+ else {
+ set_mailzerolength(cl->cl_option);
+ set_mail(cl->cl_option);
+ }
if (debug_opt)
fprintf(stderr, " Opt : \"%s\" %d\n", opt_name, i);
}
i = 0;
while ( *ptr != ')' && i + 1 < sizeof(buf) )
buf[i++] = *ptr++;
- if ( strcmp(buf, "\0") == 0 )
+ if ( strcmp(buf, "\0") == 0 ) {
clear_mail(cl->cl_option);
+ clear_forcemail(cl->cl_option);
+ }
else {
Set(cl->cl_mailto, buf);
set_mail(cl->cl_option);
#ifndef USE_SENDMAIL
clear_mail(cl->cl_option);
+ clear_forcemail(cl->cl_option);
#endif
cl->cl_next = cf->cf_line_base;
#ifndef USE_SENDMAIL
clear_mail(cl->cl_option);
+ clear_forcemail(cl->cl_option);
#endif
cl->cl_next = cf->cf_line_base;
ok:
#ifndef USE_SENDMAIL
clear_mail(cl->cl_option);
+ clear_forcemail(cl->cl_option);
#endif
cl->cl_next = cf->cf_line_base;
/* // */
debug("run_job(): child: %s, output to %s, %s, %s\n",
- is_mail(line->cl_option) || is_mailzerolength(line->cl_option) ?
- "mail" : "no mail",
+ is_mail(line->cl_option) ? "mail" : "no mail",
to_stdout ? "stdout" : "file",
foreground ? "running in foreground" : "running in background",
is_stdout(line->cl_option) ? "stdout" : "normal" );
error_e("child: could not close(pipe_pid_fd[0])");
pipe_fd[0] = pipe_fd[1] = -1;
- if ( ! to_stdout &&
- ( is_mail(line->cl_option) || is_mailzerolength(line->cl_option))){
+ if ( ! to_stdout && is_mail(line->cl_option) ) {
/* we create the temp file (if needed) before change_user(),
* as temp_file() needs root privileges */
/* if we run in foreground, stdout and stderr point to the console.