File: faq.html

package info (click to toggle)
getmail 3.2.5-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 428 kB
  • ctags: 161
  • sloc: python: 1,777; sh: 31; makefile: 12
file content (538 lines) | stat: -rw-r--r-- 26,344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
	<title>getmail Frequently Asked Questions</title>
	<style type="text/css" media="all">@import "getmail.css";</style>
	<meta name="author" content="Charles Cazabon" />
	
	
	
	
</head>
<body id="top">

<div class="body">
	<h2 id="faq">getmail Frequently Asked Questions (FAQ)</h2>
	<p>
		These are the Frequently Asked Questions about getmail.  If your question is not
		answered here or in the <a href="docs.html#docs">documentation</a>,
		please subscribe to the <a href="getmail.html#maillist">mailing list</a>.
	</p>

	<h3 id="faq-about"><a href="#faq">About this document</a></h3>
	<p>
		The official location of this document is
		<a href="http://www.qcc.ca/~charlesc/software/getmail-3.0/docs.html">http://www.qcc.ca/~charlesc/software/getmail-3.0/docs.html</a>.
		For easy navigation, all headings in the HTML version of this document are
		links to their parent heading.
	</p>

	<h3 id="toc"><a href="#faq">Table of Contents</a></h3>
	<ol>
		<li>
			<a href="#about-getmail">About getmail</a>
		</li>
		<li>
			<a href="#error-messages">Error messages</a>
		</li>
		<li>
			<a href="#config">getmail configuration</a>
		</li>
		<li>
			<a href="#other-errors">Other errors</a>
		</li>
		<li>
			<a href="#how">How do I &hellip;</a>
		</li>
	</ol>

	<h3 id="about-getmail"><a href="#faq">About getmail</a></h3>

	<h4 id="about-getmail-what"><a href="#about-getmail">What is getmail?</a></h4>
	<p>
		getmail is a POP3 mail retriever, with support for both ordinary and domain (or 
		multidrop) POP3 mailboxes.  It is written in Python, and licensed under the
		<a href="COPYING">GNU General Public License version 2</a>.
	</p>

	<h4 id="about-getmail-why"><a href="#about-getmail">Why did you write getmail?  Why not just use fetchmail?</a></h4>
	<p>
		I do not like some of the design choices which were made with fetchmail. getmail 
		does things a little differently, and for my purposes, better. In addition, most 
		people find getmail easier to configure and use than fetchmail.  Perhaps most 
		importantly, getmail goes to great lengths to ensure that mail is never lost, 
		while fetchmail (in its default configuration) frequently loses mail, causes 
		mail loops, bounces legitimate messages, and causes many other problems.
	</p>
	<p>
		In addition, fetchmail has a long history of security problems:
	</p>
	<ul>
		<li>
			versions released before 20 June 2001 contain a buffer overflow, which can be 
			remotely exploited (see 
			<a href="http://www.securityfocus.com/bid/2877">www.securityfocus.com/bid/2877</a> 
			for details).  getmail is not vulnerable to buffer overflows, because buffers in 
			Python are dynamically sized.
		</li>
		<li>
			Another remotely-exploitable security hole discovered in fetchmail in June 2002;
			<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0146">versions prior to 5.9.10 (released in June 2002)
			are exploitable</a>.
		</li>
		<li>
			Reading fetchmail's UPDATES file, it appears that another security problem was 
			fixed in 5.9.12, where a server could crash fetchmail on 64-bit platforms.  Also 
			worrying is a mention that it includes a fix for &quot;password shrouding&quot;.
		</li>
		<li>
			Another remotely-exploitable security hole in fetchmail discovered in September 2002;
			<a href="http://security.e-matters.de/advisories/032002.html">this hole</a> lets an 
			attacker run arbitrary code on the victim's computer.
		</li>
		<li>
			Another remotely-exploitable security hole in fetchmail discovered in December 2002; once again, a remote 
			attacker can run arbitrary code on the machine running fetchmail in its default 
			configuration.  See <a href="http://security.e-matters.de/advisories/052002.html">this advisory</a>
			for details.
		</li>
		<li>
			January 2003: <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCAN-2002-1365">More buffer overflows in fetchmail let attackers run arbitrary code</a>.
		</li>
		<li>
			October 2003: <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0792">Anyone can cause fetchmail to crash by sending you a message</a>.
			Other problems are <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0790">here</a>, and <a href="http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=fetchmail">I might have missed some</a>.
		</li>
	</ul>
	<p>I've given up even trying to stay abreast of the various security holes in fetchmail.</p>
	<p>
		<a href="http://docs.freebsd.org/cgi/getmsg.cgi?fetch=585008+0+archive/2001/freebsd-arch/20010218.freebsd-arch">But don't just
		take my word for it</a>.
	</p>
	<p>
		getmail users have not had to worry about any of these security holes.
	</p>

	<h4 id="about-getmail-support"><a href="#about-getmail">How can I get support for getmail?</a></h4>
	<p>
		getmail is <a href="http://www.fsf.org/">Free Software</a>.  As such, it comes 
		with no warranty.  However, I will do my best to support getmail on a voluntary 
		basis through the <a href="getmail.html#maillist">getmail mailing list</a>.
	</p>
	<p>
		If you are using getmail in a commercial or other environment where problems 
		cost money, consider contacting me privately for commercial support.
	</p>
	<p>
		If you have questions about getmail, the first step is to read the
		<a href="docs.html#docs">documentation</a>, and the remainder of the 
		<a href="faq.html#faq">Frequently Asked Questions</a>.  If your question isn't 
		answered there, search the getmail mailing list archives at
		<a href="http://marc.theaimsgroup.com/?l=getmail&amp;r=1&amp;w=2">http://marc.theaimsgroup.com/?l=getmail&amp;r=1&amp;w=2</a>.
	</p>
	<p>
		If you still haven't found an answer to your question, please subscribe to the 
		<a href="getmail.html#maillist">mailing list</a> by sending a blank email to 
		&lt;getmail-subscribe @ discworld.dnsalias.org&gt;. If you post your question 
		there, I will see it.  As an additional bonus, your question may be answered by 
		another member of the list.
	</p>

	<h4 id="about-getmail-bug"><a href="#about-getmail">I think I found a bug!  How do I report it?</a></h4>
	<p>
		Ideally, you should join the <a href="getmail.html#maillist">mailing list</a>. 
		Send your bug report there.  You should include the following information:
	</p>
	<ul>
		<li>getmail version</li>
		<li>Python version</li>
		<li>any error message which getmail displayed</li>
		<li>the output from running getmail with your normal options plus <span class="sample">--dump</span></li>
		<li>
			if your problem is getmail not determining the proper local recipient, please include
			the output of running getmail with your normal options plus <span class="sample">--trace</span>,
			showing the retrieval of <strong>one</strong> problematic message.
		</li>
	</ul>
	<p>
		If you absolutely cannot sign up for the mailing list, send the report to me 
		directly. I may not be able to respond to all reports privately, but I will try 
		to address any bugs I find out about this way.
	</p>

	<h4 id="about-getmail-virus"><a href="#about-getmail">Does getmail support virus scanning of retrieved messages?</a></h4>
	<p>
		Yes, getmail can use external MDAs which do absolutely any type of message scanning, filtering,
		etc.  Also see <a href="#how-virus">this question about how to do this</a>.
	</p>

	<h4 id="about-getmail-newfields"><a href="#about-getmail">Does getmail rewrite mail headers when it retrieves mail?</a></h4>
	<p>
		No&mdash;rewriting message header fields is bad.  getmail will add a new 
		Received: header field and a new Delivered-To: header field, but does not 
		rewrite existing headers.  You can disable the creation of these header fields.
	</p>

	<h4 id="about-getmail-recipients"><a href="#about-getmail">How does getmail decide what local recipients to deliver a message to?</a></h4>
	<p>This is a two-step process.</p>
	<ol>
		<li>
			getmail first tries to find who the message was originally addressed
			to using one of two methods:
			<ul>
				<li>
					If you have enabled SPDS *ENV support, getmail will retrieve the original
					envelope of the message from an SPDS-enabled server (i.e. Demon provides this).
				</li>
				<li>
					Envelope recipient address method.  If the MTA running on the POP3 servers is 
					sensible, it will record the envelope recipient address in a new header field at 
					the top of the message.  You can then tell getmail to find it using the
					<a href="docs.html#directive-envelope-recipient">envelope_recipient directive</a>.
				</li>
			</ul>
		</li>
		<li>
			getmail will then compare each address found above to any configured local 
			recipient address patterns.  If a pattern matches, getmail will deliver the 
			message to that target.  If no patterns match, or if you have not configured 
			getmail to reconstruct the original envelope, the message is delivered to the 
			default delivery instruction (postmaster directive).
		</li>
	</ol>

	<h3 id="error-messages"><a href="#faq">Error Messages</a></h3>

	<h4 id="error-message-fsync"><a href="#error-messages">getmail fails with a message &quot;<span class="error">AttributeError: 'module' object has no attribute 'fsync'</a></h4>
	<p>
		This is not a problem with getmail; it is a <a href="http://www.python.org/2.3.1/bugs.html">well-known bug in the Python 2.3.1 distribution</a>.
		Downgrade to Python version 2.3.0 or before, or upgrade to 2.3.2, which should fix the problem.
	</p>

	<h4 id="error-message-percent"><a href="#error-messages">getmail complains about &quot;<span class="error">incomplete format string</span>&quot; &hellip;</a></h4>
	<p>
		Double any percent signs you have in your getmailrc file&mdash;i.e., if your 
		password is <span class="sample">foo%bar</span>, then actually specify it as 
		<span class="sample">foo%%bar</span>.
	</p>

	<h4 id="error-message-empty-value"><a href="#error-messages">getmail complains about &quot;<span class="error">error in getmailrc file (expected option value, got &hellip; )</span>&quot;</a></h4>
	<p>
		You have a syntax error in your getmailrc file.  Empty option values are not 
		allowed.  If you want to specify an empty string as an option value, you have to 
		quote it:
	</p>
	<pre class="sample">foo = &quot;&quot;</pre>

	<h4 id="error-message-writable">
		<a href="#error-messages">getmail complains about &quot;<span class="error">configuration error in getmailrc file (/path/to/getmailrc):  file is group- or world-writable</span>&quot;.
		What's wrong?</a>
	</h4>
	<p>
		Your getmailrc configuration file is group- or world-writable.  For security 
		reasons, getmail refuses to run with a group- or world-writable getmailrc file.  
		Change the permissions on that file.
	</p>

	<h4 id="error-message-locals">
		<a href="#error-messages">getmail complains about &quot;<span class="error">Configuration error (local directives require use_*env or envelope_recipient to identify envelope recipient)</span>&quot;.
		What's wrong?</a>
	</h4>
	<p>
		The account configuration in question contains <a href="docs.html#directive-local"><span class="sample">local</span></a>
		directives, but you haven't told getmail how to determine the original envelope recipient address of the message.
		To use multidrop mode, you must either enable <a href="docs.html#directive-use-*env"><span class="sample">use_*env</span></a>
		(if your mailhost supports it) or tell getmail which header field the envelope recipient address is recorded in by the
		mailhost's MTA using the <a href="docs.html#directive-envelope-recipient"><span class="sample">envelope_recipient</span></a>
		directive.
	</p>

	<h4 id="error-message-no-matching-headers">
		<a href="#error-messages">getmail complains about &quot;<span class="error">Configuration error (no matching header fields (something))</span>&quot;.
		What's wrong?</a>
	</h4>
	<p>
		You've used the <a href="docs.html#directive-envelope-recipient"><span class="sample">envelope_recipient</span></a>
		directive to enable domain mailbox operation, but a retrieved message didn't contain the header field you specified.
		To use multidrop mode, you must either enable <a href="docs.html#directive-use-*env"><span class="sample">use_*env</span></a>
		(if your mailhost supports it) or tell getmail which header field the envelope recipient address is recorded in by the
		mailhost's MTA using the <a href="docs.html#directive-envelope-recipient"><span class="sample">envelope_recipient</span></a>
		directive.
	</p>

	<h4 id="error-message-root">
		<a href="#error-messages">getmail complains about &quot;<span class="error">Delivery error (refuse to deliver to commands as root)</span>&quot;.
		What's wrong?</a>
	</h4>
	<p>
		You're running getmail as user &quot;root&quot; (UID 0) and trying to have getmail run an external command.
		<a href="docs.html#delivery-targets">The documentation says don't do that.</a>
	</p>

	<h3 id="config"><a href="#faq">getmail configuration</a></h3>

	<h4 id="config-domain"><a href="#config">What is a &quot;domain mailbox&quot;?</a></h4>
	<p>
		A domain (or multidrop) mailbox is a POP3 mailbox which receives mail for all 
		users in a given domain.  Normal mailboxes contain mail for a single user (like 
		<span class="sample">jason@myisp.co.uk</span>); some Internet Service Providers 
		which provide webhosting or other services will provide a POP3 mailbox which 
		receives mail for all addresses in a given domain (i.e. mail for
		<span class="sample">service@smallcompany.net</span>,
		<span class="sample">sales@smallcompany.net</span>, and indeed anything
		<span class="sample">@smallcompany.net</span> ends up in the same POP3 mailbox).
	</p>
	<p>
		getmail provides a method of retrieving mail from a domain mailbox and 
		distributing it among the various users automatically.  See the documentation 
		sections on <a href="docs.html#directive-local">header field pattern matching delivery targets</a>,
		<a href="docs.html#directive-envelope-recipient">envelope recipient address field specification</a>,
		<a href="docs.html#directive-postmaster">default delivery target</a>, and
		<a href="docs.html#account-types-domain">POP3 domain mailboxes</a>.
	</p>

	<h4 id="config-mta"><a href="#config">Do I have to run sendmail or another MTA to use getmail?</a></h4>
	<p>
		No.  getmail delivers directly to Maildirs or via arbitrary MDAs, and never 
		injects mail via SMTP, so no MTA is necessary. P.S.  If you're currently running 
		sendmail, consider switching to <a href="http://www.qmail.org/">qmail</a> if you 
		need a full MTA, or <a href="http://untroubled.org/nullmailer/">nullmailer</a> 
		if you relay all your mail through your ISP's smarthost.  Both of them are 
		better and more secure than sendmail.
	</p>

	<h4 id="config-simple"><a href="#config">I've got a simple POP3 account.  Do I need &quot;local=&hellip;&quot; configuration variables?</a></h4>
	<p>
		No, you don't need them.  They might be useful to you if the MTA on the POP3 server
		supports extension addresses (i.e. <a href="http://www.qmail.org/">qmail</a>) and records the envelope
		recipient address properly.
		But in general, you will only need to use a <a href="docs.html/#directive-postmaster">postmaster directive</a>.
	</p>


	<h3 id="other-errors"><a href="#faq">Other getmail errors</a></h3>

	<h4 id="other-errors-maildir"><a href="#other-errors">I've configured getmail to deliver to my Maildir, but it won't do it.  Why?</a></h4>
	<p>
		Double-check your getmailrc file.  Maildir delivery targets
		<strong>must</strong> include a trailing slash.
	</p>

	<h4 id="other-errors-mbox"><a href="#other-errors">I've configured getmail to deliver to my mbox file, but it won't do it.  Why?</a></h4>
	<p>
		getmail 3.x does not have native mbox support, as all mbox-capable MDAs on a 
		given system must use the same locking mechanism and support the same mbox 
		subtype. You can use getmail's command delivery mechanism to deliver through an 
		external mbox-aware MDA (see the next paragraph) if you must, but consider using 
		maildirs instead.
	</p>
	<p>
		getmail includes <span class="sample">getmail_mbox</span>, an mbox delivery 
		agent you can use in this fashion.  It supports mboxrd-format mbox files and 
		uses flock-style locking.  Make sure these are the correct types for your system 
		before using it, as all mbox-handling programs on a system must use the same 
		types and values.
	</p>
	<p>
		To use getmail_mbox to deliver to mbox files, specify it as an external MDA.
		It takes the path to the mbox file as a commandline argument, as follows:
		<pre class="sample">getmail_mbox /path/to/mbox</pre>
		Example uses:
		<pre class="sample">
