Hello, Rudolf and Ralph!
|>> is it possible, when using S/MIME, to sign the mail only sometimes?
|>> (Mostly, it is redundant, only sometimes it's really wanted.)
|>
|> Are you aware of `asksign' in mail(1)? Also, smime-sign-cert-USER@HOST
|> means it can be turned on for particualar `From:', or `Sender:',
|> addresses.
Sorry for responding so late!
So i have implemented two new hooks, *on-compose-enter* and
*on-compose-leave*, which will set some variables so that at least
a little bit of knowledge of the composed message is available,
namely *compose-{from,sender,to,cc,bcc,subject}*.
Note that `localopts' is by default enabled (now also for
`account's and the folder hooks), here meaning that settings will
be reversed when the message has been sent.
This is of course nothing but a hack that will have to be changed
into something really acceptable in v15+, but it is definetely the
best that is possible today. *from* and *sender* isn't yet so
bright, currently i hope i can improve this a bit until the v14.9
release, but the handling of *from* etc. is hairy and has bitten
me several times in the past. (Due to that often occuring
reevaluation of strings, to be exact. I would prepare things as
good as possible once, go through compose mode, and then do it
again, taking care not to throw away explicit user modifications.
But not before v15.)
Anyway, you could say
LC_ALL=C printf 'm bob\n~s ubject\nText\n~.\nx\n' |
LC_ALL=C ./s-nail -:/ -d# \
-Son-compose-enter=oncomp -Son-compose-leave=oncomp \
-X 'define oncomp {' \
-X ' echo compose-from ${compose-from}' \
-X ' echo compose-sender ${compose-sender}' \
-X ' echo compose-to ${compose-to}' \
-X ' echo compose-cc ${compose-cc}' \
-X ' echo compose-bcc ${compose-bcc}' \
-X ' echo compose-subject ${compose-subject}' \
-X ' if ${compose-to} =@ s-mailx' \
-X ' set message-inject-tail="--\nMercy, Mercy Me"' \
-X ' endif' \
-X '}'
except that you can't because until now -X doesn't support macro
definition, and again i hope for v14.9. But you get the idea.
So say -:u instead and place that thing in your ~/.mailrc.
I hope this helps a bit,
Ciao!
--steffen
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
__________________________________
[email protected]