|
The Exim SMTP Mail Server: Official Guide for Release 4 2nd Edition
Enabling users to take full advantage of the Exim system, this practical reference provides an essential resource for e-mail administrators, designers, or implementers of network applications. Included are instructions to deploy Exim as the SMTP email server throughout an organization, configure a reliable mail service to meet the specific needs of
the site, tune the server to give optimal performance in the environment, as well as secure an e-mail system to prevent unauthorized use and maintain the confidentiality of messages.
CONTENTS:
v
Contents
Preface xiii
Chapter 1. Introduction 1
Chapter 2. How Internet mail works 4
2.1 Different types of MTA 8
2.2 Internet message standards 9
2.3 Forgery 16
2.4 Authentication and encryption 16
2.5 Routing a message 16
2.6 Checking incoming mail 17
2.7 Overview of the DNS 20
2.8 DNS records used for mail routing 23
2.9 Related DNS records 24
2.10 Common DNS errors 25
2.11 Role of the postmaster 27
Chapter 3. Exim overview 28
3.1 Eximphilosophy 28
3.2 Exim's queue 29
3.3 Receiving and delivering messages 29
3.4 Eximprocesses 30
3.5 Coordination between processes 30
3.6 How Exim is configured 31
3.7 How Exim delivers messages 33
3.8 Processing an address 35
3.9 A simple example in detail 37
3.10 Complications while routing 44
3.11 Complications during delivery 45
3.12 Complications after delivery 46
3.13 Use of transports by routers 47
Chapter 4. Exim operations overview 49
4.1 How Exim identifies messages 49
4.2 Watching Exim at work 50
4.3 The runtime configuration file 51
4.4 Namedlists 59
4.5 The default qualification domain 60
4.6 Handling frozen bounce messages 60
vi Contents
4.7 Reducing activity at high load 61
4.8 Limiting message sizes 63
4.9 Controlling IPv6 support 64
4.10 Parallel remote delivery 64
4.11 Controlling the number of delivery processes 65
4.12 Large message queues 65
4.13 Largeinstallations 66
Chapter 5. Extending the delivery configuration 71
5.1 Multiple local domains 71
5.2 Virtual domains 74
5.3 Mailinglists 78
5.4 Using an external local delivery agent 85
5.5 Multiple user addresses 86
5.6 Mixed local/remote domains 88
5.7 Delivering to UUCP 90
5.8 Ignoring the local part in local deliveries 90
5.9 Handling case-sensitive local parts 92
5.10 Scanning accepted messages for viruses 93
5.11 Modifying message bodies 98
Chapter 6. Generic options that apply to all routers 100
6.1 Conditional running of routers 101
6.2 Changing a router 's successful outcome 107
6.3 Adding data for subsequent use 110
6.4 Messages for unrouteable addresses 116
6.5 Handling DNS timeouts 116
6.6 Domains that route to the local host 117
6.7 Retry control after routing errors 120
6.8 Debuggingrouters 120
Chapter 7. The routers 122
7.1 The accept router 122
7.2 The dnslookup router 123
7.3 The ipliteral router 127
7.4 The manualroute router 127
7.5 The queryprogram router 134
7.6 The redirect router 137
Chapter 8. Generic options that apply to all transports 151
8.1 Environment for running transports 151
8.2 Debuggingtransports 153
Contents vii
8.3 Transporting only part of a message 154
8.4 Controlling message size 154
8.5 Adding and removing header lines 154
8.6 Rewriting addresses in header lines 157
8.7 Use of affixes in RCPT commands 157
8.8 Changing the return path 158
8.9 Transport filters 160
8.10 Shadowtransports 163
8.11 Retry control after delivery errors 164
Chapter 9. The transports 165
9.1 The smtp transport 165
9.2 Address batching in the appendfile, lmtp, and pipe transports 174
9.3 Options common to the appendfile and pipe transports 176
9.4 The appendfile transport 180
9.5 The pipe transport 196
9.6 The lmtp transport 203
9.7 The autoreply transport 204
Chapter 10. Message filtering 208
10.1 Examples of Exim filter commands 209
10.2 Filtering and external delivery agents 212
10.3 Setting up a user filter 212
10.4 Setting up a system filter 214
10.5 Examples of system filters 215
10.6 Testing filter files 216
10.7 Format of Exim filters 218
10.8 Significantactions 220
10.9 Filtercommands 221
10.10 The add command 221
10.11 Deliverycommands 222
10.12 Mailcommands 225
10.13 Loggingcommands 228
10.14 The testprint command 229
10.15 The finish command 229
10.16 Obeying filter commands conditionally 229
10.17 Additional features for system filters 235
Chapter 11. Exim processes 238
11.1 Messagefiles 239
11.2 Locking message files 242
11.3 Hintsfiles 242
viii Contents
11.4 Logfiles 244
11.5 User and group IDs for Exim processes 244
11.6 Processrelationships 245
11.7 The daemon process 246
11.8 Receptionprocesses 250
11.9 Queue runner processes 251
11.10 Deliveryprocesses 253
11.11 Summary of process types 255
Chapter 12. Delivery errors and retrying 257
12.1 Retrying after errors 257
12.2 Remote delivery errors 258
12.3 Local delivery errors 261
12.4 Routingerrors 261
12.5 Retryrules 262
12.6 Computing retry times 266
12.7 Using retry times 267
12.8 Retry rule examples 268
12.9 Timeout of retry data 269
12.10 Long-termfailures 269
12.11 Ultimate address timeout 271
12.12 Intermittently connected hosts 271
Chapter 13. Encryption, authentication, and other SMTP processing 276
13.1 Encrypted SMTP connections 276
13.2 SMTPauthentication 281
13.3 SMTP over TCP/IP 295
13.4 LocalSMTP 298
13.5 BatchedSMTP 299
Chapter 14. Message reception 300
14.1 Messagesources 300
14.2 Message size control 301
14.3 Messages from local processes 302
14.4 Unqualified addresses from remote hosts 305
14.5 Checking a remote host 306
14.6 Limiting the rate of message arrival 308
14.7 Relaycontrol 309
Chapter 15. Access control lists 312
15.1 The default ACL configuration 312
15.2 Specifying when ACLs are used 316
Contents ix
15.3 Use of the ACL selection options 319
15.4 ACL return codes 319
15.5 Variables set in SMTP ACLs 320
15.6 Format of an ACL 321
15.7 ACLverbs 321
15.8 ACLvariables 322
15.9 Condition and modifier processing 323
15.10 The ACL modifiers 324
15.11 Arguments for the control modifier 329
15.12 The ACL conditions 332
Chapter 16. Address verification 346
16.1 Basic sender and recipient verification 346
16.2 Verification callouts 346
16.3 Suppressing details of sender verification 350
16.4 Redirection while verifying 351
16.5 Testing address verification 352
16.6 Bounce address tag validation (BATV) 352
Chapter 17. Scanning incoming messages 357
17.1 Scanning for viruses 357
17.2 Scanning with SpamAssassin 359
17.3 Scanning MIME parts 362
17.4 Scanning with regular expressions 366
17.5 The local_scan() function 367
Chapter 18. Address and header processing 368
18.1 Submissionmode 368
18.2 Processing header lines 369
18.3 Rewritingaddresses 374
Chapter 19. File and database lookups 389
19.1 Single-keylookups 390
19.2 Default values in single-key lookups 396
19.3 Partial matching in single-key lookups 396
19.4 Query-stylelookups 398
19.5 Temporary errors in lookups 406
19.6 Lookupcaching 406
Chapter 20. String expansion 407
20.1 Escaping literal substrings 407
x Contents
20.2 Variable substitution 409
20.3 Headerinsertion 409
20.4 Operations on substrings 410
20.5 Charactertranslation 419
20.6 Text substitution 419
20.7 Conditionalexpansion 419
20.8 Lookups in expansion strings 429
20.9 Inserting whole files 432
20.10 Extracting fields from substrings 432
20.11 Calling external code 435
20.12 Locking out expansion items in Exim filters 438
20.13 Testing string expansions 438
Chapter 21. Domain, host, and address lists 440
21.1 Negative items in lists 440
21.2 Putting list items in files 442
21.3 Lookup items in lists 442
21.4 Namedlists 443
21.5 Domainlists 444
21.6 Hostlists 447
21.7 Addresslists 452
Chapter 22. Miscellany 456
22.1 Securityissues 456
22.2 Using Exim as a non-queueing client 461
22.3 Use of RFC 1413 identification 462
22.4 Privilegedusers 464
22.5 RFCconformance 466
22.6 Timestamps 471
22.7 Checking spool space 472
22.8 Control of DNS lookups 473
22.9 Bounce message handling 474
22.10 SMTP banner strings 479
22.11 Other controllable features 479
Chapter 23. Command-line interface to Exim 480
23.1 Input mode control 481
23.2 Additional message data 484
23.3 Immediate delivery control 486
23.4 Errorreporting 487
23.5 Queue runner processes 488
23.6 Configurationoverrides 491
Contents xi
23.7 Watching Exim's queue 492
23.8 Messagecontrol 493
23.9 Testing options 495
23.10 Options for debugging 500
23.11 Terminating the options 502
23.12 Embedded Perl options 502
23.13 Compatibility with Sendmail 502
23.14 Calling Exim by different names 503
Chapter 24. Administering Exim 505
24.1 Logfiles 505
24.2 Log destination control 506
24.3 Reducing or increasing what is logged 510
24.4 Unprintable characters in log lines 516
24.5 Format of main log entries 517
24.6 Extracting information from log files 523
24.7 Watching what Exim is doing 525
24.8 The Exim monitor 528
24.9 Checking relay access 535
24.10 Maintaining alias and other files 536
24.11 Hints database maintenance 537
24.12 Mailboxmaintenance 539
Chapter 25. Building and installing Exim 541
25.1 Prerequisites 541
25.2 Fetching and unpacking the source 542
25.3 Configuration for building 543
25.4 The building process 550
25.5 InstallingExim 551
25.6 Testing before turning Exim on 552
25.7 Turning Exim on 553
25.8 Installing documentation in info format 554
25.9 Upgrading to a new release 555
Appendix. Summary of string expansion 556
A.1 Expansionitems 556
A.2 Expansionconditions 562
A.3 Expansionvariables 566
Index 583
|