=for comment $Id: asmtpd.pod,v 1.15 2005/11/24 21:47:28 dm Exp $ =head1 NAME asmtpd - Avenger SMTP Daemon =head1 SYNOPSIS asmtpd [-d] [--verbose] [-f I] asmtpd [--spf] [-f I] asmtpd [--rbl] [-f I] asmtpd [--avenge] [-f I] I [I [I]] asmtpd [--synfp] [I [I [I ...]]] asmtpd [--netpath] I [I] =head1 DESCRIPTION I is the central server daemon for Mail Avanger. Mail Avenger is a highly-configurable MTA-independent SMTP (Simple Mail Transport Protocol) server designed to let you filter and fight SPAM I accepting incoming mail from a client machine. Filtering spam before accepting a message from a remote machine offers a number of benefits. First, while mail is in the process of being sent over the network, more information is available about the client machine, allowing the possibility of more accurate decisions about spam. (For example, machines infected with viruses may be able to be detected by probing.) Second, filtering during mail transfer allows more options for what to do with potential spam. For instance, one can defer the mail--essentially asking the client to send it again later--which legitimate mail clients will do automatically, but "spam 'bots" typically won't. Moreover, it is much safer to reject spam before accepting a message. With typical after-delivery spam checkers, the only options are to discard spam silently (risking false positives that completely disappear), or to notify the sender, but if the sender is forged, this causes more unwanted mail. By rejecting mail during an SMTP transaction, this ensures legitimate mail gets bounced to the sender, while most spam will simply disappear. Finally, filtering during an SMTP transaction saves resources, since spam messages need never to be spooled in the mail queue. There are many ways of fighting and detecting spam. Though Mail Avenger has a few basic mechanisms built-in, the philosophy of the system is to let system administrators and individual users plug in their own filtering criteria. The intent is for Mail Avenger to do the hard part--talk the SMTP network protocol, handle asynchronous DNS resolution, SPF rule checking, probing of remote SMTP servers for legitimacy, etc.--while users can set policy through configuration files with simple shell commands. The basic approach is for users to create scripts in a directory called F<$HOME/.avenger> that specify policies for what mail to accept and what to reject or defer. System-wide fallback policies can also be specified by files in F<@etcdir@/>. The program that executes these scripts is called I, and is described more fully in its own manual page. asmtpd can be configured to map different email addresses and domains to different local users, in addition to a large number of other configurable features. These are described more fully in the L manual page. asmtpd also adds a new header field to messages, C, containing information that may be of use to spam filters. C contains a list of semi-colon-separated tokens, which if present mean the following: =over =item BI Specifies the version of Mail Avenger that received the message. =item BI Specifies that asmtpd was running on I when it received the message. =item BI =item BI These specify that the client end of the TCP connection from which the mail came used IP address I and port I. =item BI Specifies that a reverse lookup on the client's IP address (to determine the client's hostname) resulted in I. =item BI Specifies that attempts to send bounces to the bounce address of the sender result in SMTP error I. (This is the same value as the B environment variable described in the L manual page.) =item BI Contains a description of the initial TCP SYN packet used by the client to initiate the TCP connection over which the mail was sent. See the description of B in the L manual page for an explanation of the format. =item B If present, means that the client attempted to pipeline SMTP commands before receiving the C<250 PIPELINING> response to the SMTP C or C command. This field has the same meaning as the B environment variable in L. =item B If present, means the client issued the invalid SMTP command B. See B in L. =item BI This is the number of network hops from the server to the client that sent this mail (if Mail Avenger can figure this out). See B in L. =item BI Set to a space-separated list of as many intermediary network hops as Mail Avenger can efficiently discover on the way from the server to the client that send the mail. See B in L. =item BI