Fernan Aguero | 2 Dec 2004 17:45
Picon

binding more than one action to a key?

Hi!

here's my situation: I filter spam with spamassassin and
would like to do some actions on messages that escape this
filter and end up on my inbox. Preferably I would like to
use just one key binding (they are called macros, aren't
they?) to do all of the following:

i) report message to Vipul's Razor ("| spamassassin -r")
ii) mark message as ham/spam ("| sa-learn --no-sync --ham/spam")
iii) save message to =spam

I can write a small perl script to do this and assign a
keybinding in mutt to pass the message to this program.
However, perhaps there is a way to do this without using an
external script?

Fernan

--

-- 
Fernán Agüero | Instituto de Investigaciones Biotecnológicas
email         | fernan at { iib.unsam.edu.ar , mail.retina.ar }
wwww          | http://genoma.unsam.edu.ar/~fernan
phone, fax    | +54 11 { 4580-7255 ext 310, 4752-9639 }

Michelle Konzack | 2 Dec 2004 18:25
Picon
Favicon

No messages from this list ?

Hello, 

since 25.11.2004 I do not get any messages from this mailinglist.

I have tried to resubscribe me, but the Mailinglist software tell
me, I am already subscribed... 

Is the Server curently broken ?

Greetings
Michelle

--

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)
Nicolas | 2 Dec 2004 10:07

Need help for macro index

Hello,

I want to define a macro index which:
- report a mail to the razor list
- learn the mail as spam for SpamAssassin

For the moment, I have the following 2 macro indexes in my .muttrc file:
macro index A "|/usr/bin/razor-report\n<delete-message>"
macro index S "|/usr/bin/sa-learn --spam  --no-sync --single\n<delete-message>"

I have to report the mail to razor (A letter) then undelete it and learn
it as spam. How can I do the 2 things with the same key? I don't know
how to do it with the pipe...

Thanks for the help.

Nicolas.

--

-- 
--- OxStOnE --------------  O
- Z750 & Linux -------  ._ /\_>
--- Powered ----------  (x)> (x)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Theo Vermeulen | 4 Dec 2004 17:51
Picon

Re: No messages from this list ?

> Hello,
>
> since 25.11.2004 I do not get any messages from this mailinglist.

My last received message was from the 27th. And this message only came in
today (the 4th), so I presume there is some kind of lag, an dthat the list
is slow

Greetings

Theo Vermeulen

Michael Kjorling | 4 Dec 2004 17:41

Re: binding more than one action to a key?

On 2004-12-02 13:45 -0300, fernan <at> iib.unsam.edu.ar wrote:
> i) report message to Vipul's Razor ("| spamassassin -r")
> ii) mark message as ham/spam ("| sa-learn --no-sync --ham/spam")
> iii) save message to =spam

Here's what I have set up. Feel free to adjust it for your own needs:

macro index S ":set wait_key=no\n|sa-learn --spam\n:set wait_key=yes\ns=spam/spam\ny"

As is, it expects the default key bindings and English prompts.

--

-- 
Michael Kjörling, michael <at> kjorling.com - http://michael.kjorling.com/
OpenPGP Fingerprint: 3723 9372 c245 d6a8 18a6 36ac  758F8749 BDE9ADA6
* ASCII Ribbon Campaign: Against HTML Mail, Proprietary Attachments *
* No bird soars too high if he soars with his own wings. -*- SM0YBY *

Thomas Glanzmann | 4 Dec 2004 16:47
Picon
Picon

Re: No messages from this list ?

Hello,

> Is the Server curently broken ?

I talked yesterday to TLR and he told me that he is going to fix the
issue. - I guess your message is a good sign. :-)

	Thomas

Adeodato Simó | 4 Dec 2004 16:23
Picon

Re: binding more than one action to a key?

* Fernan Aguero [Thu, 02 Dec 2004 13:45:25 -0300]:

> i) report message to Vipul's Razor ("| spamassassin -r")
> ii) mark message as ham/spam ("| sa-learn --no-sync --ham/spam")
> iii) save message to =spam

  er, have you tried the obvious? that is, something like:

    macro where w "| foo1<enter>| foo 2"

--

-- 
Adeodato Simó
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621
    Listening to: Mónica Naranjo - Desátame

When it is not necessary to make a decision, it is necessary not to make
a decision.

Nicolas Rachinsky | 4 Dec 2004 16:21
Picon

Re: binding more than one action to a key?

* Fernan Aguero <fernan <at> iib.unsam.edu.ar> [2004-12-02 13:45 -0300]:
> ii) mark message as ham/spam ("| sa-learn --no-sync --ham/spam")
> iii) save message to =spam
> 
> I can write a small perl script to do this and assign a
> keybinding in mutt to pass the message to this program.
> However, perhaps there is a way to do this without using an
> external script?

How about concatenating all the things the macro should do?

macro pager f "|somwhere\n|somwwhereelse\ns=folder\n"

You should use <pipe-message> instead of '|' and <save-message>
instead of 's'.

Nicolas

Patrick Shanahan | 4 Dec 2004 22:15
Picon

Re: binding more than one action to a key?

* Fernan Aguero <fernan <at> iib.unsam.edu.ar> [12-04-04 10:04]:
> here's my situation: I filter spam with spamassassin and would like to
> do some actions on messages that escape this filter and end up on my
> inbox. Preferably I would like to use just one key binding (they are
> called macros, aren't they?) to do all of the following:
> 
> i) report message to Vipul's Razor ("| spamassassin -r")
> ii) mark message as ham/spam ("| sa-learn --no-sync --ham/spam")
> iii) save message to =spam
> 
> I can write a small perl script to do this and assign a keybinding in
> mutt to pass the message to this program. However, perhaps there is a
> way to do this without using an external script?

A suggestion, rather than waiting for the above actions to be
completed, why don't you just send the *uncaught* spam to a
tem.mail.folder and write a cron script to perform the tasks while you
sleep?

ie:

/usr/bin/sa-learn --spam --mbox --sync /home/pat/mail/Spam
/usr/bin/razor-admin -discover
/usr/bin/razor-report /home/pat/mail/Spam
/bin/cat /home/pat/mail/Spam >> /home/pat/mail/Spam.old
/bin/rm /home/pat/mail/Spam
/usr/bin/touch /home/pat/mail/Spam

note: the touch action is to dispatch with the requirement to answer
the question to create a new mail box when the first spam is moved.
(Continue reading)

Adeodato Simó | 5 Dec 2004 01:56
Picon

Re: console special chars

* Fabien Wernli [Fri, 26 Nov 2004 09:24:32 +0100]:

> All non-ascii chars are garbled in the console, but work fine in an xterm
> window. I've been trying to solve this using different console fonts, and
> different locale settings with no luck. Best I can get is by switching
> locales to the default (empty or posix), then everything displays well in
> mutt, but gets sent garbled (vi displays all the accents when composing
> mail, but they appear in the form of ascii codes \2034 :()

  what does "mutt -Q charset" say?

--

-- 
Adeodato Simó
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621

The surest way to corrupt a youth is to instruct him to hold in higher
esteem those who think alike than those who think differently.
                -- F. Nietzsche


Gmane