postmaster = &quot;|/path/to/getmail_mbox /path/to/mbox&quot;
local = &quot;^joe@.*$,|/path/to/getmail_mbox /home/joe/mbox&quot;
local = &quot;^sam@.*$,|/path/to/getmail_mbox /home/sam/mbox&quot;
		</pre>
	</p>

	<h4 id="other-errors-command"><a href="#other-errors">I've configured getmail to deliver to a command (external MDA), but it complains that the command <span class="error">exited 0 but wrote to stderr</span>.  Why?</a></h4>
	<p>
		Command deliveries must exit 0 and not write anything to stderr to be considered 
		a successful delivery.  If you know your MDA can write to stderr on success, 
		give your command a <span class="sample">--quiet</span> option (if it supports 
		it) or discard or redirect stderr in the command specification of the delivery 
		target.
	</p>

	<h4 id="other-errors-allmail"><a href="#other-errors">Why does getmail retrieve all my messages when I've told it to only retrieve new mail?</a></h4>
	<p>
		Your POP3 mail server is probably broken.  getmail requires that the server 
		support the POP3 UIDL command to uniquely identify messages. If the server 
		doesn't support it, getmail cannot tell which messages it has already seen, and 
		therefore retrieves all messages.
	</p>


	<h3 id="how"><a href="#faq">How do I &hellip;</a></h3>

	<h4 id="how-delivered-to"><a href="#how">How do I stop getmail adding a Delivered-To: header to email?</a></h4>
	<p>
		Use the <a href="docs.html#directive-no-delivered-to">no_delivered_to configuration directive</a>.
	</p>

	<h4 id="how-received"><a href="#how">How do I stop getmail adding a Received: header to email?</a></h4>
	<p>
		Use the <a href="docs.html#directive-no-received">no_received configuration directive</a>.
	</p>

	<h4 id="how-pipe"><a href="#how">How do I make getmail deliver messages to a program?</a></h4>
	<p>
		Specify the delivery target as <span class="sample">|path-to-command</span>. You should probably 
		use full paths (e.g. <span class="sample">/usr/bin/maildrop</span>). As a basic security 
		precaution, getmail will refuse to deliver to programs if it is running as root.
	</p>
	<p class="warning">
		Warning:  if you don't know what you're doing, you can shoot yourself in the 
		foot with this option.
	</p>

	<h4 id="how-smtp"><a href="#how">How do I make getmail deliver messages by re-injecting with SMTP?</a></h4>
	<p>
		You don't.  getmail doesn't do this, to prevent lost mail, mail loops, and 
		bounces if getmail or your Mail Transfer Agent is misconfigured. getmail has 
		native support for delivering to qmail-style Maildirs and commands (pipe 
		delivery). Therefore you shouldn't need to re-inject retrieved messages.
	</p>
	<p>
		If you absolutely must inject retrieved messages into an MTA, it is possible to 
		do this knowing no more than what is included in the getmail documentation.  If 
		you know enough about mail to avoid the pitfalls mentioned above, you don't need 
		my help figuring out how.
	</p>

	<h4 id="how-ssl"><a href="#how">How do I make getmail use SSL / talk to an SSL-wrapped POP3 server (POP3S)?</a></h4>
	<p>
		Use the SSL utility <a href="http://www.stunnel.org/">stunnel</a> to set up an SSL tunnel from
		a port on your machine to the SSL-wrapped POP3 port (typically TCP port 995) on the mailserver.
		Then configure getmail to connect to the local end of the tunnel.
	</p>
	<p>
		The easiest way to do this is to use a tiny shellscript wrapper which sets up the tunnel
		and then runs getmail.  An example would be:
	</p>
	<pre class="sample">#!/bin/sh
