Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70623 - Improved fcron mail output
Summary: Improved fcron mail output
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Cron Team
Depends on:
Reported: 2004-11-09 16:53 UTC by Rob Kruus
Modified: 2004-11-19 07:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

patch to job.c (fcron_job.c.patch,1.37 KB, patch)
2004-11-09 16:54 UTC, Rob Kruus
Details | Diff
The actual patch.... (fcron_job.c.patch,1.36 KB, patch)
2004-11-09 16:59 UTC, Rob Kruus
Details | Diff
Now that I got the diff command right..... (fcron_job.c.patch,1.36 KB, patch)
2004-11-09 17:02 UTC, Rob Kruus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Kruus 2004-11-09 16:53:13 UTC
I made a little patch to enhance the mail output of fcron jobs.
It adds a "date" "from" fields, and modifies the subject line a bit.
The default mail output with simple mail setup (esmtp and procmail into a maildir) didn't quit cut it.

Probably needs testing on other systems....
Comment 1 Rob Kruus 2004-11-09 16:54:08 UTC
Created attachment 43626 [details, diff]
patch to job.c

Well, here it is....
Comment 2 Rob Kruus 2004-11-09 16:59:30 UTC
Created attachment 43628 [details, diff]
The actual patch....

This is the real one....really
Comment 3 Rob Kruus 2004-11-09 17:02:51 UTC
Created attachment 43629 [details, diff]
Now that I got the diff command right.....

Any one have a gun?
Comment 4 Aaron Walker (RETIRED) gentoo-dev 2004-11-10 05:47:43 UTC
SpanKY, weren't you going to take care of the cron@ alias?
Comment 5 Aaron Walker (RETIRED) gentoo-dev 2004-11-10 05:53:08 UTC
Sorry SpanKY, I was thinking this was a dcron bug.
Comment 6 SpanKY gentoo-dev 2004-11-10 12:08:29 UTC
it was flagged as 'disabled' but i guess that wasnt enough ...

renamed account to 'cron-dead'
Comment 7 Aaron Walker (RETIRED) gentoo-dev 2004-11-18 07:44:03 UTC
Rob, just curious, but what version of fcron are you using?  The development versions (currently 2.9.x.x) have improved mail headers over 2.0.x.

As far as your patch goes, I really want to avoid patching fcron (or any other program) based on one users preference, as another user might not like it at all.  The only way I'd accept a patch for this, is if you made the subject and other fields configurable via fcron.conf (maybe use format specifiers, ie. %c for the command executed).

For now, I'm closing this as WONTFIX.  If you decide to write such a patch, feel free to reopen this bug.
Comment 8 Rob Kruus 2004-11-19 07:14:13 UTC
   The main resaon for the patch was that the regular fcron mail output had no From or Date line at all.
  The date line is just the standard rfc-2822 email date(no options needed), and the From is just the "Cron Daemon" and the user@host.
The little change to the subject line code can be removed from the patch.

  As I said, I don't run any mail server on my laptop, so the mail goes through esmtp and procmail, which don't add any headers (yes, I did fiddle a bit with procmail and formail for adding headers but fcron already had all that was needed for those).

  Maybe I'm missing something in fcron by not getting those e-mail headers.... Either way, no big deal to me.  I'll send it to fcron to see what they think up there.