Preface |
|
xiii | |
|
Part I The Nefarious Spam Problem |
|
|
1 | (40) |
|
|
3 | (8) |
|
|
4 | (1) |
|
When a Guerrilla Masquerades as You |
|
|
5 | (1) |
|
The Major Proposals for Standards |
|
|
6 | (1) |
|
|
7 | (2) |
|
|
7 | (1) |
|
Theft of Bank or Credit Card Information |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
8 | (1) |
|
The Cost of Spam Suppression |
|
|
9 | (1) |
|
|
10 | (1) |
|
The Characteristics of Spam Email |
|
|
11 | (30) |
|
|
12 | (1) |
|
Relaying through MX Servers |
|
|
13 | (2) |
|
Falsifying the Envelope Sender Address |
|
|
15 | (1) |
|
Disguising the Subject: Header |
|
|
16 | (2) |
|
Camouflaging the HTML Body |
|
|
18 | (5) |
|
|
18 | (2) |
|
Character-Entity Encoding |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
22 | (1) |
|
Attempting to Fool Signature Detectors |
|
|
23 | (1) |
|
|
24 | (2) |
|
|
26 | (12) |
|
|
27 | (1) |
|
|
28 | (1) |
|
The Protocol Specification |
|
|
29 | (2) |
|
Email Addresses Mask URLs |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
38 | (3) |
|
Part II Creating a Test Environment |
|
|
41 | (42) |
|
Setting Up a Bait Machine |
|
|
43 | (18) |
|
|
44 | (3) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
47 | (3) |
|
|
47 | (1) |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (4) |
|
|
50 | (2) |
|
|
52 | (1) |
|
|
53 | (1) |
|
|
54 | (2) |
|
A Brief Overview of Logging |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
Excluding Non-email Ports |
|
|
56 | (2) |
|
|
56 | (1) |
|
|
57 | (1) |
|
Turn Off Unwanted Daemons |
|
|
58 | (1) |
|
Make Sure the Machine Reboots |
|
|
58 | (3) |
|
|
61 | (14) |
|
|
61 | (3) |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
67 | (8) |
|
|
75 | (8) |
|
Tell Users about Plus Addressing |
|
|
75 | (2) |
|
Plus Addressing with Usenet News |
|
|
77 | (1) |
|
|
77 | (1) |
|
|
78 | (3) |
|
|
81 | (2) |
|
Part III The Parts of a sendmail Milter |
|
|
83 | (122) |
|
The Roles and Flow of a Milter |
|
|
85 | (12) |
|
A Milter's Role in the Middle |
|
|
85 | (1) |
|
A Milter from the Point of View of sendmail |
|
|
86 | (1) |
|
|
87 | (10) |
|
Return Values from Multiple Milters |
|
|
88 | (1) |
|
Milter Replies for Connect and EHLO/HELO |
|
|
89 | (1) |
|
Milter Replies to MAIL FROM: |
|
|
90 | (1) |
|
Milter Replies to RCPT TO: |
|
|
91 | (1) |
|
Milter Replies with SMTP DATA |
|
|
92 | (3) |
|
Milter Replies at End-of-Message |
|
|
95 | (1) |
|
|
96 | (1) |
|
Milter Post-Connection Cleanup |
|
|
96 | (1) |
|
|
97 | (54) |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
99 | (14) |
|
Structure smfiDesc and smfi_register() |
|
|
100 | (3) |
|
The smfiDesc Structure's Flags |
|
|
103 | (1) |
|
The smfi_setconn() and smfi_opensocket() Routines |
|
|
104 | (5) |
|
The smfi_settimeout() Routine Initializes the Connection Timeout |
|
|
109 | (1) |
|
The smfi_main() Routine Launches Multithreaded Mode |
|
|
109 | (1) |
|
In Summary, a Minimal main() Function |
|
|
110 | (3) |
|
The smfi Data Access Routines |
|
|
113 | (14) |
|
The smfi_getsymval() Routine Fetches Macro Values |
|
|
114 | (2) |
|
The smfi_setpriv() Routine Registers Private Data |
|
|
116 | (2) |
|
The smfi_getpriv() Routine Fetches Private Data |
|
|
118 | (1) |
|
The smfi_setreply() Routine Changes the SMTP Reply |
|
|
119 | (4) |
|
The smfi_setmlreply() Routine Sets Multiline Replies (V8.13 and Later) |
|
|
123 | (1) |
|
The smfi_setdbg() Routine Sets the Milter Debugging Level (V8.13 and Later) |
|
|
124 | (2) |
|
The smfi_setback log() Routine Sets the listen(2) Queue Size (V8.13 and Later) |
|
|
126 | (1) |
|
The smfi Modifier Routines |
|
|
127 | (24) |
|
|
128 | (1) |
|
The smfi_addheader() Routine Adds a Header to the Message |
|
|
129 | (3) |
|
The smfi_insheader() Routine Inserts a Header into the Message |
|
|
132 | (3) |
|
The smfi_chgheader() Routine Changes or Removes a Header |
|
|
135 | (3) |
|
The smfi_addrcpt() Routine Adds a Recipient |
|
|
138 | (2) |
|
The smfi_delrcpt() Routine Removes a Recipient |
|
|
140 | (3) |
|
The smfi_replacebody() Routine Replaces the Message Body |
|
|
143 | (2) |
|
The smfi_progress() Routine Buys More Time (V8.13 and Later) |
|
|
145 | (1) |
|
The smfi_quarantine() Routine Quarantines Messages (V8.13 and Later) |
|
|
146 | (2) |
|
The smfi_stop() Routine Quits the Milter (V8.13 and Later) |
|
|
148 | (3) |
|
The xxfi Handler Milter Functions |
|
|
151 | (54) |
|
|
153 | (1) |
|
Possible Return Value Macros |
|
|
153 | (1) |
|
The Common First ctx Argument |
|
|
154 | (1) |
|
|
154 | (1) |
|
|
155 | (1) |
|
xxfi_connect() Reviews the Connection |
|
|
156 | (5) |
|
How to Use xxfi_connect() |
|
|
158 | (1) |
|
An Example of xxfi_connect() |
|
|
159 | (1) |
|
xxfi_connect and sendmail Macros |
|
|
160 | (1) |
|
Other Uses for xxfi_connect() |
|
|
161 | (1) |
|
xxfi_helo() Reviews SMTP HELO/EHLO |
|
|
161 | (4) |
|
|
162 | (2) |
|
An Example of xxfi_helo() |
|
|
164 | (1) |
|
xxfi_helo() and sendmail Macros |
|
|
165 | (1) |
|
Other Uses for xxfi_helo() |
|
|
165 | (1) |
|
xxfi_envfrom() Reviews SMTP MAIL FROM |
|
|
165 | (6) |
|
How to Use xxfi_envfrom() |
|
|
166 | (3) |
|
An Example of xxfi_envfrom() |
|
|
169 | (1) |
|
xxfi_envfrom() and sendmail Macros |
|
|
170 | (1) |
|
Other Uses for xxfi_envfrom() |
|
|
171 | (1) |
|
xxfi_envrcpt() Reviews SMTP RCPT TO |
|
|
171 | (5) |
|
How to Use xxfi_envrcpt() |
|
|
171 | (4) |
|
An Example of xxfi_envrcpt() |
|
|
175 | (1) |
|
xxfi_envrcpt() and sendmail Macros |
|
|
176 | (1) |
|
Other Uses for xxfi_envrcpt() |
|
|
176 | (1) |
|
xxfi_header() Reviews Headers |
|
|
176 | (6) |
|
|
178 | (2) |
|
An Example of xxfi_header() |
|
|
180 | (2) |
|
Other Uses for xxfi_header() |
|
|
182 | (1) |
|
xxfi_eoh Reviews at End of Headers |
|
|
182 | (4) |
|
|
183 | (2) |
|
|
185 | (1) |
|
Other Uses for xxfi_eoh() |
|
|
186 | (1) |
|
xxfi_body Reviews Each Body Chunk |
|
|
186 | (4) |
|
|
186 | (3) |
|
An Example of xxfi_body() |
|
|
189 | (1) |
|
Other Uses for xxfi_body() |
|
|
190 | (1) |
|
xxfi_eom Reviews at End of Envelope |
|
|
190 | (7) |
|
|
192 | (1) |
|
xxfi_eom and sendmail Macros |
|
|
193 | (1) |
|
|
194 | (2) |
|
|
196 | (1) |
|
Other Uses for xxfi_eom() |
|
|
196 | (1) |
|
xxfi_abort Handles Envelope Abort |
|
|
197 | (3) |
|
|
197 | (2) |
|
An Example of xxfi_abort() |
|
|
199 | (1) |
|
Other Uses for xxfi_abort() |
|
|
200 | (1) |
|
xxfi_close Handles Connection Cleanup |
|
|
200 | (5) |
|
End-of-Connection Cleanup |
|
|
200 | (1) |
|
|
200 | (2) |
|
An Example of xxfi_close() |
|
|
202 | (1) |
|
Other Uses for xxfi_close() |
|
|
203 | (2) |
|
|
205 | (90) |
|
Milters and the Environment |
|
|
207 | (24) |
|
|
208 | (2) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
210 | (3) |
|
|
211 | (1) |
|
|
211 | (2) |
|
How to Start and Stop Your Milter |
|
|
213 | (4) |
|
|
216 | (1) |
|
Put Your Milter into the Background |
|
|
217 | (2) |
|
|
219 | (2) |
|
|
221 | (4) |
|
|
225 | (1) |
|
Consider Portability Early |
|
|
226 | (1) |
|
|
227 | (2) |
|
|
229 | (2) |
|
User and Temporal Feedback |
|
|
231 | (24) |
|
|
231 | (2) |
|
|
233 | (1) |
|
The Outside World as the End User |
|
|
233 | (1) |
|
Your Internal Customer as the End User |
|
|
233 | (1) |
|
|
234 | (3) |
|
Possible Feedback Mechanisms |
|
|
237 | (4) |
|
|
241 | (1) |
|
|
242 | (2) |
|
Archive, Reject, or Pass Through Spam |
|
|
244 | (2) |
|
|
246 | (7) |
|
|
253 | (2) |
|
Handy Routines for the Message Body |
|
|
255 | (40) |
|
Parsing MIME-Encoded Boundaries |
|
|
256 | (2) |
|
|
258 | (7) |
|
Decoding Quoted-Printable Encoding |
|
|
265 | (4) |
|
Decoding Character-Entity Encoding |
|
|
269 | (8) |
|
|
277 | (2) |
|
|
279 | (5) |
|
|
284 | (4) |
|
How to Use/usr/share/dict/words |
|
|
288 | (5) |
|
|
293 | (2) |
|
Appendix Useful Source Code |
|
|
295 | (2) |
|
|
295 | (1) |
|
|
296 | (1) |
Bibliography |
|
297 | (10) |
Index |
|
307 | |