1 <?xml version="1.0" encoding="utf-8"?>
2 <section id="ch_advanced">
3 <title>Advanced features</title>
4 <section id="adv_actions">
7 Actions allow you to use all the power of the Unix command-line with
8 your emails. You can define various commands, taking parameters such
9 as the current email file, a list of emails, the currently selected
10 text, and so on. In this way, you'll be able to perform various tasks
11 such as editing a raw mail in your text editor,
12 <emphasis>hide</emphasis> what you mean using ROT-13, apply patches
13 contained in emails directly, and so on. The only limit is your
14 imagination. You can create and configure Actions via the
15 <quote>/Configuration/Actions...</quote> menu.
18 The <quote>Tools/Actions/</quote> menu will contain one submenu
19 item for each action that you have created. When you have selected
20 one or more messages in the Message List, or are viewing a message
21 in the Message View, selecting one of these menu items will invoke
22 the action, and, depending on how it was defined, will pass the
26 Additionally, it is possible to add toolbar entries for your
27 actions. To do so, open the <quote>Configuration/Preferences</quote>
28 menu and select <quote>Toolbars/Main Window</quote>.
29 Select <quote>User Action</quote> in the <quote>Item type</quote>
30 dropdown menu, then select the Action in the <quote>Event executed on click</quote>
31 dropdown menu, and click the <quote>Icon</quote> button to select the
32 icon that you want to use.
36 <title>Simple <quote>Open With...</quote></title>
40 Menu name: <emphasis>Open with/kate</emphasis>
41 Command Line: <command>kate %p</command>
45 Opens the file of the selected decoded MIME part
46 (<emphasis>%p</emphasis>) with the <emphasis>kate</emphasis> text
54 <title>Spam management using <ulink
55 url="http://bogofilter.sourceforge.net/">Bogofilter</ulink>
60 Menu name: <emphasis>Bogofilter/Mark as Ham</emphasis>
61 Command Line: <command>bogofilter -n -v -B "%f"</command>
65 Marks the currently selected mails (<emphasis>%f</emphasis>) as
66 <quote>not spam</quote> using <emphasis>Bogofilter</emphasis>.
72 Menu name: <emphasis>Bogofilter/Mark as Spam</emphasis>
73 Command Line: <command>bogofilter -s -v -B "%f"</command>
77 Marks the currently selected mails (<emphasis>%f</emphasis>) as
78 <quote>spam</quote> using <emphasis>Bogofilter</emphasis>.
85 <title>Search Google using an external script</title>
89 Menu name: <emphasis>Search/Google</emphasis>
90 Command Line: <command>|/path/to/google_search.pl</command>
94 Searches Google for the currently selected text
95 (<emphasis>|</emphasis>) using the external script <emphasis><ulink
96 url="http://www.claws-mail.org/tools.php"
97 >google_search.pl</ulink></emphasis>.
105 <section id="adv_templates">
106 <title>Templates</title>
108 Templates are used in composition windows, and act as a model for
109 emails. Templates can be filled with static text and dynamic parts,
110 such as the original sender's name (<quote>Dear %N, ...</quote>),
111 the date, etc. When applying a template, the dynamic fields will be
112 replaced with the relevant values. You can configure templates via
113 the <quote>Tools</quote> menu.
115 When applying a template, you will be asked to <quote>Insert</quote>
116 or <quote>Replace</quote>, the difference between replacing and
117 inserting is only concerned with the message body.
118 <quote>Replace</quote> will replace the current composition window
119 message body with the body defined in the template, clearing it if
120 the template body is empty. <quote>Insert</quote> will insert
121 the template's body, if set, at the current cursor position.
123 Whether you choose to Insert or Replace, any To, Cc or Bcc field
124 that is defined in the template will be appended to the compose
125 window's recipients list. If it is defined, the template's Subject
126 will always replace the compose window's Subject.
128 Symbols can be used in all parts of the templates and will be
129 substituted with their respective dynamic value if possible, otherwise
130 no value will be used. This often makes more sense if you apply a
131 template when replying or forwarding, otherwise most of the symbols
132 value will be undefined. There is no restriction on which symbols can
133 be used in template parts, even if inserting the body (%M or %Q) may
134 make no sense in common situations.
136 When applying a template, the body is processed first, then the To, Cc,
137 Bcc and Subject fields follow.
139 Further information and examples of usage can be found in the
140 user-contributed FAQ on the Claws Mail website <ulink
141 url="http://www.claws-mail.org/faq/"
142 >http://www.claws-mail.org/faq/</ulink>.
145 <section id="adv_processing">
146 <title>Processing</title>
148 Processing rules are the same as Filtering rules, except that they are
149 applied when entering a folder or when manually applied from a folder's
150 context menu and apply only to this folder. You can use them to automatically
151 move old mails into an archive folder, or for further dispatching of
152 emails, and more. You can set each folder's Processing rules by
153 right-clicking on it.
155 Processing rules are accompanied by Pre-processing and Post-processing
156 rules. Like Processing rules, they apply when opening a folder or manually
157 applying them from a folder's context menu, but like Filtering rules,
158 they are shared across all folders. You can configure them from the
159 <quote>Tools</quote> menu. Pre-processing rules are executed before the
160 folder's specific Processing rules, while Post-processing rules are executed
164 <section id="adv_colour_labels">
165 <title>Colour Labels</title>
167 Colour labels can be used to denote a message as having a particular
168 significance. To set a colour label simply right-click a message in the
169 Message List and use the <quote>Color label</quote> submenu.
171 Colour labels are user-configurable. Both the colour and the label can
172 be set by the user. Preferences can be found on the
173 <quote>Configuration/Preferences/Display/Colors</quote> page.
176 <section id="adv_ml_support">
177 <title>Mailing-List support</title>
179 Claws Mail offers mailing-list support from the
180 <quote>Message/Mailing-List/</quote> submenu. When you have a
181 mailing-list message selected, the submenu allows you to quickly
182 initiate subscribing, unsubscribing, posting, getting help, contacting
183 the list owner, and viewing the list archive; either by opening a new
184 Compose window with the appropriate address pre-filled, or by opening
185 the URL in your web browser.
188 <section id="adv_plugins">
189 <title>Plugins</title>
191 Plugins are the mechanism for extending Claws Mail' capabilities.
192 For example, imagine that you want to store your mails in a remote
193 <acronym>SQL</acronym> database. In most mailers out there this is
194 simply impossible without reworking the internals of the mailer. With
195 Claws Mail you can simply write a plugin to achieve the task.
197 This is just an example of the possibilities. A good number of plugins
198 developed for Claws Mail already exist, and more are to come. The
199 <link linkend="ch_plugins">Extending Claws Mail section</link>
200 gives details of them.
203 <section id="deploying">
204 <title>Deploying Claws Mail</title>
206 The initial configuration wizard tries to guess various fields using
207 information gathered from the system, such as username, hostname, and
208 more. As it is oriented towards general use, the default values often
209 have to be fixed. However, this wizard is customisable, in a manner
210 designed to allow system administrators to deploy Claws Mail easily
211 over various users of one machine, or even over multiple machines
212 installed via some replication tool.
214 The first part consists of creating a wizard configuration template
215 and setting the various default parameters of a new Claws Mail
221 Start with a user who does not have a <filename class="directory"
222 >~/.claws-mail</filename> directory, ideally a new user.
227 Start Claws Mail and go through the wizard. The values you fill in
228 will be of no use for the future deployment, so you can click
234 Once the wizard is finished and you have Claws Mail' main window
235 opened, configure the various defaults you want to have in the master.
236 You can load plugins, add people or LDAP servers in the addressbook,
237 create filtering rules, and so on.
242 If needed, and if the deployed Claws Mail will use MH folders, you
243 can create subdirectories in the mailbox.
248 Next, quit Claws Mail.
253 Now, edit the newly created wizard template file,
254 <filename>~/.claws-mail/accountrc.tmpl</filename>. In this file,
255 you will see different variables, corresponding to the wizard's fields.
256 You can leave some commented, in which case the usual default will be
257 used, or specify values or variables. Not all fields can contain
258 variables; for example, <literal>smtpauth</literal>,
259 <literal>smtpssl</literal> and <literal>recvssl</literal> are booleans,
260 either 0 or 1, and <literal>recvtype</literal> is an integer value. The
261 other fields, like <literal>name</literal>, <literal>email</literal>,
262 or <literal>recvuser</literal>, are parsed by the wizard and the
263 variables they contain are replaced by values. This allows you to
264 specify everything as needed for your site, even if you have strange
265 server names or server logins.
270 Save this file, and delete both
271 <filename>~/.claws-mail/accountrc</filename>, (which contains your
273 <filename>~/.claws-mail/folderlist.xml</filename>, (so that the
274 folder tree will be correctly parsed for new users). Recursively copy
275 <filename class="directory">.claws-mail</filename> to
276 <filename class="directory">/etc/skel/</filename>; if the deployed
277 Claws Mail will use MH folders, also copy the created
278 <filename class="directory">Mail</filename> directory. chown all of
279 <filename class="directory">/etc/skel/.claws-mail</filename>
280 and <filename class="directory">/etc/skel/Mail</filename> to
281 <literal>root:root</literal> for security reasons.
286 Test! Create a new user, login as that user, run Claws Mail. If you
287 filled everything as you wanted, this user will just have to fill in
293 Now, if you're creating a master for a site-wide deployment, you can
294 continue with this process. If you were just doing it for one machine,
300 Here are the different variables of the <filename>accountrc.tmpl</filename>
305 <term><literal>domain</literal></term>
308 Your domain name (example.com). If not set, it'll be extracted from the
314 <term><literal>name</literal></term>
317 The user's name. If not set, it'll be extracted from Unix login
318 information, which is usually ok.
323 <term><literal>email</literal></term>
326 The user's email. If not set, it'll be extracted from
327 <literal>$name</literal> and <literal>$domain</literal>.
332 <term><literal>organization</literal></term>
335 Your organization. If not set, it'll be empty.
340 <term><literal>smtpserver</literal></term>
343 The SMTP server to use. If not set, it'll be
344 <literal>smtp.$domain</literal>.
349 <term><literal>smtpauth</literal></term>
352 0 or 1. Whether to authenticate on the SMTP server. If not set, it'll
358 <term><literal>smtpuser</literal></term>
361 The login on the SMTP server. If not set, it'll be empty (same login as
362 for reception will be used).
367 <term><literal>smtppass</literal></term>
370 The password on the SMTP server. If not set, it'll be empty (if
371 <literal>smtppass</literal> is empty but <literal>smtpuser</literal> is
372 not, the user will be asked for the password).
377 <term><literal>recvtype</literal></term>
380 The type of server to receive from. 0 for POP3, 3 for IMAP4, 5 for a
381 local MBOX file. If not set, it'll be 0 (POP3).
386 <term><literal>recvserver</literal></term>
389 The reception server. If not set, it'll be
390 <literal>(pop|imap).$domain</literal>, depending on
391 <literal>$recvtype</literal>.
396 <term><literal>recvuser</literal></term>
399 The login on the reception server. If not set, it'll be extracted from
400 the Unix login information.
405 <term><literal>recvpass</literal></term>
408 The password on the reception server. If not set, it'll be empty (the
409 user will be asked for it once per session).
414 <term><literal>imapdir</literal></term>
417 The IMAP subdirectory. If not set, it'll be empty, which is often
423 <term><literal>mboxfile</literal></term>
426 The MBOX file to receive from if <literal>$recvtype</literal> is 5.
427 If not set, <literal>/var/mail/$LOGIN</literal>.
432 <term><literal>mailbox</literal></term>
435 The MH mailbox to store mail in (for <literal>$recvtype</literal> 0 or
436 5). If not set, it'll be <quote>Mail</quote>.
441 <term><literal>smtpssl</literal></term>
444 0 or 1. Whether to use SSL for sending mail. If not set, it'll be 0.
449 <term><literal>recvssl</literal></term>
452 0 or 1. Whether to use SSL for receiving mail. If not set, it'll be 0.
458 Here are the different variables you can use in the
459 <literal>domain</literal>, <literal>name</literal>,
460 <literal>email</literal>, <literal>organization</literal>,
461 <literal>smtpserver</literal>, <literal>smtpuser</literal>,
462 <literal>smtppass</literal>, <literal>recvserver</literal>,
463 <literal>recvuser</literal>, <literal>recvpass</literal>,
464 <literal>imapdir</literal>, <literal>mboxfile</literal> and
465 <literal>mailbox</literal> fields:
469 <term><literal>$DEFAULTDOMAIN</literal></term>
472 The domain name as extracted from Unix hostname information.
478 <term><literal>$DOMAIN</literal></term>
481 The domain name as set in the domain variable, the first of the
487 <term><literal>$USERNAME</literal></term>
489 <para>The user's real name.</para>
493 <term><literal>$LOGIN</literal></term>
495 <para>The user's Unix login.</para>
499 <term><literal>$NAME_MAIL</literal></term>
502 The user's real name as set in the name variable of the template field,
503 in lowercase and with spaces replaced by dots.
504 <quote>Colin Leroy</quote> becomes <quote>colin.leroy</quote>.
509 <term><literal>$EMAIL</literal></term>
512 The email address as set in the email variable of the template field.
518 Be sure not to use a variable before defining it.
521 <section id="adv_hidden">
522 <title>Hidden preferences</title>
524 There are a number of hidden preferences in Claws Mail, preferences
525 that some users who we wanted to please couldn't live without, but
526 which did not have a place in the GUI in our opinion. You can find the
527 following, and change them while Claws Mail is not running, in
528 <filename>~/.claws-mail/clawsrc</filename>.
531 There's a small tool written in Perl-GTK called Clawsker which
532 provides a user-friendly GUI for tweaking these settings instead of
533 direct editing of <filename>clawsrc</filename>. You can read more
534 about it on the <ulink url="http://www.claws-mail.org/clawsker">Clawsker
539 <term><literal>addressbook_use_editaddress_dialog</literal></term>
542 Use a separate dialogue to edit a person's details.
543 '0' will use a form embedded in the addressbook's main window.
548 <term><literal>bold_unread</literal></term>
551 Show unread messages in the Message List using a bold font.
556 <term><literal>cache_max_mem_usage</literal></term>
559 The maximum amount of memory to use to cache messages, in kB.
564 <term><literal>cache_min_keep_time</literal></term>
567 The minimum time in minutes to keep a cache in memory. Caches more
568 recent than this time will not be freed, even if the memory usage is
574 <term><literal>compose_no_markup</literal></term>
577 Don't use bold and italic text in Compose dialogue's account selector.
582 <term><literal>emphasis_color</literal></term>
585 The colour used for the X-Mailer line when its value is Claws Mail.
590 <term><literal>enable_dotted_lines</literal></term>
593 Use the <emphasis>old</emphasis> dotted line look in the main window
594 GtkTreeView components, (Folder List and Message List), instead of the
595 <emphasis>modern</emphasis> lineless look.
600 <term><literal>enable_hscrollbar</literal></term>
603 Enable the horizontal scrollbar in the Message List.
608 <term><literal>enable_swap_from</literal></term>
611 Display the sender's email address in the To column of the
612 Sent folder instead of the recipient's.
617 <term><literal>folderview_vscrollbar_policy</literal></term>
620 Specify the policy of vertical scrollbar of Folder List.
621 '0' is always shown, '1' is automatic, '2' is always hidden.
626 <term><literal>hover_timeout</literal></term>
629 Time in milliseconds that will cause a folder tree to expand
630 when the mouse cursor is held over it during drag 'n' drop.
635 <term><literal>live_dangerously</literal></term>
638 Don't ask for confirmation before definitive deletion of emails.
643 <term><literal>log_error_color</literal></term>
644 <term><literal>log_in_color</literal></term>
645 <term><literal>log_msg_color</literal></term>
646 <term><literal>log_out_color</literal></term>
647 <term><literal>log_warn_color</literal></term>
648 <term><literal>log_status_ok_color</literal></term>
649 <term><literal>log_status_nok_color</literal></term>
650 <term><literal>log_status_skip_color</literal></term>
653 The colours used in the log window.
658 <term><literal>outgoing_fallback_to_ascii</literal></term>
661 0 or 1. The outgoing encoding of a message will use 7bit US-ASCII
662 whenever it is suitable for the message content, ignoring the
663 <quote>Outgoing encoding</quote> option unless it is necessary. Turning
664 this option off forces the user-defined encoding to be used, regardless
665 of message content. Default is 1, turned on.
670 <term><literal>primary_paste_unselects</literal></term>
673 0 or 1. Causes the primary buffer to be cleared and the insertion
674 point to be repositioned when the middle mouse button is used
675 for pasting text. Default is 0, turned off.
680 <term><literal>respect_flowed_format</literal></term>
683 0 or 1. Respect format=flowed on text/plain message parts. This
684 will cause some mails to have long lines, but will fix some URLs
685 that would otherwise be wrapped. Default is 0, turned off.
690 <term><literal>save_parts_readwrite</literal></term>
693 Saves temporary files when opening attachment with write bit set.
698 <term><literal>skip_ssl_cert_check</literal></term>
701 Disables the verification of SSL certificates.
706 <term><literal>statusbar_update_step</literal></term>
709 Update stepping in progress bars.
714 <term><literal>stripes_color_offset</literal></term>
717 Specify the value to use when creating alternately coloured lines in
718 GtkTreeView components. The smaller the value, the less visible the
719 difference in the alternating colours of the lines.
724 <term><literal>textview_cursor_visible</literal></term>
727 Display the cursor in the message view.
732 <term><literal>thread_by_subject_max_age</literal></term>
735 Number of days to include a message in a thread when using
736 <quote>Thread using subject in addition to standard headers</quote>.
741 <term><literal>toolbar_detachable</literal></term>
744 Show handles in the toolbars.
749 <term><literal>two_line_vertical</literal></term>
752 Spread message list information over two lines when using the
758 <term><literal>unsafe_ssl_certs</literal></term>
761 Allows Claws to remember multiple SSL certificates for a given
762 server/port. This is disabled by default.
767 <term><literal>use_networkmanager</literal></term>
770 Use NetworkManager to switch offline automatically. This is enabled
776 <term><literal>use_stripes_everywhere</literal></term>
779 Enable alternately coloured lines in GtkTreeView components.
784 <term><literal>use_stripes_in_summaries</literal></term>
787 Enable alternately coloured lines in the main window GtkTreeView
788 components, (Folder List and Message List). The only useful way to
789 use this option is to set it to 0 when use_stripes_everywhere is set
795 <term><literal>utf8_instead_of_locale_for_broken_mail</literal></term>
798 Use UTF-8 encoding for broken mails instead of current locale.
803 <term><literal>warn_dnd</literal></term>
806 Display a confirmation dialogue on drag 'n' drop of folders.
812 <section id="adv_autofaces">
813 <title>Autofaces</title>
815 Claws Mail allows setting the Face and X-Face headers directly
816 from files, either globally for all defined accounts
817 or on a per-account basis. These files must be placed in the
818 <filename>~/.claws-mail/autofaces/</filename> directory.
821 If they exist, the global Face and/or X-Face headers for all
822 accounts are taken from the <filename>face</filename> and/or
823 <filename>xface</filename> files respectively. In a similar
824 manner, Face and/or X-Face headers for a specific account can
825 be provided by <filename>face.</filename><emphasis>accountname</emphasis>
826 and/or <filename>xface.</filename><emphasis>accountname</emphasis>,
827 where <emphasis>accountname</emphasis> is the name of the account you
828 want this header to be associated with.
831 If the name of the account contains characters which may be unsuitable
832 for the underlying filesystem (including spaces) these are replaced by
833 underscores (<quote>_</quote>) when searching for the autofaces of
834 that account. For example, if your account is called
835 <quote><My Mail></quote>, the name for the X-Face filename for
836 that account would be
837 <filename>~/.claws-mail/autofaces/xface._My_Mail_</filename>.
838 Be aware that this feature doesn't check the content of the files,
839 or for duplication of headers, (most mailers, including Claws
840 Mail, will ignore duplicates and display the last one only).