https://claws-mail.org/faq/api.php?action=feedcontributions&user=Bwlang&feedformat=atom Claws Mail FAQ - User contributions [en] 2024-03-29T05:20:39Z User contributions MediaWiki 1.35.7 https://claws-mail.org/faq/index.php?title=Using_Claws_Mail_with_other_programs&diff=1535 Using Claws Mail with other programs 2006-09-12T16:56:53Z <p>Bwlang: %F -&gt; %f , otherwise multiple messages don't work</p> <hr /> <div>=== How can I use Sylpheed-Claws with bogofilter? ===<br /> <br /> First of all, make sure you have trained bogofilter; for different training methods, see [http://bogofilter.sourceforge.net/faq.shtml#training http://bogofilter.sourceforge.net/faq.shtml#training]. Method 4 is recommended, but requires a large number of ham and spam messages.<br /> <br /> Add a new filtering rule: you need a filtering condition which runs bogofilter on incoming messages; and an action that has to be performed if the message was recognised as spam.<br /> Go to the Filtering Configuration dialog, and type the following in the condition entry field:<br /> &lt;br&gt;<br /> &lt;pre&gt;test &quot;bogofilter -u &lt; %F&quot;&lt;/pre&gt;<br /> Note 1: this assumes that bogofilter is in your path!&lt;br&gt;<br /> Note 2: the -u parameter of bogofilter registers the message automatically as either spam or ham.<br /> <br /> Next add an action in the Action field. The best way is to use the Define... button next to the field. As an example, if you wanted to move a spam messages to a directory called Spam, then the final action, put in the field, could look like this:<br /> &lt;br&gt;<br /> &lt;pre&gt;move &quot;#mh/Mailbox/Spam&quot;&lt;/pre&gt;<br /> <br /> After having added the filtering rule you probably want to create two Sylpheed-Claws Actions: one for marking messages as spam, and one for marking messages as ham. These actions can be used to correct bogofilter and/or to train it with additional messages. For example, if the above filtering rule did not detect a spam message correctly, delivering it to your inbox, you can manually correct this by invoking a &quot;Mark As Spam&quot; action. As an added bonus, Actions are automatically added to the main menu (under Tools|Actions), and can also be added to the main toolbar.<br /> <br /> Open the Actions dialog (Configuration | Actions...). In the Menu name field, enter the following:<br /> &lt;br&gt;<br /> &lt;pre&gt;Mark As Spam&lt;/pre&gt;<br /> This is just the text as it would appear in the Tools|Actions submenu.<br /> <br /> The accompanying command line for Mark As Spam should be:<br /> &lt;br&gt;<br /> &lt;pre&gt;bogofilter -Ns -B %F&lt;/pre&gt;<br /> (Don't forget to use the Add button!)<br /> <br /> Likewise, the same thing you should do for marking messages as ham. Select &quot;New&quot; in the Current actions list, and enter the following in the Menu name:<br /> &lt;br&gt;<br /> &lt;pre&gt;Mark As Ham&lt;/pre&gt;<br /> <br /> The command line for this action should be:<br /> &lt;br&gt;<br /> &lt;pre&gt;bogofilter -Sn -B %F&lt;/pre&gt;<br /> And add the action by clicking the Add button.<br /> <br /> This gives you a basic setup for bogofilter and Sylpheed-Claws.<br /> <br /> <br /> === How can I use Sylpheed-Claws with Popfile? ===<br /> You can reclass messages received trough a Popfile filter with a header link or a button in Sylpheed-Claws.<br /> Popfile lives @ http://popfile.sourceforge.net/ <br /> <br /> First read the Popfile documentation on how to set up the mail client to use Popfile.<br /> <br /> You have 2 options to reclass received messages: a simple one (header link) and a difficult one (toolbar button).<br /> <br /> '''1) Simple method'''<br /> <br /> * Open the Popfile control center, go to the &quot;Buckets&quot; tab, and make sure ALL buckets have the ''X-POPFile-Link Header'' turned on.<br /> * Open Sylpheed-Claws preferences window, go to Message view -&gt; Text options.<br /> * Edit the header display options, in the &quot;Displayed header configuration&quot; dialog add ''X-POPFile-Link'' to the displayed headers.<br /> * All messages received via Popfile will have a header link (just above the message body) called ''X-POPFile-Link'', something like this: ''X-POPFile-Link: http://127.0.0.1:7070/jump_to_message?view=6491'' - you can click on it and Claws will open the link with the browser you set up in preferences.<br /> <br /> '''2) difficult method'''<br /> <br /> You will need 3 things:<br /> * a bash script<br /> * a Sylpheed-Claws action<br /> * change Popfile configuration a bit.<br /> <br /> '''The bash script:'''<br /> &lt;pre&gt;<br /> #!/bin/bash<br /> url=`cat $1 | grep -e X-POPFile-Link:.* -o|grep http.* -o`<br /> firefox $url<br /> &lt;/pre&gt;<br /> <br /> Save it as /some/path/popreclass.sh<br /> &lt;br&gt;''Change firefox to another browser executable if needed.''<br /> <br /> '''The action:'''<br /> &lt;br&gt;/some/path/popreclass.sh &quot;%f&quot;<br /> &lt;br&gt;''You can set up a toolbar buttor for the action later''<br /> <br /> '''Popfile configuration'''<br /> &lt;br&gt;Go to http://127.0.0.1:8080/configuration, and make sure the '''X-POPFile-Link Header''' option is turned '''ON'''.<br /> &lt;br&gt;''Your popfile URL might be different.''<br /> <br /> You will be able to reclass messages that were received with the above option turned ON.<br /> <br /> === How can I use Sylpheed-Claws with SpamAssassin? ===<br /> <br /> To train spamassassin in Sylpheed-Claws (&gt;=1.9.6):<br /> &lt;br&gt;<br /> Menu &gt; Configuration &gt; Actions<br /> &lt;br&gt; In 'Menu Name' add &quot;Mark as Spam&quot;<br /> &lt;br&gt; In 'Command line' add -sa-learn --spam %F-<br /> &lt;br&gt; click the Add button<br /> &lt;br&gt;<br /> Menu &gt; Configuration &gt; Actions<br /> &lt;br&gt; In 'Menu Name' add &quot;Mark as Ham&quot;<br /> &lt;br&gt; In 'Command line' add -sa-learn --ham %F-<br /> &lt;br&gt; click the Add button<br /> <br /> &lt;br&gt; If you want to have the mail learned on a remote mail server, that's possible with a 'Command line' like this:<br /> &lt;br&gt; ssh host.domain sa-learn --ham &lt; %f<br /> &lt;br&gt; It works best if you have already setup ssh to use keys for authentication.<br /> <br /> &lt;br&gt; then select a message, &lt;b&gt;Menu Tools &gt; Actions&lt;/b&gt;<br /> will have the new actions to mark your email as Spam/Ham. Once you click one of the buttons spamassassin will process your request - this takes time so be patient and dont click on the 'cancel' button.</div> Bwlang https://claws-mail.org/faq/index.php?title=Using_Claws_Mail_with_other_programs&diff=1534 Using Claws Mail with other programs 2006-09-12T16:41:45Z <p>Bwlang: adds note about how to remote learn</p> <hr /> <div>=== How can I use Sylpheed-Claws with bogofilter? ===<br /> <br /> First of all, make sure you have trained bogofilter; for different training methods, see [http://bogofilter.sourceforge.net/faq.shtml#training http://bogofilter.sourceforge.net/faq.shtml#training]. Method 4 is recommended, but requires a large number of ham and spam messages.<br /> <br /> Add a new filtering rule: you need a filtering condition which runs bogofilter on incoming messages; and an action that has to be performed if the message was recognised as spam.<br /> Go to the Filtering Configuration dialog, and type the following in the condition entry field:<br /> &lt;br&gt;<br /> &lt;pre&gt;test &quot;bogofilter -u &lt; %F&quot;&lt;/pre&gt;<br /> Note 1: this assumes that bogofilter is in your path!&lt;br&gt;<br /> Note 2: the -u parameter of bogofilter registers the message automatically as either spam or ham.<br /> <br /> Next add an action in the Action field. The best way is to use the Define... button next to the field. As an example, if you wanted to move a spam messages to a directory called Spam, then the final action, put in the field, could look like this:<br /> &lt;br&gt;<br /> &lt;pre&gt;move &quot;#mh/Mailbox/Spam&quot;&lt;/pre&gt;<br /> <br /> After having added the filtering rule you probably want to create two Sylpheed-Claws Actions: one for marking messages as spam, and one for marking messages as ham. These actions can be used to correct bogofilter and/or to train it with additional messages. For example, if the above filtering rule did not detect a spam message correctly, delivering it to your inbox, you can manually correct this by invoking a &quot;Mark As Spam&quot; action. As an added bonus, Actions are automatically added to the main menu (under Tools|Actions), and can also be added to the main toolbar.<br /> <br /> Open the Actions dialog (Configuration | Actions...). In the Menu name field, enter the following:<br /> &lt;br&gt;<br /> &lt;pre&gt;Mark As Spam&lt;/pre&gt;<br /> This is just the text as it would appear in the Tools|Actions submenu.<br /> <br /> The accompanying command line for Mark As Spam should be:<br /> &lt;br&gt;<br /> &lt;pre&gt;bogofilter -Ns -B %F&lt;/pre&gt;<br /> (Don't forget to use the Add button!)<br /> <br /> Likewise, the same thing you should do for marking messages as ham. Select &quot;New&quot; in the Current actions list, and enter the following in the Menu name:<br /> &lt;br&gt;<br /> &lt;pre&gt;Mark As Ham&lt;/pre&gt;<br /> <br /> The command line for this action should be:<br /> &lt;br&gt;<br /> &lt;pre&gt;bogofilter -Sn -B %F&lt;/pre&gt;<br /> And add the action by clicking the Add button.<br /> <br /> This gives you a basic setup for bogofilter and Sylpheed-Claws.<br /> <br /> <br /> === How can I use Sylpheed-Claws with Popfile? ===<br /> You can reclass messages received trough a Popfile filter with a header link or a button in Sylpheed-Claws.<br /> Popfile lives @ http://popfile.sourceforge.net/ <br /> <br /> First read the Popfile documentation on how to set up the mail client to use Popfile.<br /> <br /> You have 2 options to reclass received messages: a simple one (header link) and a difficult one (toolbar button).<br /> <br /> '''1) Simple method'''<br /> <br /> * Open the Popfile control center, go to the &quot;Buckets&quot; tab, and make sure ALL buckets have the ''X-POPFile-Link Header'' turned on.<br /> * Open Sylpheed-Claws preferences window, go to Message view -&gt; Text options.<br /> * Edit the header display options, in the &quot;Displayed header configuration&quot; dialog add ''X-POPFile-Link'' to the displayed headers.<br /> * All messages received via Popfile will have a header link (just above the message body) called ''X-POPFile-Link'', something like this: ''X-POPFile-Link: http://127.0.0.1:7070/jump_to_message?view=6491'' - you can click on it and Claws will open the link with the browser you set up in preferences.<br /> <br /> '''2) difficult method'''<br /> <br /> You will need 3 things:<br /> * a bash script<br /> * a Sylpheed-Claws action<br /> * change Popfile configuration a bit.<br /> <br /> '''The bash script:'''<br /> &lt;pre&gt;<br /> #!/bin/bash<br /> url=`cat $1 | grep -e X-POPFile-Link:.* -o|grep http.* -o`<br /> firefox $url<br /> &lt;/pre&gt;<br /> <br /> Save it as /some/path/popreclass.sh<br /> &lt;br&gt;''Change firefox to another browser executable if needed.''<br /> <br /> '''The action:'''<br /> &lt;br&gt;/some/path/popreclass.sh &quot;%f&quot;<br /> &lt;br&gt;''You can set up a toolbar buttor for the action later''<br /> <br /> '''Popfile configuration'''<br /> &lt;br&gt;Go to http://127.0.0.1:8080/configuration, and make sure the '''X-POPFile-Link Header''' option is turned '''ON'''.<br /> &lt;br&gt;''Your popfile URL might be different.''<br /> <br /> You will be able to reclass messages that were received with the above option turned ON.<br /> <br /> === How can I use Sylpheed-Claws with SpamAssassin? ===<br /> <br /> To train spamassassin in Sylpheed-Claws (&gt;=1.9.6):<br /> &lt;br&gt;<br /> Menu &gt; Configuration &gt; Actions<br /> &lt;br&gt; In 'Menu Name' add &quot;Mark as Spam&quot;<br /> &lt;br&gt; In 'Command line' add -sa-learn --spam %F-<br /> &lt;br&gt; click the Add button<br /> &lt;br&gt;<br /> Menu &gt; Configuration &gt; Actions<br /> &lt;br&gt; In 'Menu Name' add &quot;Mark as Ham&quot;<br /> &lt;br&gt; In 'Command line' add -sa-learn --ham %F-<br /> &lt;br&gt; click the Add button<br /> <br /> &lt;br&gt; If you want to have the mail learned on a remote mail server, that's possible with a 'Command line' like this:<br /> &lt;br&gt; ssh host.domain sa-learn --ham &lt; %F<br /> &lt;br&gt; It works best if you have already setup ssh to use keys for authentication.<br /> <br /> &lt;br&gt; then select a message, &lt;b&gt;Menu Tools &gt; Actions&lt;/b&gt;<br /> will have the new actions to mark your email as Spam/Ham. Once you click one of the buttons spamassassin will process your request - this takes time so be patient and dont click on the 'cancel' button.</div> Bwlang