[Cialug] Cygwin cron & "MAILTO"

Matt Stanton matt at itwannabe.com
Mon Aug 21 06:16:12 UTC 2017


Mail servers are touchy, especially with the amount of spam with which they have to deal.  It should work fairly easily if you are sending mail to a user on the same box, because most MTAs are set up to implicitly trust localhost.  If you are sending mail to a mail server over which you have control, you should add this machine's IP to the list of trusted agents (or, really, this machine should be one IP in a range for which that server delivers mail).

If you are trying to send mail to gmail or any other domain you don't control, things get extremely painful.  The first thing you should do is just set up a mail server you already run to deliver mail for this machine.  That could include setting up a user for this machine with google.

The problem with having another MTA route mail for you is that your machine might have to log in, and I'm not sure which commandline email clients do that (I'm sure they exist, I just can't think of one... maybe pine?).  Generally these clients are set up to deliver mail without needing to log in, because they are usually on trusted networks.

If you are trying to have a machine deliver mail without access to an MTA, you are in for a world of hurt.  You need to basically set up an MTA on the machine that wants to send mail, configure your domain so that your machine is authorized to deliver mail for your domain (not just an MX record but maybe also the corresponding SPL and/or DKIM records).  Also, this machine can't be listed as part of a block of customer/dynamic IP addresses (like, you wouldn't be able to send mail from a Comcast/Mediacom/Centurylink residential IP address).  You would basically be setting up half of an email server.

After you've done it a couple of times it gets easier, but it can be overwhelming at first, and since most "how-tos" are for setting up a server to receive mail, also, you probably won't have a lot of luck  finding help specific to your problem on Google.

-- Matt (N0BOX)

Sent from my android device.

-----Original Message-----
From: "L. V. Lammert" <lvl at omnitec.net>
To: Central Iowa Linux Users Group <cialug at cialug.org>
Sent: Sun, 20 Aug 2017 21:36
Subject: [Cialug] Cygwin cron & "MAILTO"

Would like to get emails sent when a cron job finishes, .. but,
unfortunately, the MTA (ssmtp) does not use aliases at all.

Found note that a "MAILTO" in the crontab will receive an email, but it
DNW.

Has anyone gotten it working?

	Lee
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list