On Fri, Feb 12, 2021 at 10:20:09PM -0000, Grant Edwards wrote:
> On 2021-02-12, Derek Martin <inva...@pizzashack.org> wrote:
> > On Fri, Feb 12, 2021 at 05:09:36PM -0000, Grant Edwards wrote:
> >> On 2021-02-12, Derek Martin <inva...@pizzashack.org> wrote:
> >> >>> as I would have to be monitoring the logs to make sure the e-mail
> >> >>> was actually sent.
> >> >> 
> >> >> You do (or you need to make sure that you receive bounce/retry/failure
> >> >> notices properly).
> >> >
> >> > You don't... every major MTA has a tool for monitoring the outgoing
> >> > mail queue.  You just run it and it tells you if there is any pending
> >> > outgoing e-mail.
> >> 
> >> To me that seems pretty much equivalent to "monitorying the logs".
> >
> > I think the difference is monitoring the logs is something you have to
> > actively do, which means you also need to remember to do it...
> 
> Ah, I see. I assumed that that "monitoring logs" was something one
> would do with an automated tool/script.

I mean I suppose so... but that seems much more involved than just 

  numreqs=`mailq |grep 'Total' | awk '{ print $3 }'`; if [ $numreqs -ne 0 ]; 
then echo "mail queue has $numreqs requests queued"; fi

[Exact details may vary from system to system, but should be pretty
similar to this one-liner in general.]
 
You'd have to figure out what your logs actually look like when queued
mail isn't getting delivered, then install and configure your tool to
monitor for those logs... which might be prone to break if your MTA
gets upgraded.  Still not quite equivalent--it wouldn't be my choice.

Then I'm not sure but IIRC some MTAs don't log about queued mail not
getting delivered until it has failed to deliver for some time.  If so
you would not get timely results, not like what the OP is looking for,
so in that case it wouldn't be an adequate solution anyway.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: signature.asc
Description: PGP signature

Reply via email to