On 5/7/20 9:25 AM, Robert Moskowitz wrote:


On 5/7/20 7:48 AM, Robert Moskowitz wrote:


On 5/6/20 11:34 PM, Cameron Simpson wrote:
On 07May2020 13:19, Cameron Simpson <c...@cskk.id.au> wrote:
On 06May2020 20:20, Robert Moskowitz <r...@htt-consult.com> wrote:
I am reading up on esmtp which comes with the base install and seemingly no mta needed?

Anyway
https://linux.die.net/man/5/esmtprc

shows how to config for sending an email via esmtp to an mta, but not just local delivery...

The bottom of that manual entry describes the "mta" setting, and says that esmtp relies on a local MTA for local delivery (addresses without an "@"). So you'll need something additional anyway. May as well go straight to a proper MTA.

And then, to my chagrin, I reread and see it provides example "mta" values like:

   /usr/bin/procmail -d %T

So you may be good there.

Would first have to install procmail for this.

It would be interesting to find a 'simple' python script to grab the cron output and 'make' an email and appended to the spool/mail

I am finding things about python and email that is leading me down many roads.

First is how does CRON even send emails?  The MAILTO option triggers where to send email, but what is the how?  What is CRON using to grab its output and stuff that into what emailer program?

My digging is that CRON needs some email server installed, like postfix, before it will send emails of its stdout.  But where is this controlled so I can change it?

Ah, looking at man crond.5:

       -m     This  option  allows  you  to specify a shell command to use for               sending Cron mail output instead of using sendmail(8) This  com‐               mand  must  accept a fully formatted mail message (with headers)               on standard input and send it as a mail message to the  recipi‐               ents  specified  in the mail headers.  Specifying the string off
              (i.e., crond -m off) will disable the sending of mail.

So all I need is a script at /usr/bin/mycron

#!/bin/sh

something
something

So what do I put in the -m arg and in mycron so that this output gets appended to /var/spool/mail/MAILTO

?

Thanks

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to