Re: Multiple commands thru one keystroke
On 8/3/06, Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday, August 3 at 07:58 AM, quoth Asif Iqbal:
> How do I bind a key to scan a message thru spamassassin and then delete it?
With a macro.
> macro index S "| sudo -u qmailq -H sa-learn -D --spam | sudo -u
> qmailq
> -H spamassassin -D -r"
Heh... three observations: first, spamassassin -r includes doing the
same thing that sa-learn --spam does; there's no reason to use
sa-learn if you're also using spamassassin -r (if you don't believe
Duh!! Thanks
me, read the debug information that you're spewing out with the -D
flag). Second, why are you sudoing to another user? Third, why are you
My bayes database is owned by qmailq and I am doing site level scan only.
piping the output of sa-learn into spamassassin?
I know I shouldn't since it is redundant as you pointed out earlier
> macro index <delete> <delete-message>
That's not a macro. That's a binding. It's equivalent to:
bind index <delete> delete-message
Gotcha! get my terminologies right
Here's what you want:
macro index S '<pipe-message>sudo -u qmailq -H spamassassin -D
-r<enter><delete-message>'
It works like a champ. Excellent!
~Kyle
- --
A government which robs Peter to pay Paul can always depend on the
support of Paul.
-- George Bernard Shaw
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFE0gJTBkIOoMqOI14RAjxPAJ4mg8/2I8dtshz5moyd+BKG2fgtXgCfdTI+
nYjqVOOVD4nhYzfGp+ssRZU=
=AMEX
-----END PGP SIGNATURE-----
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu