<<< Date Index >>>     <<< Thread Index >>>

Re: Multiple commands thru one keystroke



-----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 
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 
piping the output of sa-learn into spamassassin?

> macro index <delete> <delete-message>

That's not a macro. That's a binding. It's equivalent to:

    bind index <delete> delete-message

Here's what you want:

    macro index S '<pipe-message>sudo -u qmailq -H spamassassin -D 
-r<enter><delete-message>'

~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-----