/usr/sbin/stunnel -c -D 4 -d 8110 -r 192.168.2.3:995
getmail
	</pre>
	<p>
		The above script sets up a tunnel from port 8110 on localhost to port 995 on
		the mailserver at 192.168.2.3.  You would then use the following getmailrc
		configuration:
	</p>
	<pre class="sample">[SSL-wrapped access to my mail]
server = localhost
port = 8110
username = me
password = mypassword
	</pre>
	<p>
		Note that there are security considerations with this configuration, as with all 
		configurations.  For instance, do not configure getmail to connect to a port 
		that another local user might have already set up a listener on; stunnel could 
		fail to set up the tunnel, and if the other user had set up a POP3 listener, 
		getmail would send your credentials to it.  You could set up the tunnel on
		a privileged port to prevent non-privileged local users from mounting this
		type of attack.
	</p>
	<h4 id="how-daemon"><a href="#how">How do I run getmail in &quot;daemon&quot; mode?</a></h4>
	<p>
		Use your system's cron utility to run getmail periodically if you wish to have 
		mail retrieved automatically at intervals.  This is precisely what cron is 
		designed to do; there's no need to add special code to getmail to do this.
	</p>
	<p>
		Keep in mind that cron usually runs user cron jobs in a simpler environment
		than the user has in a login shell.  In particular, $PATH is frequently much 
		shorter.  If your getmail shell script wrapper has `which python` or similar
		in it, you might need to explicitly set $PATH or change the wrapper to point
		explicitly to the Python interpreter.
	</p>

	<h4 id="how-spam"><a href="#how">How do I use SpamAssassin (or another spam-filtering solution) with getmail?</a></h4>
	<p>
		Use it as an external MDA, which getmail supports.  getmail user &quot;Frankye&quot;
		contributed <a href="http://marc.theaimsgroup.com/?l=getmail&m=107591610118287&w=2">a
		working SpamAssassin setup in this list message</a>.  Also see his
		(and others') contributions in <a href="http://marc.theaimsgroup.com/?t=108306112300002&r=1&w=2">this
		thread about spam filtering</a>.
	</p>

	<h4 id="how-tmda"><a href="#how">How do I use TMDA with getmail?</a></h4>
	<p>
		<a href="http://tmda.sourceforge.net">TMDA</a> is the Tagged Message Delivery 
		Agent, an excercise in preventing spam from ever reaching your inbox.
	</p>
	<p>
		To make getmail export the <a href="docs.html#directive-delivery-
		targets">environment variables</a> which TMDA needs, you must use
		<a href="docs.html#directive-local">local directives</a> in your getmailrc file.  
		You can then optionally set the <a href="docs.html#directive-extension-sep">extension_sep</a>
		and <a href="docs.html#directive-extension-depth">extension_depth</a> directives.
	</p>
	<p>
		For example, if getmail determines the envelope recipient to be
		<span class="sample">domain-user-ext1-ext2@otherdomain.tld</span>,
		<span class="sample">extension_sep</span> is set to <span class="sample">-</span>,
		and <span class="sample">extension_depth</span> is set to <span class="sample">1</span>,
		then getmail will set <span class="sample">EXT</span> to <span class="sample">user-ext1-ext2</span>.
		If <span class="sample">extension_depth</span> is 2, it will instead set
		<span class="sample">EXT</span> to <span class="sample">ext1-ext2</span>.
	</p>
	<p>
		TMDA renames existing Delivered-To: header fields to Old-Delivered-To:.  Previous
		versions (0.55 through 0.57 or so) instead tried to strip recent Delivered-To:
		fields and may have required disabling getmail's addition of new Delivered-To:
		header fields.
	</p>
	<p>
		You will need a wrapper around TMDA to use in a
		<a href="docs.html#delivery-targets">command delivery target</a>
		which conditionally delivers the message based on TMDA's exit code.
		getmail does not include such a wrapper; you will need to write it or find
		it yourself.
	</p>
	<p>
		Note that getmail will only be able to determine the envelope recipient address 
		(and extension part of that address) reliably if the MTA at the POP3 server is 
		configured to record the envelope recipient in a message header field (i.e. as 
		qmail does with Delivered-To:), and you have configured getmail to only look at 
		that header field with the
		<a href="docs.html#directive-envelope-recipient">envelope_recipient</a> directive,
		or if your ISP supports the SPDS *ENV extension and you have configured
		getmail to use it.
	</p>
	<p>
		If anyone has concrete experience using getmail and TMDA together, please feel 
		free to send instructions or your wrapper script to me; I personally do not use 
		a filtering MDA and therefore have no experience making TMDA work with getmail.
	</p>

	<h4 id="how-virus"><a href="#how">How do I do virus scanning of retrieved messages with getmail?</a></h4>
	<p>
		You can do this in hundreds of different ways.  There are many threads in the mailing
		list archive dealing specifically with this topic; please read at least all of
		February 2003, including <a href="http://marc.theaimsgroup.com/?l=getmail&m=104467583728416&w=2">this
		thread</a>, before posting to the mailing list.
	</p>

	<h4 id="how-filter"><a href="#how">How do I do message filtering with getmail?</a></h4>
	<p>
		The best way is to use a program designed specifically to do message filtering, like a filtering
		MDA.  The best-known example of a filtering MDA is procmail, but I don't recommend using it.
		maildrop is much easier to use.
	</p>
	<p>
		getmail can invoke arbitrary programs as external MDAs, so you can also write your
		own filters as you choose.  A simple example, changing all occurrences of the
		string &quot;stupid&quot; to &quot;XXXXXX&quot; and using safecat to deliver the
		resulting filtered message to a Maildir might be to specify a delivery
		target of <pre class="sample">|/bin/sed 's/stupid/XXXXXX/g' | safecat ./Maildir/tmp ./Maildir/new</pre>
		.
	</p>
</div>


</body>
</html>