|
![]() |
EinführungDieses Crash Tutorial zeigt Dir wie man Spamassassin in Sendmail integriert unter OpenBSD. Getestet wurde dieses Tutorial auf OpenBSD 3.6
Falls Du fragen oder anregungen hast kannst Du mir jederzeit ein Mail schreiben (tutorial@thetube.ch).
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/3.6/packages/i386/p5-Mail-SpamAssassin-2.64.tgz
useradd -s /usr/bin/false -b /nonexistent -u 506 -g =uid _spamdaemonSpamd Daemon starten :
/usr/local/bin/spamd -u _spamdaemon -d
divert(-1) # # Copyright (c) 1998 Sendmail, Inc. All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # By using this file, you agree to the terms and conditions set # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # # # # This is the prototype file for a configuration that supports nothing # but basic SMTP connections via TCP. # divert(0)dnl VERSIONID(`@(#)openbsd-proto.mc $Revision: 1.6 $') OSTYPE(openbsd) INPUT_MAIL_FILTER(`milter-spamd', `S=unix:/var/spool/milter-spamd/sock, T=S:30s;R:2m') FEATURE(nouucp, `reject') FEATURE(`no_default_msa') FEATURE(`virtusertable', `hash /etc/mail/virtusertable') FEATURE(use_cw_file) VIRTUSER_DOMAIN(`thetube.ch') MAILER(local) MAILER(smtp) DAEMON_OPTIONS(`Family=inet, address=0.0.0.0, Name=MTA')dnl DAEMON_OPTIONS(`Family=inet6, address=::, Name=MTA6, M=O')dnl DAEMON_OPTIONS(`Family=inet, address=0.0.0.0, Port=587, Name=MSA, M=E') DAEMON_OPTIONS(`Family=inet6, address=::, Port=587, Name=MSA6, M=O, M=E') CLIENT_OPTIONS(`Family=inet6, Address=::')dnl CLIENT_OPTIONS(`Family=inet, Address=0.0.0.0')dnl dnl dnl Some broken nameservers will return SERVFAIL (a temporary failure) dnl on T_AAAA (IPv6) lookups. define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl dnl dnl Enforce valid Message-Id to help stop spammers dnl LOCAL_RULESETS HMessage-Id: $>CheckMessageId SCheckMessageId R< $+ @ $+ > $@ OK R$* $#error $: 553 Header ErrorNun muss das mc file kompiliert werden und ins /etc/mail verzeichnis kopiert werden :
cd /usr/share/sendmail/cf m4 ../m4/cf.m4 mymailer.mc > mymailer.cf cp mymailer.cf /etc/mail/mymailer.cfSendmail muss nur gestoppt und mit dem neuen cf gestartet werden :
kill -15 `head -1 /var/run/sendmail.pid` sendmail -L sm-mta -C /etc/mail/mymailer.cf -bd -q30m