[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] mts.conf has me Baffled.
From: |
Bob Carragher |
Subject: |
Re: [Nmh-workers] mts.conf has me Baffled. |
Date: |
Tue, 28 Jul 2015 15:29:34 -0700 |
On Tue, 28 Jul 2015 01:40:11 -0400 Ken Hornstein <address@hidden> sez:
> >The one thing my script doesn't have access to is whether the
> >message posting was successful -- at least in the sense of
> >whether send (or comp, before it) thinks it completed
> >successfully. I don't believe either provides a return value
> >that Bash could use. And so I've had to save the output
> >generated by the script and eyeball it after-the-fact, and if
> >something failed then manually resend.
>
> Actually, I just checked ... at least in my simple test, send(1)
> will set an exit code of 0 if it believes the messages was submitted
> successfully, a 1 if it does not. So you could test the value of $?
> after you call send(1). Or even just use an if statement like:
>
> if send <some arguments here>; then
> do successful send stuff
> else
> do failure stuff
> fi
>
> If you're submitting directly to a non-local SMTP server, that's
> probably a reasonable way to test for successful message submission.
Ah, you're right! My script had a bug that caused it to check a
different result. Thanks!
Bob
Re: [Nmh-workers] mts.conf has me Baffled., Ken Hornstein, 2015/07/27