0001 .. _email_clients:
0002
0003 Email clients info for Linux
0004 ============================
0005
0006 Git
0007 ---
0008
0009 These days most developers use ``git send-email`` instead of regular
0010 email clients. The man page for this is quite good. On the receiving
0011 end, maintainers use ``git am`` to apply the patches.
0012
0013 If you are new to ``git`` then send your first patch to yourself. Save it
0014 as raw text including all the headers. Run ``git am raw_email.txt`` and
0015 then review the changelog with ``git log``. When that works then send
0016 the patch to the appropriate mailing list(s).
0017
0018 General Preferences
0019 -------------------
0020
0021 Patches for the Linux kernel are submitted via email, preferably as
0022 inline text in the body of the email. Some maintainers accept
0023 attachments, but then the attachments should have content-type
0024 ``text/plain``. However, attachments are generally frowned upon because
0025 it makes quoting portions of the patch more difficult in the patch
0026 review process.
0027
0028 It's also strongly recommended that you use plain text in your email body,
0029 for patches and other emails alike. https://useplaintext.email may be useful
0030 for information on how to configure your preferred email client, as well as
0031 listing recommended email clients should you not already have a preference.
0032
0033 Email clients that are used for Linux kernel patches should send the
0034 patch text untouched. For example, they should not modify or delete tabs
0035 or spaces, even at the beginning or end of lines.
0036
0037 Don't send patches with ``format=flowed``. This can cause unexpected
0038 and unwanted line breaks.
0039
0040 Don't let your email client do automatic word wrapping for you.
0041 This can also corrupt your patch.
0042
0043 Email clients should not modify the character set encoding of the text.
0044 Emailed patches should be in ASCII or UTF-8 encoding only.
0045 If you configure your email client to send emails with UTF-8 encoding,
0046 you avoid some possible charset problems.
0047
0048 Email clients should generate and maintain "References:" or "In-Reply-To:"
0049 headers so that mail threading is not broken.
0050
0051 Copy-and-paste (or cut-and-paste) usually does not work for patches
0052 because tabs are converted to spaces. Using xclipboard, xclip, and/or
0053 xcutsel may work, but it's best to test this for yourself or just avoid
0054 copy-and-paste.
0055
0056 Don't use PGP/GPG signatures in mail that contains patches.
0057 This breaks many scripts that read and apply the patches.
0058 (This should be fixable.)
0059
0060 It's a good idea to send a patch to yourself, save the received message,
0061 and successfully apply it with 'patch' before sending patches to Linux
0062 mailing lists.
0063
0064
0065 Some email client (MUA) hints
0066 -----------------------------
0067
0068 Here are some specific MUA configuration hints for editing and sending
0069 patches for the Linux kernel. These are not meant to be complete
0070 software package configuration summaries.
0071
0072
0073 Legend:
0074
0075 - TUI = text-based user interface
0076 - GUI = graphical user interface
0077
0078 Alpine (TUI)
0079 ************
0080
0081 Config options:
0082
0083 In the :menuselection:`Sending Preferences` section:
0084
0085 - :menuselection:`Do Not Send Flowed Text` must be ``enabled``
0086 - :menuselection:`Strip Whitespace Before Sending` must be ``disabled``
0087
0088 When composing the message, the cursor should be placed where the patch
0089 should appear, and then pressing :kbd:`CTRL-R` let you specify the patch file
0090 to insert into the message.
0091
0092 Claws Mail (GUI)
0093 ****************
0094
0095 Works. Some people use this successfully for patches.
0096
0097 To insert a patch use :menuselection:`Message-->Insert File` (:kbd:`CTRL-I`)
0098 or an external editor.
0099
0100 If the inserted patch has to be edited in the Claws composition window
0101 "Auto wrapping" in
0102 :menuselection:`Configuration-->Preferences-->Compose-->Wrapping` should be
0103 disabled.
0104
0105 Evolution (GUI)
0106 ***************
0107
0108 Some people use this successfully for patches.
0109
0110 When composing mail select: Preformat
0111 from :menuselection:`Format-->Paragraph Style-->Preformatted` (:kbd:`CTRL-7`)
0112 or the toolbar
0113
0114 Then use:
0115 :menuselection:`Insert-->Text File...` (:kbd:`ALT-N x`)
0116 to insert the patch.
0117
0118 You can also ``diff -Nru old.c new.c | xclip``, select
0119 :menuselection:`Preformat`, then paste with the middle button.
0120
0121 Kmail (GUI)
0122 ***********
0123
0124 Some people use Kmail successfully for patches.
0125
0126 The default setting of not composing in HTML is appropriate; do not
0127 enable it.
0128
0129 When composing an email, under options, uncheck "word wrap". The only
0130 disadvantage is any text you type in the email will not be word-wrapped
0131 so you will have to manually word wrap text before the patch. The easiest
0132 way around this is to compose your email with word wrap enabled, then save
0133 it as a draft. Once you pull it up again from your drafts it is now hard
0134 word-wrapped and you can uncheck "word wrap" without losing the existing
0135 wrapping.
0136
0137 At the bottom of your email, put the commonly-used patch delimiter before
0138 inserting your patch: three hyphens (``---``).
0139
0140 Then from the :menuselection:`Message` menu item, select
0141 :menuselection:`insert file` and choose your patch.
0142 As an added bonus you can customise the message creation toolbar menu
0143 and put the :menuselection:`insert file` icon there.
0144
0145 Make the composer window wide enough so that no lines wrap. As of
0146 KMail 1.13.5 (KDE 4.5.4), KMail will apply word wrapping when sending
0147 the email if the lines wrap in the composer window. Having word wrapping
0148 disabled in the Options menu isn't enough. Thus, if your patch has very
0149 long lines, you must make the composer window very wide before sending
0150 the email. See: https://bugs.kde.org/show_bug.cgi?id=174034
0151
0152 You can safely GPG sign attachments, but inlined text is preferred for
0153 patches so do not GPG sign them. Signing patches that have been inserted
0154 as inlined text will make them tricky to extract from their 7-bit encoding.
0155
0156 If you absolutely must send patches as attachments instead of inlining
0157 them as text, right click on the attachment and select :menuselection:`properties`,
0158 and highlight :menuselection:`Suggest automatic display` to make the attachment
0159 inlined to make it more viewable.
0160
0161 When saving patches that are sent as inlined text, select the email that
0162 contains the patch from the message list pane, right click and select
0163 :menuselection:`save as`. You can use the whole email unmodified as a patch
0164 if it was properly composed. Emails are saved as read-write for user only so
0165 you will have to chmod them to make them group and world readable if you copy
0166 them elsewhere.
0167
0168 Lotus Notes (GUI)
0169 *****************
0170
0171 Run away from it.
0172
0173 IBM Verse (Web GUI)
0174 *******************
0175
0176 See Lotus Notes.
0177
0178 Mutt (TUI)
0179 **********
0180
0181 Plenty of Linux developers use ``mutt``, so it must work pretty well.
0182
0183 Mutt doesn't come with an editor, so whatever editor you use should be
0184 used in a way that there are no automatic linebreaks. Most editors have
0185 an :menuselection:`insert file` option that inserts the contents of a file
0186 unaltered.
0187
0188 To use ``vim`` with mutt::
0189
0190 set editor="vi"
0191
0192 If using xclip, type the command::
0193
0194 :set paste
0195
0196 before middle button or shift-insert or use::
0197
0198 :r filename
0199
0200 if you want to include the patch inline.
0201 (a)ttach works fine without ``set paste``.
0202
0203 You can also generate patches with ``git format-patch`` and then use Mutt
0204 to send them::
0205
0206 $ mutt -H 0001-some-bug-fix.patch
0207
0208 Config options:
0209
0210 It should work with default settings.
0211 However, it's a good idea to set the ``send_charset`` to::
0212
0213 set send_charset="us-ascii:utf-8"
0214
0215 Mutt is highly customizable. Here is a minimum configuration to start
0216 using Mutt to send patches through Gmail::
0217
0218 # .muttrc
0219 # ================ IMAP ====================
0220 set imap_user = 'yourusername@gmail.com'
0221 set imap_pass = 'yourpassword'
0222 set spoolfile = imaps://imap.gmail.com/INBOX
0223 set folder = imaps://imap.gmail.com/
0224 set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
0225 set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
0226 set mbox="imaps://imap.gmail.com/[Gmail]/All Mail"
0227
0228 # ================ SMTP ====================
0229 set smtp_url = "smtp://username@smtp.gmail.com:587/"
0230 set smtp_pass = $imap_pass
0231 set ssl_force_tls = yes # Require encrypted connection
0232
0233 # ================ Composition ====================
0234 set editor = `echo \$EDITOR`
0235 set edit_headers = yes # See the headers when editing
0236 set charset = UTF-8 # value of $LANG; also fallback for send_charset
0237 # Sender, email address, and sign-off line must match
0238 unset use_domain # because joe@localhost is just embarrassing
0239 set realname = "YOUR NAME"
0240 set from = "username@gmail.com"
0241 set use_from = yes
0242
0243 The Mutt docs have lots more information:
0244
0245 https://gitlab.com/muttmua/mutt/-/wikis/UseCases/Gmail
0246
0247 http://www.mutt.org/doc/manual/
0248
0249 Pine (TUI)
0250 **********
0251
0252 Pine has had some whitespace truncation issues in the past, but these
0253 should all be fixed now.
0254
0255 Use alpine (pine's successor) if you can.
0256
0257 Config options:
0258
0259 - ``quell-flowed-text`` is needed for recent versions
0260 - the ``no-strip-whitespace-before-send`` option is needed
0261
0262
0263 Sylpheed (GUI)
0264 **************
0265
0266 - Works well for inlining text (or using attachments).
0267 - Allows use of an external editor.
0268 - Is slow on large folders.
0269 - Won't do TLS SMTP auth over a non-SSL connection.
0270 - Has a helpful ruler bar in the compose window.
0271 - Adding addresses to address book doesn't understand the display name
0272 properly.
0273
0274 Thunderbird (GUI)
0275 *****************
0276
0277 Thunderbird is an Outlook clone that likes to mangle text, but there are ways
0278 to coerce it into behaving.
0279
0280 After doing the modifications, this includes installing the extensions,
0281 you need to restart Thunderbird.
0282
0283 - Allow use of an external editor:
0284
0285 The easiest thing to do with Thunderbird and patches is to use extensions
0286 which open your favorite external editor.
0287
0288 Here are some example extensions which are capable of doing this.
0289
0290 - "External Editor Revived"
0291
0292 https://github.com/Frederick888/external-editor-revived
0293
0294 https://addons.thunderbird.net/en-GB/thunderbird/addon/external-editor-revived/
0295
0296 It requires installing a "native messaging host".
0297 Please read the wiki which can be found here:
0298 https://github.com/Frederick888/external-editor-revived/wiki
0299
0300 - "External Editor"
0301
0302 https://github.com/exteditor/exteditor
0303
0304 To do this, download and install the extension, then open the
0305 :menuselection:`compose` window, add a button for it using
0306 :menuselection:`View-->Toolbars-->Customize...`
0307 then just click on the new button when you wish to use the external editor.
0308
0309 Please note that "External Editor" requires that your editor must not
0310 fork, or in other words, the editor must not return before closing.
0311 You may have to pass additional flags or change the settings of your
0312 editor. Most notably if you are using gvim then you must pass the -f
0313 option to gvim by putting ``/usr/bin/gvim --nofork"`` (if the binary is in
0314 ``/usr/bin``) to the text editor field in :menuselection:`external editor`
0315 settings. If you are using some other editor then please read its manual
0316 to find out how to do this.
0317
0318 To beat some sense out of the internal editor, do this:
0319
0320 - Edit your Thunderbird config settings so that it won't use ``format=flowed``!
0321 Go to your main window and find the button for your main dropdown menu.
0322 :menuselection:`Main Menu-->Preferences-->General-->Config Editor...`
0323 to bring up the thunderbird's registry editor.
0324
0325 - Set ``mailnews.send_plaintext_flowed`` to ``false``
0326
0327 - Set ``mailnews.wraplength`` from ``72`` to ``0``
0328
0329 - Don't write HTML messages! Go to the main window
0330 :menuselection:`Main Menu-->Account Settings-->youracc@server.something-->Composition & Addressing`!
0331 There you can disable the option "Compose messages in HTML format".
0332
0333 - Open messages only as plain text! Go to the main window
0334 :menuselection:`Main Menu-->View-->Message Body As-->Plain Text`!
0335
0336 TkRat (GUI)
0337 ***********
0338
0339 Works. Use "Insert file..." or external editor.
0340
0341 Gmail (Web GUI)
0342 ***************
0343
0344 Does not work for sending patches.
0345
0346 Gmail web client converts tabs to spaces automatically.
0347
0348 At the same time it wraps lines every 78 chars with CRLF style line breaks
0349 although tab2space problem can be solved with external editor.
0350
0351 Another problem is that Gmail will base64-encode any message that has a
0352 non-ASCII character. That includes things like European names.