:: Re: [DNG] Problem with cron-job ema…
Top Page
Delete this message
Reply to this message
Author: Simon
Date:  
To: Devuan List
Subject: Re: [DNG] Problem with cron-job emails
Walter Dnes <waltdnes@???> wrote:

> This seems like a "Rube Goldberg contraption"
> https://en.wikipedia.org/wiki/Rube_Goldberg_machine where...
>
> * the cron job sends an email to my ISP's smtp server
> * which sends it to my inbound personal domain email host cotse.net
> * which I poll manually occasionally
>
> Is this *REALLY* necessary?


Apart from the other suggestions, this is how I set up my systems :

I run my own mail server, so ultimately all mail goes to that.

On each system, I install a minimal MTA (I’m a Postfix person, others have different preferences). This is configured to send all mail via smarthost (i.e. to my internal server) - which is one of the options available during install. In Postfix, it’s just a matter of adding "relayhost = mymailhost.mydomain“ to /etc/postfix/main.cf.
Alternatively, as long as the DNS is set up correctly such that the system sees my internal system as MX for my domain, then it can be just a regular MTA.

Then in /etc/aliases, I have entries like these :
postmaster:  root
www:         root
...
root:        user
user:        user@mydomain
These take care of redirecting mail to the cron user (often root for system level tasks) to myself.



So, going back to your original Rube Goldberg setup, simply configuring the system running the corncob to treat your internal mail server as a smart host will eliminate the out and back trip on the emails.


Simon