blob: 2d485dea8cece79d7a2db645a3011a27c76c47b4 [file] [log] [blame]
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -07001Email clients info for Linux
2======================================================================
3
Dan Carpenter7d19e912014-06-27 18:28:46 -07004Git
5----------------------------------------------------------------------
6These days most developers use `git send-email` instead of regular
7email clients. The man page for this is quite good. On the receiving
8end, maintainers use `git am` to apply the patches.
9
10If you are new to git then send your first patch to yourself. Save it
11as raw text including all the headers. Run `git am raw_email.txt` and
12then review the changelog with `git log`. When that works then send
13the patch to the appropriate mailing list(s).
14
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -070015General Preferences
16----------------------------------------------------------------------
17Patches for the Linux kernel are submitted via email, preferably as
18inline text in the body of the email. Some maintainers accept
19attachments, but then the attachments should have content-type
20"text/plain". However, attachments are generally frowned upon because
21it makes quoting portions of the patch more difficult in the patch
22review process.
23
24Email clients that are used for Linux kernel patches should send the
25patch text untouched. For example, they should not modify or delete tabs
26or spaces, even at the beginning or end of lines.
27
28Don't send patches with "format=flowed". This can cause unexpected
29and unwanted line breaks.
30
31Don't let your email client do automatic word wrapping for you.
32This can also corrupt your patch.
33
34Email clients should not modify the character set encoding of the text.
35Emailed patches should be in ASCII or UTF-8 encoding only.
36If you configure your email client to send emails with UTF-8 encoding,
37you avoid some possible charset problems.
38
39Email clients should generate and maintain References: or In-Reply-To:
40headers so that mail threading is not broken.
41
42Copy-and-paste (or cut-and-paste) usually does not work for patches
43because tabs are converted to spaces. Using xclipboard, xclip, and/or
44xcutsel may work, but it's best to test this for yourself or just avoid
45copy-and-paste.
46
47Don't use PGP/GPG signatures in mail that contains patches.
48This breaks many scripts that read and apply the patches.
49(This should be fixable.)
50
51It's a good idea to send a patch to yourself, save the received message,
52and successfully apply it with 'patch' before sending patches to Linux
53mailing lists.
54
55
56Some email client (MUA) hints
57----------------------------------------------------------------------
58Here are some specific MUA configuration hints for editing and sending
59patches for the Linux kernel. These are not meant to be complete
60software package configuration summaries.
61
62Legend:
63TUI = text-based user interface
64GUI = graphical user interface
65
66~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67Alpine (TUI)
68
69Config options:
70In the "Sending Preferences" section:
71
72- "Do Not Send Flowed Text" must be enabled
73- "Strip Whitespace Before Sending" must be disabled
74
75When composing the message, the cursor should be placed where the patch
76should appear, and then pressing CTRL-R let you specify the patch file
77to insert into the message.
78
79~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Leitner04a33022014-12-02 17:44:36 +010080Claws Mail (GUI)
81
82Works. Some people use this successfully for patches.
83
84To insert a patch use Message->Insert File (CTRL+i) or an external editor.
85
86If the inserted patch has to be edited in the Claws composition window
87"Auto wrapping" in Configuration->Preferences->Compose->Wrapping should be
88disabled.
89
90~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -070091Evolution (GUI)
92
93Some people use this successfully for patches.
94
95When composing mail select: Preformat
Ahmed Mohamed Abd EL Mawgood3d5583c2015-07-16 23:17:36 +020096 from Format->Paragraph Style->Preformatted (Ctrl-7)
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -070097 or the toolbar
98
99Then use:
100 Insert->Text File... (Alt-n x)
101to insert the patch.
102
103You can also "diff -Nru old.c new.c | xclip", select Preformat, then
104paste with the middle button.
105
106~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
107Kmail (GUI)
108
109Some people use Kmail successfully for patches.
110
111The default setting of not composing in HTML is appropriate; do not
112enable it.
113
114When composing an email, under options, uncheck "word wrap". The only
115disadvantage is any text you type in the email will not be word-wrapped
116so you will have to manually word wrap text before the patch. The easiest
117way around this is to compose your email with word wrap enabled, then save
118it as a draft. Once you pull it up again from your drafts it is now hard
119word-wrapped and you can uncheck "word wrap" without losing the existing
120wrapping.
121
122At the bottom of your email, put the commonly-used patch delimiter before
123inserting your patch: three hyphens (---).
124
125Then from the "Message" menu item, select insert file and choose your patch.
126As an added bonus you can customise the message creation toolbar menu
127and put the "insert file" icon there.
128
Xishi Qiud9a6ed12013-11-06 13:18:19 -0800129Make the composer window wide enough so that no lines wrap. As of
Lasse Collin5d3687d2011-01-12 17:00:28 -0800130KMail 1.13.5 (KDE 4.5.4), KMail will apply word wrapping when sending
131the email if the lines wrap in the composer window. Having word wrapping
132disabled in the Options menu isn't enough. Thus, if your patch has very
133long lines, you must make the composer window very wide before sending
134the email. See: https://bugs.kde.org/show_bug.cgi?id=174034
135
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700136You can safely GPG sign attachments, but inlined text is preferred for
137patches so do not GPG sign them. Signing patches that have been inserted
138as inlined text will make them tricky to extract from their 7-bit encoding.
139
140If you absolutely must send patches as attachments instead of inlining
141them as text, right click on the attachment and select properties, and
142highlight "Suggest automatic display" to make the attachment inlined to
143make it more viewable.
144
145When saving patches that are sent as inlined text, select the email that
146contains the patch from the message list pane, right click and select
147"save as". You can use the whole email unmodified as a patch if it was
148properly composed. There is no option currently to save the email when you
149are actually viewing it in its own window -- there has been a request filed
150at kmail's bugzilla and hopefully this will be addressed. Emails are saved
151as read-write for user only so you will have to chmod them to make them
152group and world readable if you copy them elsewhere.
153
154~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155Lotus Notes (GUI)
156
157Run away from it.
158
159~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160Mutt (TUI)
161
162Plenty of Linux developers use mutt, so it must work pretty well.
163
164Mutt doesn't come with an editor, so whatever editor you use should be
165used in a way that there are no automatic linebreaks. Most editors have
166an "insert file" option that inserts the contents of a file unaltered.
167
168To use 'vim' with mutt:
169 set editor="vi"
170
171 If using xclip, type the command
172 :set paste
173 before middle button or shift-insert or use
174 :r filename
175
176if you want to include the patch inline.
177(a)ttach works fine without "set paste".
178
Eddie Kovsky803cfe22015-11-05 23:23:01 -0700179You can also generate patches with 'git format-patch' and then use Mutt
180to send them:
181 $ mutt -H 0001-some-bug-fix.patch
182
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700183Config options:
184It should work with default settings.
185However, it's a good idea to set the "send_charset" to:
186 set send_charset="us-ascii:utf-8"
187
Eddie Kovsky91633a62015-11-05 23:25:35 -0700188Mutt is highly customizable. Here is a minimum configuration to start
189using Mutt to send patches through Gmail:
190
191# .muttrc
192# ================ IMAP ====================
193set imap_user = 'yourusername@gmail.com'
194set imap_pass = 'yourpassword'
195set spoolfile = imaps://imap.gmail.com/INBOX
196set folder = imaps://imap.gmail.com/
197set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
198set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
199set mbox="imaps://imap.gmail.com/[Gmail]/All Mail"
200
201# ================ SMTP ====================
202set smtp_url = "smtp://username@smtp.gmail.com:587/"
203set smtp_pass = $imap_pass
204set ssl_force_tls = yes # Require encrypted connection
205
206# ================ Composition ====================
207set editor = `echo \$EDITOR`
208set edit_headers = yes # See the headers when editing
209set charset = UTF-8 # value of $LANG; also fallback for send_charset
210# Sender, email address, and sign-off line must match
211unset use_domain # because joe@localhost is just embarrassing
212set realname = "YOUR NAME"
213set from = "username@gmail.com"
214set use_from = yes
215
216The Mutt docs have lots more information:
217 http://dev.mutt.org/trac/wiki/UseCases/Gmail
218 http://dev.mutt.org/doc/manual.html
219
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700220~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221Pine (TUI)
222
223Pine has had some whitespace truncation issues in the past, but these
224should all be fixed now.
225
226Use alpine (pine's successor) if you can.
227
228Config options:
229- quell-flowed-text is needed for recent versions
230- the "no-strip-whitespace-before-send" option is needed
231
232
233~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
234Sylpheed (GUI)
235
236- Works well for inlining text (or using attachments).
237- Allows use of an external editor.
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700238- Is slow on large folders.
239- Won't do TLS SMTP auth over a non-SSL connection.
240- Has a helpful ruler bar in the compose window.
241- Adding addresses to address book doesn't understand the display name
242 properly.
243
244~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
245Thunderbird (GUI)
246
Rob Landleye0e34e92011-01-12 17:00:29 -0800247Thunderbird is an Outlook clone that likes to mangle text, but there are ways
248to coerce it into behaving.
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700249
Giedrius Statkevičiusd50ca072015-03-09 03:53:45 +0200250- Allow use of an external editor:
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700251 The easiest thing to do with Thunderbird and patches is to use an
252 "external editor" extension and then just use your favorite $EDITOR
253 for reading/merging patches into the body text. To do this, download
254 and install the extension, then add a button for it using
255 View->Toolbars->Customize... and finally just click on it when in the
256 Compose dialog.
257
Giedrius Statkevičiusd50ca072015-03-09 03:53:45 +0200258 Please note that "external editor" requires that your editor must not
Luis de Bethencourta02b4fc2015-09-29 14:15:33 +0100259 fork, or in other words, the editor must not return before closing.
Giedrius Statkevičiusd50ca072015-03-09 03:53:45 +0200260 You may have to pass additional flags or change the settings of your
261 editor. Most notably if you are using gvim then you must pass the -f
262 option to gvim by putting "/usr/bin/gvim -f" (if the binary is in
263 /usr/bin) to the text editor field in "external editor" settings. If you
264 are using some other editor then please read its manual to find out how
265 to do this.
266
Rob Landleye0e34e92011-01-12 17:00:29 -0800267To beat some sense out of the internal editor, do this:
268
Rob Landleye0e34e92011-01-12 17:00:29 -0800269- Edit your Thunderbird config settings so that it won't use format=flowed.
270 Go to "edit->preferences->advanced->config editor" to bring up the
Paul McQuadef9a09742014-05-15 13:54:25 -0700271 thunderbird's registry editor.
Rob Landleye0e34e92011-01-12 17:00:29 -0800272
Paul McQuadef9a09742014-05-15 13:54:25 -0700273- Set "mailnews.send_plaintext_flowed" to "false"
Paul Mcquade6989b5b2011-08-13 12:34:54 -0700274
Paul McQuadef9a09742014-05-15 13:54:25 -0700275- Set "mailnews.wraplength" from "72" to "0"
Paul Mcquade6989b5b2011-08-13 12:34:54 -0700276
Paul McQuadef9a09742014-05-15 13:54:25 -0700277- "View" > "Message Body As" > "Plain Text"
Rob Landleye0e34e92011-01-12 17:00:29 -0800278
Paul McQuadef9a09742014-05-15 13:54:25 -0700279- "View" > "Character Encoding" > "Unicode (UTF-8)"
Rob Landleye0e34e92011-01-12 17:00:29 -0800280
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700281~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282TkRat (GUI)
283
284Works. Use "Insert file..." or external editor.
285
Tim Hockin1b6bcdb2008-11-06 12:53:33 -0800286~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
287Gmail (Web GUI)
288
Dave Young5ce9f072010-03-10 15:22:02 -0800289Does not work for sending patches.
Tim Hockin1b6bcdb2008-11-06 12:53:33 -0800290
Dave Young5ce9f072010-03-10 15:22:02 -0800291Gmail web client converts tabs to spaces automatically.
Tim Hockin1b6bcdb2008-11-06 12:53:33 -0800292
Dave Young5ce9f072010-03-10 15:22:02 -0800293At the same time it wraps lines every 78 chars with CRLF style line breaks
294although tab2space problem can be solved with external editor.
Tim Hockin1b6bcdb2008-11-06 12:53:33 -0800295
Dave Young5ce9f072010-03-10 15:22:02 -0800296Another problem is that Gmail will base64-encode any message that has a
297non-ASCII character. That includes things like European names.
Tim Hockin1b6bcdb2008-11-06 12:53:33 -0800298
Randy Dunlapa6cd6bf2007-10-16 23:29:49 -0700299 ###