Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 1 | git-imap-send(1) |
| 2 | ================ |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 6 | git-imap-send - Send a collection of patches from stdin to an IMAP folder |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | c9394b2 | 2015-01-07 22:45:48 | [diff] [blame] | 12 | 'git imap-send' [-v] [-q] [--[no-]curl] |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 13 | |
| 14 | |
| 15 | DESCRIPTION |
| 16 | ----------- |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 17 | This command uploads a mailbox generated with 'git format-patch' |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 18 | into an IMAP drafts folder. This allows patches to be sent as |
| 19 | other email is when using mail clients that cannot read mailbox |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 20 | files directly. The command also works with any general mailbox |
| 21 | in which emails have the fields "From", "Date", and "Subject" in |
| 22 | that order. |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 23 | |
| 24 | Typical usage is something like: |
| 25 | |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 26 | git format-patch --signoff --stdout --attach origin | git imap-send |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 27 | |
| 28 | |
Junio C Hamano | c9394b2 | 2015-01-07 22:45:48 | [diff] [blame] | 29 | OPTIONS |
| 30 | ------- |
| 31 | |
| 32 | -v:: |
| 33 | --verbose:: |
| 34 | Be verbose. |
| 35 | |
| 36 | -q:: |
| 37 | --quiet:: |
| 38 | Be quiet. |
| 39 | |
| 40 | --curl:: |
| 41 | Use libcurl to communicate with the IMAP server, unless tunneling |
| 42 | into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND |
| 43 | option set. |
| 44 | |
| 45 | --no-curl:: |
| 46 | Talk to the IMAP server using git's own IMAP routines instead of |
Junio C Hamano | 0762262 | 2015-03-20 21:47:26 | [diff] [blame] | 47 | using libcurl. Ignored if Git was built with the NO_OPENSSL option |
| 48 | set. |
Junio C Hamano | c9394b2 | 2015-01-07 22:45:48 | [diff] [blame] | 49 | |
| 50 | |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 51 | CONFIGURATION |
| 52 | ------------- |
| 53 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 54 | To use the tool, imap.folder and either imap.tunnel or imap.host must be set |
| 55 | to appropriate values. |
| 56 | |
| 57 | Variables |
| 58 | ~~~~~~~~~ |
| 59 | |
| 60 | imap.folder:: |
| 61 | The folder to drop the mails into, which is typically the Drafts |
| 62 | folder. For example: "INBOX.Drafts", "INBOX/Drafts" or |
Junio C Hamano | 53fe031 | 2014-09-09 21:16:17 | [diff] [blame] | 63 | "[Gmail]/Drafts". Required. |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 64 | |
| 65 | imap.tunnel:: |
| 66 | Command used to setup a tunnel to the IMAP server through which |
| 67 | commands will be piped instead of using a direct network connection |
Junio C Hamano | 53fe031 | 2014-09-09 21:16:17 | [diff] [blame] | 68 | to the server. Required when imap.host is not set. |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 69 | |
| 70 | imap.host:: |
| 71 | A URL identifying the server. Use a `imap://` prefix for non-secure |
| 72 | connections and a `imaps://` prefix for secure connections. |
Junio C Hamano | 53fe031 | 2014-09-09 21:16:17 | [diff] [blame] | 73 | Ignored when imap.tunnel is set, but required otherwise. |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 74 | |
| 75 | imap.user:: |
| 76 | The username to use when logging in to the server. |
| 77 | |
Junio C Hamano | 4cfa536 | 2009-04-18 23:01:01 | [diff] [blame] | 78 | imap.pass:: |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 79 | The password to use when logging in to the server. |
| 80 | |
| 81 | imap.port:: |
| 82 | An integer port number to connect to on the server. |
| 83 | Defaults to 143 for imap:// hosts and 993 for imaps:// hosts. |
| 84 | Ignored when imap.tunnel is set. |
| 85 | |
| 86 | imap.sslverify:: |
| 87 | A boolean to enable/disable verification of the server certificate |
| 88 | used by the SSL/TLS connection. Default is `true`. Ignored when |
| 89 | imap.tunnel is set. |
| 90 | |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 91 | imap.preformattedHTML:: |
| 92 | A boolean to enable/disable the use of html encoding when sending |
| 93 | a patch. An html encoded patch will be bracketed with <pre> |
| 94 | and have a content type of text/html. Ironically, enabling this |
| 95 | option causes Thunderbird to send the patch as a plain/text, |
| 96 | format=fixed email. Default is `false`. |
| 97 | |
Junio C Hamano | 4aa0bcc | 2010-03-03 05:13:12 | [diff] [blame] | 98 | imap.authMethod:: |
| 99 | Specify authenticate method for authentication with IMAP server. |
Junio C Hamano | c9394b2 | 2015-01-07 22:45:48 | [diff] [blame] | 100 | If Git was built with the NO_CURL option, or if your curl version is older |
| 101 | than 7.34.0, or if you're running git-imap-send with the `--no-curl` |
| 102 | option, the only supported method is 'CRAM-MD5'. If this is not set |
Junio C Hamano | 53fe031 | 2014-09-09 21:16:17 | [diff] [blame] | 103 | then 'git imap-send' uses the basic IMAP plaintext LOGIN command. |
Junio C Hamano | 4aa0bcc | 2010-03-03 05:13:12 | [diff] [blame] | 104 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 105 | Examples |
| 106 | ~~~~~~~~ |
| 107 | |
| 108 | Using tunnel mode: |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 109 | |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 110 | .......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 111 | [imap] |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 112 | folder = "INBOX.Drafts" |
| 113 | tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null" |
| 114 | .......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 115 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 116 | Using direct mode: |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 117 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 118 | ......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 119 | [imap] |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 120 | folder = "INBOX.Drafts" |
| 121 | host = imap://imap.example.com |
| 122 | user = bob |
| 123 | pass = p4ssw0rd |
Junio C Hamano | 4c43d65 | 2014-10-20 21:14:29 | [diff] [blame] | 124 | ......................... |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 125 | |
| 126 | Using direct mode with SSL: |
| 127 | |
| 128 | ......................... |
| 129 | [imap] |
| 130 | folder = "INBOX.Drafts" |
| 131 | host = imaps://imap.example.com |
| 132 | user = bob |
| 133 | pass = p4ssw0rd |
| 134 | port = 123 |
| 135 | sslverify = false |
Junio C Hamano | 4c43d65 | 2014-10-20 21:14:29 | [diff] [blame] | 136 | ......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 137 | |
| 138 | |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 139 | EXAMPLE |
| 140 | ------- |
| 141 | To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig |
| 142 | to specify your account settings: |
| 143 | |
| 144 | --------- |
| 145 | [imap] |
| 146 | folder = "[Gmail]/Drafts" |
| 147 | host = imaps://imap.gmail.com |
| 148 | user = user@gmail.com |
| 149 | port = 993 |
| 150 | sslverify = false |
| 151 | --------- |
| 152 | |
| 153 | You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error |
| 154 | that the "Folder doesn't exist". |
| 155 | |
| 156 | Once the commits are ready to be sent, run the following command: |
| 157 | |
| 158 | $ git format-patch --cover-letter -M --stdout origin/master | git imap-send |
| 159 | |
| 160 | Just make sure to disable line wrapping in the email client (GMail's web |
| 161 | interface will wrap lines no matter what, so you need to use a real |
| 162 | IMAP client). |
| 163 | |
Junio C Hamano | ec3b9a7 | 2009-02-13 08:45:52 | [diff] [blame] | 164 | CAUTION |
| 165 | ------- |
| 166 | It is still your responsibility to make sure that the email message |
| 167 | sent by your email program meets the standards of your project. |
| 168 | Many projects do not like patches to be attached. Some mail |
| 169 | agents will transform patches (e.g. wrap lines, send them as |
| 170 | format=flowed) in ways that make them fail. You will get angry |
| 171 | flames ridiculing you if you don't check this. |
| 172 | |
| 173 | Thunderbird in particular is known to be problematic. Thunderbird |
| 174 | users may wish to visit this web page for more information: |
| 175 | http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email |
| 176 | |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 177 | SEE ALSO |
| 178 | -------- |
| 179 | linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5) |
| 180 | |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 181 | GIT |
| 182 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 183 | Part of the linkgit:git[1] suite |