Page MenuHomePhabricator

Errors in e-mail pipes should go to local error log, not e-mail sender
Closed, DeclinedPublic

Description

wikibugs' .forward contains:

jmail /data/project/wikibugs/toredis.py wikibugs-l 2>&1 > /data/project/wikibugs/mailerror.log

When 'jmail' fails for some reason, the error log does not end up in /data/project/wikibugs/mailerror.log, however, but in a reply to the e-mail sender.

Some ideas:

  1. get .forward to actually listen to pipe redirection, or
  2. always pipe logs to a specific mail error file, or
  3. make sure replies are always cc'ed to the tool authors

Version: unspecified
Severity: normal

Details

Reference
bz70003

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:42 AM
bzimport added a project: Toolforge.
bzimport set Reference to bz70003.

Redirection doesn't do what you expect because jmail actually fires up a grid job for processing the email; so the redirection sends output from the job /submission/ not its actual execution.

Right now, jmail uses the fairly common convention that if the mail handler fails for any reason, it generates a bounce with the output. It doesn't seem unreasonable to provide for a parameter to jmail to allow different handling (e.g.: accept the mail quietly and log to a file) but then the sender is left without an indication that whatever it tried to do by sending mail didn't actually happen.

I actually meant the output from the jmail submission -- if job submission fails (e.g. SGE queue out of space), jmail (I assume) sends the error to stderr, and then the mail daemon mails it back. That's the error I'd like to receive -- anything further on can be handled in the shell script jmail invokes.

Ah! Hm. I'll need to consider the right way to do that; that behaviour comes from exim itself. Perhaps an additional level of error checking around the jsub would work.

coren removed coren as the assignee of this task.Mar 25 2015, 7:40 PM
coren triaged this task as Medium priority.
coren set Security to None.
bd808 subscribed.

jmail was removed in T208579