HaraldLangner
HL1234
Hallo,
ich habe in dem Buch "Building a Server with FreeBSD 7" folgende Anleitung für SpamAssassin gefunden, die ich gerade durchgehe, aber ich habe ein Problem damit.
Ich gebe hier erst mal die komplette Konfigurationsanleitung - vieleicht kann es ja auch ein Anderer gebrauchen.
Ab Punkt (6) "Configure Postfix to pipe new email messages through the script..." habe ich ein Problem.
Ich habe nämlich nicht postfix sondern Ich nutze sendmail. Also einfache Frage:
Wie mache ich das ab Punkt 6 (siehe oben) mit sendmail? Mit FUTURE(???) in der .mc - Datei vielleicht?
Für Eure Tipps, oder Links wo es steht wie es geht
vielen Dank! - Harald
ich habe in dem Buch "Building a Server with FreeBSD 7" folgende Anleitung für SpamAssassin gefunden, die ich gerade durchgehe, aber ich habe ein Problem damit.
Ich gebe hier erst mal die komplette Konfigurationsanleitung - vieleicht kann es ja auch ein Anderer gebrauchen.
Code:
28.6. CONFIGURE
Once the installation process completes, it is time to configure SpamAssassin for
use on your system.
1) Set up two community-based email fingerprinting tests, Vipul's Razor and DCC.
These spam identification systems vary slightly, but both rely on community input
to keep their databases current as spam evolves. Vipul's Razor and DCC employ
a web-of-trust scheme to give more weight to clients that accurately report spam.
To set up Vipul's Razor reporting capabilities, create the default configuration
file and directory structure and register an identity with the
Razor Nomination Servers as follows
(substitute your domain name for example.com):
# razor-admin -home=/var/spool/spamd/.razor -create
# razor-admin -home=/var/spool/spamd/.razor\
? -register -user=postmaster@example.com
# chown -R spamd /var/spool/spamd/.razor
2) Create SpamAssassin's primary configuration file, local.cf:
# cd /usr/local/etc/mail/spamassassin
# ee local.cf
3) Add the following lines
(replace the italicized items with values that match your network):
trusted_networks 192.168.1. 209.85.146.176/29 204.13.250.97
internal_networks 192.168.1.11 204.13.250.97
bayes_file_mode 0770
dns_available yes
razor_config /var/spool/spamd/.razor/razor-agent.conf
add_header all DCC _DCCB_ _DCCR_
add_header ham SCL 1
add_header spam SCL 9
[I]trusted_networks[/I] specifies an IP or range of IPs for systems that don't
relay spam. In other words, you are confident that these computers aren't
compromised and the people using them aren't spammers.
In the example above you are vouching for your internal network of
192.168.1.xxx, 209.85.146.176-182 (Gmail's outbound mail servers),
and 204.13.250.97 (this could be the backup mail server/exchanger
for your domain). These IPs will be exempt from DNS blacklist checks.
[I]internal_networks [/I]specifies an IP or range of IPs for systems that handle
mail for your domain. In general, you should specify your domain's
mail servers/exchangers here. In the example above we are saying
that 192.168.1.11 and 204.13.250.97 handle mail delivery for our domain.
All values of internal_networks must also be present
in the trusted_networks statement.
4) Save, exit, and test for configuration file syntax errors:
# spamassassin --lint
If your configuration file parsed successfully, no message will be displayed.
--------------------------------------------------------------------------------
Note: For further information on the local.cf file, enter:
--------------------------------------------------------------------------------
# perldoc Mail::SpamAssassin::Conf
5) Create a short script to be called by Postfix when new email arrives.
This script will send the email to SpamAssassin for analysis
and then redirect the result back into the mail system for delivery.
Create the script:
# cd /usr/local/bin
# touch spamd.sh
# chmod 555 spamd.sh
# ee spamd.sh
and add these lines:
#! /bin/sh
/usr/local/bin/spamc | /usr/sbin/sendmail -i "$@"
6) Configure Postfix to pipe new email messages through the script you just
created. First, open the Postfix configuration file, master.cf:
# ee /usr/local/etc/postfix/master.cf
7) Scroll down and find the smtp declaration (~9).
Create a new line under the smtp declaration and add a content_filter statement.
The smtp declaration should look like this:
smtp inet n - n - - smtpd
-o content_filter=spamd:
--------------------------------------------------------------------------------
Note: Be sure to leave at least one space at the beginning of the second line
as shown or Postfix will not parse the file correctly.
--------------------------------------------------------------------------------
8) Add a spamd declaration to tell Postfix to call on the spamd.sh script so
SpamAssassin can process the message. Scroll to the bottom of
master.cf and add these two lines:
spamd unix - n n - - pipe
flags=Rq user=spamd argv=/usr/local/bin/spamd.sh
-f ${sender} -- ${recipient}
--------------------------------------------------------------------------------
Note: Again, be sure to leave at least one space at the beginning of the second
and third lines so Postfix will parse the file correctly.
--------------------------------------------------------------------------------
9) Save, exit, and reload the Postfix configuration files:
# postfix reload
Ab Punkt (6) "Configure Postfix to pipe new email messages through the script..." habe ich ein Problem.
Ich habe nämlich nicht postfix sondern Ich nutze sendmail. Also einfache Frage:
Wie mache ich das ab Punkt 6 (siehe oben) mit sendmail? Mit FUTURE(???) in der .mc - Datei vielleicht?
Für Eure Tipps, oder Links wo es steht wie es geht
vielen Dank! - Harald
Zuletzt bearbeitet: