Version 0.2 of the program.
[attachcheck] / README.rst
1 AttachCheck
2 =============
3
4 :Author: Benjamin Mako Hill <mako@atdot.cc>
5 :Date: Sun, 12 Apr 2009 17:51:04 -0400
6 :Copyright: GNU General Public License version 3
7
8 How many times have you said, "I've attached the file below," and then
9 failed to actually attach the file? It happens to even the best of us.
10
11 AtttachCheck is a program that seeks to end this forever. AttachCheck
12 looks through all outgoing mail. If it expects an attachment and doesn't
13 see one, it refuses to send it until you confirm that you really want to
14 send the message sans attachment. 
15
16 AttachCheck It was written in Benjamin Mako Hill. You can find the
17 latest version of this program, more information, and some of Mako's
18 sometime accidentally insightful or useful ideas at his eponymous
19 homepage at: http://mako.cc
20
21 The AttachCheck website with the latest version of the program is always
22 available here: http://mako.cc/projects/attachcheck/
23
24 Prerequisites
25 --------------
26
27 * AttachCheck is written in Python. You will need to have Python
28   installed in our system.
29
30 * You will need to deliver mail to locally (i.e., not over SMTP to
31   another machine).
32
33 * You will need to be able to configure you mail client to deliver to a
34   differnet location on your system. 
35
36 If you use OutLook and Windows, I found a similar program for that
37 setup: http://www.danevans.co.uk/vba/
38
39
40 How AttachCheck Works
41 ----------------------
42
43 AttachCheck monitors outgoing mail for keywords. It expects attachment
44 if it finds a text-based attachment if it finds one of the following
45 words:
46
47 * Attach
48 * Attached
49 * Attaching
50 * Attachment
51
52 If you can think of other words (in any language) that are indicative of
53 attachments, please contact the author of the program so others can
54 benefit as well.
55
56 AttachCheck is basically just a wrapper for your mail transfer agent
57 (MTA). It takes mail on STDIN, checks it, and then passes it on to your
58 *real* MTA or exits with an error if there is no attachment and it
59 expects.
60
61 Sometimes you may talk about attachments when you don't include any.
62 AttachCheck will stop you in these cases but you'll need to
63 confirm/override it by hand. This can be one in one of two ways:
64
65 1. Adding the word "CONFIRM" in all capital letters in the beginning of
66    the subject line of your outgoing mail. AttachCheck will remove
67    the word when the mail is sent.
68
69 2. Adding a special header that like this: ``X-AttachCheck-Override:
70    Yes``
71
72
73 Enabling AttachCheck in Mutt
74 -----------------------------
75
76 AttachCheck was written for and tested with Mutt and it works great
77 under that client. I got AttachCheck working by adding the following two
78 lines to my muttrc file::
79
80  set sendmail='~/bin/attachcheck'
81  macro compose \e0 ':set editor="~/bin/attachcheck_add_override"<enter>e:set editor=vim<enter>'
82
83 This will set up the sendmail wrapper so that attachcheck is used and
84 then set up a macro bound to a key (in this case `META`-0) that will add
85 the override line into your mail with a single keystroke.
86
87 You'll of course want to customize these lines to include your editor
88 choice and to include the actual path of ``attachcheck`` and the
89 ``attachcheck_add_override``.
90
91 Copyright / Information
92 -------------------------
93
94 copyright (c) 2004-2009 Benjamin Mako Hill <mako@atdot.cc>
95
96   This program is free software: you can redistribute it and/or modify
97   it under the terms of the GNU General Public License as published by
98   the Free Software Foundation, either version 3 of the License, or (at
99   your option) any later version.
100
101   This program is distributed in the hope that it will be useful, but
102   WITHOUT ANY WARRANTY; without even the implied warranty of
103   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
104   General Public License for more details.
105
106   You should have received a copy of the GNU General Public License
107   along with this program.  If not, see <http://www.gnu.org/licenses/>.
108
109 On Debian systems, the complete text of the GNU General Public License
110 can be found in /usr/share/common-licenses/GPL. It is also distributed
111 in full with AttachCheck in the ``COPYING`` file.
112
113

Benjamin Mako Hill || Want to submit a patch?