Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192452 - sys-process/vixie-cron - Add mail from capability
Summary: sys-process/vixie-cron - Add mail from capability
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Deadline: 2019-10-11
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2007-09-13 19:47 UTC by Heath Caldwell (RETIRED)
Modified: 2019-10-11 15:07 UTC (History)
6 users (show)

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


Attachments
Patch to implement MAILFROM feature (vixie-cron-4.1-mailfrom.patch,4.08 KB, patch)
2008-10-08 18:22 UTC, Heath Caldwell (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Heath Caldwell (RETIRED) gentoo-dev 2007-09-13 19:47:15 UTC
At our installation, mail with a from address that claims to be from our domain is dropped if the user is not known.  Local service accounts (which don't count as real users in this context) run cron jobs, with their mails being dropped because of this policy.

We would like to be able to tell cron to use a different from address in the envelope in much the same way that you can tell it to use a different recipient using the MAILTO variable.  I propose using a MAILFROM variable for this.

I think this feature would be useful for others as well as for our situation.

I can write the patch, I just wanted to check to see if you would consider including and distributing it before I went through the trouble.

Reproducible: Always

Steps to Reproduce:
Comment 1 Paul B. Henson 2007-09-13 20:00:31 UTC
Just to clarify, the current command cron uses to send mail is:

/usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t

The proposed enhancement would allow specifying the envelope from address (not the header from address, which is already root), and basically result in cron running:

/usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t -f$MAILFROM


It's pretty trivial, but we don't want to maintain a custom cron ebuild so if you're not interesting in adding it in portage we'll probably use a postfix rewriting map instead. This seems cleaner though.

Another possibility would be to just hardcode -froot, considering that the header From is already root anyway, then they would just match. Currently the envelope from is the user whose job is running.
Comment 2 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-10-08 14:19:10 UTC
IMHO opinion this is good feature to have. feel free to attach a patch. whether we can include it largely depends on the patch - so no promises yet...
Comment 3 Heath Caldwell (RETIRED) gentoo-dev 2008-10-08 18:22:05 UTC
Created attachment 167640 [details, diff]
Patch to implement MAILFROM feature
Comment 4 Tom Hendrikx 2009-02-25 20:55:24 UTC
Any news on whether this patch will be included?
Comment 5 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-05-14 16:51:21 UTC
cronie - a fork of vixie-cron - has this change in its vcs.
http://git.fedoraproject.org/git/?p=cronie.git;a=commit;h=48f16e2f14e3f22e5036c99c306e1262430f8bb6
Comment 6 Leho Kraav (:macmaN @lkraav) 2018-11-22 12:34:22 UTC
https://github.com/cronie-crond/cronie/issues/17 also added MAILFROM support for anacron in cronie-1.5.2, so I'd just recommend migrating.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 15:07:55 UTC
Package removed.