On 22 Feb 2017, at 22:30, Stan Ryckman <stanr(_at_)shelltown(_dot_)net> wrote:
On 2017-02-22 20:24, @lbutlr wrote:
[snip]
:0fw
| (formail -rt -I"Subject: ${LISTNAME} ${SUBJECT}" \
-I"From: ${MOFROM}" \
-I"To: ${MOBILE}" ; \
echo $SMSTEXT) | $SENDMAIL -t
:0
.trapped/
}
LOG="END OF SMS_PROCMAIL${NL}"
VERBOSE=OFF
Two things happen with this. First, the message is not sent with the
From header I set and two, and empty (as in 0 byte) “messages” falls
through to be written in .trapped.
Frankly, it’s been too long since I really hammered on procmail much,
and most of what I knew has evaporated.
I'm a little rusty myself, but is it possible that your $SENDMAIL
doesn't think you are authorized to set "From:"?
No. I think I way have bene wrong about that. Or it fixed itself. I trapped a copy of the message at the server and it is right (but is not triggering ifttt, but that is entirely different and unrelated).
Also, is it possible that your $SENDMAIL thinks that a 0-byte message
is an error (which would then be interpreted as failure to deliver
due to the w flag, and thus drop through to .trapped)?
No, a message is sent. But a 9 byte "message" exists after and that's why I created the .rapped rule so I could make sure all the messaged trapped are actually 0 bytes.
You should be able to test those two things by piping something
to $SENDMAIL directly from the shell, and thereby see if the
problem is outside the script.
Yes. I can send the message I want from the shell (and now from procmail), but I still have the 0 byte phantom.
--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.