Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 70623

Summary: Improved fcron mail output
Product: Gentoo Linux Reporter: Rob Kruus <crowbar>
Component: New packagesAssignee: Cron Team <cron-bugs+disabled>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: High    
Version: 2004.2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to job.c
The actual patch....
Now that I got the diff command right.....

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
2.9.5.1
   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.