Book Image

Linux Email: Set up and Run a Small Office Email Server

By : Alistair McDonald, Carl Taylor, David Rusenko, Magnus Back, Patrick Ben Koetter, Ralf Hildebrandt
Book Image

Linux Email: Set up and Run a Small Office Email Server

By: Alistair McDonald, Carl Taylor, David Rusenko, Magnus Back, Patrick Ben Koetter, Ralf Hildebrandt

Overview of this book

<p>Many businesses want to run their email servers on Linux, but getting started can be complicated. The attractiveness of a free-to-use and robust email service running on Linux can be undermined by the apparent technical challenges involved.&nbsp; Some of the complexity arises from the fact that an email server consists of several components that must be installed and configured separately, then integrated together. Unlike other approaches that deal with one component at a time, this book gives you a basic knowledge across all the server components, leaving you with a complete working email server for your small business network.<br /> <br /> Based entirely on free, Open Source software, you will see how to protect your server from spam and viruses, offer web access for remote access, and secure your installation with regular backups.</p>
Table of Contents (14 chapters)
Copyright
Credits
About the Authors
Introduction

Procmail Macros


As we briefly covered in the previous chapter, Procmail has a number of useful 'pre-prepared' regular expressions or Macros that provide a range of matches that are commonly used in Procmail recipes.

^TO and ^TO_

^TO was the original Procmail Macro for handling to addresses. This has been superseded by the newer ^TO_ macro that was introduced in Procmail Version 3.11pre4.

This catchall includes most headers that can include your address in them, such as To:, Apparently-To:, Cc:, Resent-To:, and so on.

In most cases you should use the ^TO_ option as it has much better coverage.

Here is the Regular Expression string from the Procmail source code:

"(^((Original-)?(Resent-)?(To|Cc|Bcc)|\
(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)"

^FROM_MAILER

This macro caters for recognizing a wide range of mail generation programs...