‚ < ‚ Day Day Up ‚ > ‚ |
If you want to set up a spam-checking gateway for all recipients, local or not, you need a way to perform spam-checking as mail is received, before final delivery. Exim provides three different ways to do this: via routers, via exiscan, and via defining a local_scan( ) function. In a router-based configuration, SpamAssassin is invoked after Exim has received a message during the process of routing each delivery address in the message. If the message is destined for a local user, SpamAssassin can use per-user preference files; if the message will be relayed to a remote user , SpamAssassin still checks the message using sitewide settings. In this configuration, SpamAssassin may be invoked several times for each message received (once for each message recipient). Figure 8-1 illustrates this configuration. Figure 8-1. A router-based configuration for spam-checking in EximIn an exiscan configuration, Exim invokes SpamAssassin during the SMTP transaction by means of a new ACL. Messages that SpamAssassin considers spam can be rejected before the SMTP transaction is complete, or accepted and tagged. However, you cannot use per-user preferences in this configuration without negatively impacting performance. Figure 8-2 illustrates this approach. Figure 8-2. An exiscan-based configuration for spam-checking in EximIn a configuration using local_scan( ) , Exim invokes SpamAssassin during the SMTP transaction when it calls the local_scan( ) function for the incoming message. The message can be accepted or rejected in the SMTP transaction; if local_scan( ) accepts the message, tagging headers can be added. Other interesting effects, including teergrubing ‚ responding very slowly during the SMTP transaction when spam is detected in order to tie up the spammer's MTA ‚ are possible with this approach, but it is difficult to use per-user preferences in this configuration. Figure 8-3 illustrates this approach. Figure 8-3. A local_scan( )-based configuration for spam-checking in EximEach of these methods is described in detail in the following sections. |
‚ < ‚ Day Day Up ‚ > ‚ |