Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Need a primitive to pipe messages through shell commands. #51

skx opened this Issue Jul 6, 2013 · 1 comment


None yet
1 participant

skx commented Jul 6, 2013

Right now we can invoke ! to execute a shell command globally, but we also need another similar thing to pipe a message through a shell command.

Consider a mark_spam() function that wants to train a message as being bogus. Currently I just save messages in ~/Maildir/.new-spam/ and a cronjob picks it up to train it.

However I can imagine that somebody else will want to pipe through spam_bayes, crm114, or similar.

We can already execute commands via os.exec the only part missing is getting the path to the current message.

Suggest: message() will return the path to the currently selected message, then we can do things like:

os.exec( "train-as-spam " .. message() )

@skx skx closed this in 0d74fb4 Jul 6, 2013


skx commented Jul 6, 2013

Annoyingly I'd already written current_message so this bug was bogus to begin with.

Reverted the new primitive message(), but updated the implementation of current_message() with the newer code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment