https://www.claws-mail.org/faq/api.php?action=feedcontributions&user=Shlomif&feedformat=atom Claws Mail FAQ - User contributions [en] 2024-03-29T08:51:32Z User contributions MediaWiki 1.35.7 https://www.claws-mail.org/faq/index.php?title=User:Shlomif&diff=2201 User:Shlomif 2011-06-17T17:49:13Z <p>Shlomif: Add some rudimentary information about myself.</p> <hr /> <div>My name is Shlomi Fish, and I've been playing with Claws Mail since 17 June, 2011. I registered on this wiki in order to correct a Bash script that was available here.<br /> <br /> * [http://www.shlomifish.org/ My home site]<br /> * [http://en.wikipedia.org/wiki/User:Shlomif User page on the Wikipedia] (with links to other wikis).</div> Shlomif https://www.claws-mail.org/faq/index.php?title=Talk:Main_Page&diff=2200 Talk:Main Page 2011-06-17T17:46:47Z <p>Shlomif: Shouldn't the FAQ be entirely on one page?</p> <hr /> <div>On Windows Vista, how can I save address book and mails?<br /> <br /> In what directory are the files?<br /> <br /> Thanks,<br /> Jean.<br /> <br /> == Shouldn't the FAQ be entirely on one page? ==<br /> <br /> According to the [http://producingoss.com/en/producingoss.html#all-as-archives &quot;Producing Open Source Software&quot; book], the FAQ should be available as a &lt;b&gt;single&lt;/b&gt; web-page. Shouldn't it be the case for this FAQ as well. [[User:Shlomif|Shlomif]] 19:46, 17 June 2011 (CEST)</div> Shlomif https://www.claws-mail.org/faq/index.php?title=Filtering_and_Processing_of_Messages&diff=2199 Filtering and Processing of Messages 2011-06-17T14:59:51Z <p>Shlomif: Add some missing test statements in if clauses.</p> <hr /> <div>&lt;div id=age&gt;<br /> === What type of value do the &quot;age ...&quot; match types in the filtering configuration expect? ===<br /> <br /> You simply have to add the value in days. If you want for example to select messages older than a month, enter 30 or 31.<br /> <br /> Example of a folder processing rule of the &quot;mailbox/claws-mail/&quot; Folder, that move messages older that 60 days to an archive folder:<br /> &lt;pre&gt;<br /> age_greater 60 move &quot;#mh/mailbox/claws-mail/archive&quot;<br /> &lt;/pre&gt;<br /> <br /> '''Note:''' Age checks are done against the 'Date'-header in the mail. So if the sender has misconfigured his computer and sends mails with a wrong date, the rule could move mails instantly if the date is more then 60 days in the past or never when it is in the future.<br /> &lt;/div&gt;<br /> === Can I filter messages based on Content-Type of attachments, for example &quot;application/x-msdownload&quot;? ===<br /> <br /> Yes. Select Match Type 'Body part' and enter the Value &lt;code&gt;Content-Type: application/x-msdownload&lt;/code&gt;.<br /> <br /> Please note that application/octet-stream is also a potential infected content (.pif for instance).<br /> You can also use a more generic case-insensitive regexp matching rule against the 'Body part' like the following one:&lt;br&gt;<br /> &lt;pre&gt;<br /> Content\-Type: ~[[a-z0-9_/-]]+; name=&quot;~[[^\.]]+\.(bat|pif|cmd|vbs|vba|scr|lnk|com|exe|java|asp|cgi)&quot;<br /> &lt;/pre&gt;<br /> <br /> '''Note:''' This will also match text inside the message and not only the Content-Type, so be aware of messages discussing the structure of MIME-Mails.<br /> <br /> === What is the difference between Filtering, Folder Processing, Pre/Post-processing? ===<br /> <br /> Filtering rules are global. Messages received on an Account can be filtered in 2 ways, automatically or manually. To have the messages filtered automatically the option 'Filter messages on receiving' must be checked on the 'Receive' tab in the Account Preferences. Manual filtering can be performed by using '/Tools/Filter all messages in folder' or '/Tools/Filter selected messages'.<br /> <br /> Folder Processing rules apply only to the messages contained in that particular folder. A folder's Processing rules are applied upon entering that folder, or on program startup if 'Process at startup' is checked in a folder's Properties, or on demand by using 'Run processing rules' from the folder's context menu.<br /> <br /> Pre and post-processing rules are global rules which are executed before and after the folder processing rules, respectively.<br /> In other words: Whenever you select a folder, first pre-processing rules are applied, then folder specific processing rules and lastly post-processing rules. See [[Filtering_and_Processing_of_Messages#age|'age'-question]] for an example.<br /> <br /> === Can a filter modify the contents of a message? ===<br /> <br /> None of the built-in filters modify the contents of a message, but you can use the 'test' filter to run a command that can modify the contents of a message. See the next question for an example.<br /> <br /> === How do I configure a filter for running SpamAssassin? ===<br /> <br /> If you want to use SpamAssassin directly, instead of using the plugin, you can get the SpamAssassin headers added to each message, and/or tag the subject line of spam messages. First, you have to set up SpamAssassin correctly, which is beyond the scope of this FAQ. This example uses the spamc/spamd client server model, but it could easily be adapted for calling SpamAssassin directly. First, save this script somewhere in your PATH (eg $HOME/bin/sc-spamc).<br /> &lt;pre&gt;<br /> #!/bin/bash<br /> #<br /> # sc-spamc : a script for using SpamAssassin header modification / subject<br /> # tagging vi Claws Mail filtering actions.<br /> #<br /> # Author: Robert Story<br /> # Send questions or comments to the claws-mail-users mailing list<br /> #<br /> # Based on a simpler script posted to the claws-mail-users mailing list<br /> # by Richard A Downing.<br /> #<br /> # Should return the return code from spamc (1=spam, 0=nospam/error)<br /> #<br /> <br /> die()<br /> {<br /> : error &quot;$@&quot;<br /> : exit 0<br /> }<br /> <br /> FILE=$*<br /> TEMP=sc-spamc.$$<br /> <br /> #<br /> # call spamc, redirect output to temporary file, and save return value<br /> #<br /> /usr/bin/spamc -E -t 30 &lt; &quot;$FILE&quot; &gt; &quot;$TEMP&quot;<br /> RC=$?<br /> <br /> #<br /> # make sure temp file exists before we replace original message<br /> #<br /> if ! test -s &quot;$TEMP&quot; ; then<br /> : die &quot;spamc result file doesn't exist or is 0 bytes&quot;<br /> fi<br /> <br /> #<br /> # backup original<br /> #<br /> mv &quot;$FILE&quot; &quot;$FILE.bak&quot;<br /> if test $? -ne 0; then<br /> : die &quot;'mv $@' failed!&quot;<br /> fi<br /> <br /> #<br /> # rename filtered file<br /> #<br /> mv &quot;$TEMP&quot; &quot;$FILE&quot;<br /> if test ! 0 = $?; then<br /> : mv &quot;$FILE.bak&quot; &quot;$FILE&quot;<br /> : die &quot;spam result rename failed, restoring backup&quot;<br /> else<br /> : rm &quot;$FILE.bak&quot;<br /> fi<br /> <br /> #<br /> # return spamc exit code<br /> #<br /> exit $RC<br /> <br /> &lt;/pre&gt;<br /> Now, set up a Filtering rule (test &quot;!(sc-spamc %F)&quot;), with an action for dealing with spam (eg color it, move it to a folder, etc).<br /> <br /> === How do I add a filter for SPF checking? ===<br /> <br /> To check if the sender IP address matches the SPF record you can download the script sylpheed-spf.pl from http://www.willamowius.de/claws-spf.html and add a filter with the following condition and move matching mails to your spam folder.<br /> <br /> &lt;pre&gt;<br /> test &quot;!(sylpheed-spf.pl -c &lt;%F)&quot;<br /> &lt;/pre&gt;<br /> <br /> === My ISP adds headers that identify spam and viruses. How do I filter on a custom header? ===<br /> <br /> You can filter on a custom header. The drop-down list of headers defaults to the commonly used headers, but you can edit the list and add new entries. Create a filter in the normal way and select &quot;Header&quot; as the condition. Simply start typing in the list box to edit or add a header.</div> Shlomif