Root user's sent mail

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Root user's sent mail

@lbutlr
The root user sends out some periodic mails to users. These mails get placed in /root/sent (an mbox file) instead of in /root/Maildir/.Sent/ (a Maildir directory).

It’s not a big deal, but it makes clearing the mails periodically slightly more difficult.

The mails are sent via a crontab entry much like this:
<command>  | mutt -e 'set content_type=text/html' -s "DMR  $($YDAY)" [hidden email] -b [hidden email]

main.cf:home_mailbox = Maildir/

But I suspect the issue here is mutt and not postfix?

--
ADVANCE TO THE REAR!


Reply | Threaded
Open this post in threaded view
|

Re: Root user's sent mail

Matus UHLAR - fantomas
On 30.04.18 08:07, LuKreme wrote:
>The root user sends out some periodic mails to users. These mails get placed in /root/sent (an mbox file) instead of in /root/Maildir/.Sent/ (a Maildir directory).

><command>  | mutt -e 'set content_type=text/html' -s "DMR  $($YDAY)" [hidden email] -b [hidden email]

>But I suspect the issue here is mutt and not postfix?

correct.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
It's now safe to throw off your computer.
Reply | Threaded
Open this post in threaded view
|

Re: Root user's sent mail

Noel Jones-2
In reply to this post by @lbutlr
On 4/30/2018 9:07 AM, LuKreme wrote:

> The root user sends out some periodic mails to users. These mails get placed in /root/sent (an mbox file) instead of in /root/Maildir/.Sent/ (a Maildir directory).
>
> It’s not a big deal, but it makes clearing the mails periodically slightly more difficult.
>
> The mails are sent via a crontab entry much like this:
> <command>  | mutt -e 'set content_type=text/html' -s "DMR  $($YDAY)" [hidden email] -b [hidden email]
>
> main.cf:home_mailbox = Maildir/
>
> But I suspect the issue here is mutt and not postfix?
>


Mutt (or whatever tool sends the mail) is responsible for saving the
"sent" copy.

See the mutt docs for how to save sent mail in a maildir folder, or
if you don't need copies of sent mail you can turn that feature off.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: Root user's sent mail

Philip Paeps
In reply to this post by @lbutlr
On 2018-04-30 08:07:07 (-0600), LuKreme wrote:

>The root user sends out some periodic mails to users. These mails get
>placed in /root/sent (an mbox file) instead of in /root/Maildir/.Sent/
>(a Maildir directory).
>
>It’s not a big deal, but it makes clearing the mails periodically
>slightly more difficult.
>
>The mails are sent via a crontab entry much like this:
><command>  | mutt -e 'set content_type=text/html' -s "DMR  $($YDAY)" [hidden email] -b [hidden email]
>
>main.cf:home_mailbox = Maildir/
>
>But I suspect the issue here is mutt and not postfix?

Correct.  You should configure Mutt to use Maildir rather than mbox:

    set mbox_type= Maildir

See the muttrc(5) manual for how to configure where sent mail is stored.  
You'll probably also want to set the `folder` and `record` options in
addition to `mbox_type`.

Philip

--
Philip Paeps
Senior Reality Engineer
Ministry of Information
Reply | Threaded
Open this post in threaded view
|

Re: Root user's sent mail

@lbutlr
On 2018-05-01 (04:27 MDT), Philip Paeps <[hidden email]> wrote:
>
> Correct.  You should configure Mutt to use Maildir rather than mbox:
>
>   set mbox_type= Maildir


Thank you (and Noel), this is a better option than my first idea (piping the sent box through formail -s)

--
"He is not only dull himself; he is the cause of dullness in others."
Samuel Johnson