Re: options to notify login error
Martin Gregorie <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Organization | Martin Gregorie |
| Message-ID | <[email protected]> |
On Thu, 2020-08-27 at 10:35 +0200, INGeSI di Alessandro Barisone wrote: > Hi all, I'm setting up a server which will monitor several third > party > mail accounts, fetching email with getmail of course. > > Getmail will run scheduled, unattended. > > I'm looking if there's a way to get a notify (an email delivered to > the [destination] should be enough) which tells if getmail wasn't able > to login, or there was any other error fetching the emails > I run getmail from a cron job which executes every 10 minutes to fetch mail from a single source, split the incoming mail into two streams: one is delivered locally while the other is passed to Postfix for delivery. If getmail is unable to contact to the source, the cron script returns an error and crond reports this error to root via an email. This is default error handling for crond. I have my email system configured to redirect all mail for root to myself. So, since I assume that you'll also be using crond to periodically execute getmail, all you need to do is to configure the cron script to make crond send any getmail failure messages directly to yourself. Martin