On May 4, 2018, at 10:28, Tanstaafl <tanstaafl at libertytrek.org> wrote:> On Fri May 04 2018 10:59:22 GMT-0400 (Eastern Standard Time), LuKreme > <kremels at kreme.com> wrote: >> The mail is crontab mail that is sent out to users via mutt. What would be the "right? way to do this? (The cron tasks run as root because they are scanning system logs on behalf of certain users and those scans cannot be run as the user.) > > Alias the local 'root' user to another account. This is best practice > anyway...For incoming mail the root user is aliased, but mail sent from cron via mutt is saved in root's home folder (was in /root/sent but I did get mutt to save it in /root/Maildir/.Sent/ instead. I don't see anyway to change this, so I was hoping to expire the mail via doveadm. -- My main job is trying to come up with new and innovative and effective ways to reject even more mail. I'm up to about 97% now.
LuKreme skrev den 2018-05-04 20:40:>> Alias the local 'root' user to another account. This is best practice >> anyway...+1> For incoming mail the root user is aliased, but mail sent from cron > via mutt is saved in root's home folder (was in /root/sent but I did > get mutt to save it in /root/Maildir/.Sent/ instead.outgoing mail should not be stored into root uid 0 but that is still not sure mutt does allow that try imap: auth, and do stay away from filesystem as root user> I don't see anyway to change this, so I was hoping to expire the mail > via doveadm.in gentoo its # cat /etc/mail/aliases root: some-other-unix-login or root: some-other-email-with-snable-a after this file is edited, issue a "newaliases && postfix reload" :)
On May 4, 2018, at 16:07, Benny Pedersen <me at junc.eu> wrote:> > outgoing mail should not be stored into root uid 0And yet it is.> root: some-other-unix-loginRoot has been aliased for decades. This has no impact on where and how mutt stores the mail it sends as root out of root?s crontab. -- My main job is trying to come up with new and innovative and effective ways to reject even more mail. I'm up to about 97% now.