WWW.GENTOO-SRBIJA.ORG
The World Will Never Know Četvrtak, 08 Januar/2009  
 » SADRŽAJ
 › Uvod
 › Performanse
 › Mirori
 › Linkovi
 › Download
 › Mailing lista
 › Kontakt
 » PROFIL
» šifra
zapamti me
  Registracija
 » PRETRAGA
 » NOVI PAKETI
mail-filter/MailScanner-4.70.7.1: Free Anti-Virus and Anti-Spam Filter
dev-util/tmake-2.12: A Cross platform Makefile tool
dev-perl/Filesys-Df-0.92: Disk free based on Filesys::Statvfs
app-shells/bash-completion-20060301: Programmable Completion for bash
app-portage/gentoolkit-0.2.4.2-r1: Collection of administration scripts for Gentoo
app-crypt/pgpdump-0.26: A PGP packet visualizer
app-admin/bcfg2-0.9.6: Bcfg2 is a configuration management tool.
net-misc/dhcpcd-4.0.7: A fully featured, yet light weight RFC2131 compliant DHCP client
net-misc/dhcpcd-4.99.6: A fully featured, yet light weight RFC2131 compliant DHCP client
net-misc/dhcpcd-4.0.6: A fully featured, yet light weight RFC2131 compliant DHCP client
 » WEBMAIL
 » GENTOO-PORTAGE
And we're back
Forum index ›› Mreže i bezbednost › postfix + dspam problem  
  AUTOR   PORUKA

Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
 Oglašeno: 04 Nov 06  21:33   Izmenio: meka

Treba da namestim mali server (<50 korisnika) i mislio sam da to odradim tako što ću uraditi sledeće sa postfix-om i dspamom.

/etc/postfix/main.cf:
 
queue_directory = /var/spool/postfix 
command_directory = /usr/sbin 
daemon_directory = /usr/libexec/postfix 
mail_owner = postfix 
myhostname = mail 
mydomain = ns-linux.org 
myorigin = $myhostname.$mydomain 
inet_interfaces = all 
mydestination = $myhostname, localhost.$mydomain, sparrow.$mydomain, l 
ocalhost, $myorigin 
mynetworks_style = subnet 
mynetworks = 127.0.0.0/8 
 
home_mailbox = .maildir/ 
 
debug_peer_level = 2 
debugger_command = 
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin 
xxgdb $daemon_directory/$process_name $process_id & sleep 5 
 
sendmail_path = /usr/sbin/sendmail.postfix 
newaliases_path = /usr/bin/newaliases.postfix 
mailq_path = /usr/bin/mailq.postfix 
setgid_group = postdrop 
html_directory = /usr/share/doc/postfix/html 
manpage_directory = /usr/share/man 
sample_directory = /etc/postfix 
readme_directory = /usr/share/doc/postfix/readme 
 
alias_maps = hash:/etc/postfix/aliases 
 
smtp_tls_loglevel = 1 
#smtp_tls_per_site = hash:/etc/postfix/tls_per_site 
smtp_tls_CAfile = /etc/postfix/certs/cacert.pem 
smtp_tls_cert_file = /etc/postfix/certs/FOO-cert.pem 
smtp_tls_key_file = /etc/postfix/certs/FOO-key.pem 
#smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cac 
he 
smtp_use_tls = yes 
#smtp_sasl_auth_enable = yes 
#smtp_sasl_path = /var/spool/postfix/private/auth 
#smtp_sasl_password_maps = hash:/etc/postfix/saslpass 
#smtp_sasl_security_options = noanonymous 
#smtp_generic_maps = hash:/etc/postfix/generic 
 
smtpd_tls_CAfile = /etc/postfix/certs/cacert.pem 
smtpd_tls_cert_file = /etc/postfix/certs/FOO-cert.pem 
smtpd_tls_key_file = /etc/postfix/certs/FOO-key.pem 
smtpd_tls_received_header = yes 
smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_ca 
che 
smtpd_use_tls = yes 
smtpd_tls_security_level = may 
smtpd_sasl_auth_enable = yes 
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenti 
cated, permit_auth_destination, reject 
smtpd_client_restrictions = permit_mynetworks, permit_auth_destination 
, permit_sasl_authenticated, reject 
smtpd_tls_auth_only = yes 
smtpd_sasl_type = dovecot 
smtpd_sasl_path = private/auth 
 
disable_dns_lookups = no 
unknown_local_recipient_reject_code = 550 
 
tls_random_exchange_name = /etc/postfix/prng_exch 
tls_random_source = dev:/dev/urandom 
tls_random_reseed_period = 3600s 
tls_random_upd_period = 60s 
tls_daemon_random_source = dev:/dev/urandom 


/etc/postfix/master.cf:
 
smtp      inet  n       -       n       -       -       smtpd 
-o content_filter=dspam: 
 
pickup    fifo  n       -       n       60      1       pickup 
cleanup   unix  n       -       n       -       0       cleanup 
qmgr      fifo  n       -       n       300     1       qmgr 
tlsmgr    unix  -       -       n       1000?   1       tlsmgr 
rewrite   unix  -       -       n       -       -       trivial-rewrit 
e 
bounce    unix  -       -       n       -       0       bounce 
defer     unix  -       -       n       -       0       bounce 
trace     unix  -       -       n       -       0       bounce 
verify    unix  -       -       n       -       1       verify 
flush     unix  n       -       n       1000?   0       flush 
proxymap  unix  -       -       n       -       -       proxymap 
smtp      unix  -       -       n       -       -       smtp 
relay     unix  -       -       n       -       -       smtp 
-o fallback_relay= 
showq     unix  n       -       n       -       -       showq 
error     unix  -       -       n       -       -       error 
discard   unix  -       -       n       -       -       discard 
local     unix  -       n       n       -       -       local 
virtual   unix  -       n       n       -       -       virtual 
lmtp      unix  -       -       n       -       -       lmtp 
anvil     unix  -       -       n       -       1       anvil 
scache    unix  -       -       n       -       1       scache 
maildrop  unix  -       n       n       -       -       pipe 
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} 
    old-cyrus unix  -       n       n       -       -       pipe 
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} 
    cyrus     unix  -       n       n       -       -       pipe 
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${u 
ser} 
uucp      unix  -       n       n       -       -       pipe 
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail 
($recipient) 
ifmail    unix  -       n       n       -       -       pipe 
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipie 
nt) 
bsmtp     unix  -       n       n       -       -       pipe 
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop 
$recipient 
 
 
dspam   unix    -       n       n       -       10       pipe 
flags=Ru user=dspam argv=/usr/local/bin/dspam --deliver=innocent 
--user ${recipient} -f $sender 
    





/etc/mail/dspam/dspam.conf:
 
Home /var/spool/dspam 
 
StorageDriver /usr/lib/libhash_drv.so 
 
TrustedDeliveryAgent "/usr/bin/procmail -d %u" 
 
DeliveryHost        127.0.0.1 
DeliveryPort        10025 
DeliveryIdent       localhost 
DeliveryProto       smtp 
 
OnFail error 
 
Trust root 
Trust mail 
Trust mailnull 
Trust smmsp 
Trust dspam 
Trust daemon 
 
TrainingMode teft 
 
TestConditionalTraining on 
 
Feature chained 
Feature whitelist 
 
Algorithm graham burton 
 
PValue graham 
 
Preference "spamAction=quarantine" 
Preference "showFactors=on" 
 
AllowOverride trainingMode 
AllowOverride spamAction spamSubject 
AllowOverride statisticalSedation 
AllowOverride enableBNR 
AllowOverride enableWhitelist 
AllowOverride signatureLocation 
AllowOverride showFactors 
AllowOverride optIn optOut 
AllowOverride whitelistThreshold 
 
HashRecMax              98317 
 
HashAutoExtend          on 
 
HashMaxExtents          0 
 
HashExtentSize          49157 
 
HashMaxSeek             100 
 
 
HashConnectionCache     10 
 
Notifications   off 
 
LocalMX 127.0.0.1 
 
SystemLog on 
UserLog   on 
 
Opt out 
 
#ClamAVPort      3310 
#ClamAVHost      127.0.0.1 
#ClamAVResponse accept 
 
ProcessorBias on 
[/code[ 
 
Ono što mi log kaže je: 
[code] 
Nov  4 21:34:59 sparrow postfix/smtpd[10156]: connect from ug-out-1314 
.google.com[66.249.92.172] 
Nov  4 21:34:59 sparrow postfix/smtpd[10156]: 9E2E958C: client=ug-out- 
1314.google.com[66.249.92.172] 
Nov  4 21:34:59 sparrow postfix/cleanup[10161]: 9E2E958C: message-id=< 
20061104213313.6142931a@hal9000.aurora.local> 
Nov  4 21:34:59 sparrow postfix/qmgr[10153]: 9E2E958C: from=<mekani@gm 
ail.com>, size=1680, nrcpt=1 (queue active) 
Nov  4 21:34:59 sparrow procmail[10166]: Unknown user "-f" 
Nov  4 21:34:59 sparrow procmail[10164]: Unknown user "mekani" 
Nov  4 21:34:59 sparrow dspam[10163]: Delivery agent returned exit cod 
e 67: /usr/bin/procmail -d meka@mail.ns-linux.org -f mekani@gmail.com 
Nov  4 21:34:59 sparrow postfix/pipe[10162]: 9E2E958C: to=<meka@mail.n 
s-linux.org>, relay=dspam, delay=0.16, delays=0.07/0.01/0/0.08, dsn=5. 
3.0, status=bounced (Command died with status 255: "/usr/local/bin/dsp 
am". Command output: procmail: Unknown user "-f" procmail: Unknown use 
r "mekani" 10163: [11/04/2006 21:34:59] Delivery agent returned exit c 
ode 67: /usr/bin/procmail -d meka@mail.ns-linux.org -f mekani@gmail.co 
m  ) 
Nov  4 21:34:59 sparrow postfix/cleanup[10161]: BEBC67D0: message-id=< 
20061104203459.BEBC67D0@mail> 
Nov  4 21:34:59 sparrow postfix/qmgr[10153]: BEBC67D0: from=<>, size=3 
725, nrcpt=1 (queue active) 
Nov  4 21:34:59 sparrow postfix/bounce[10167]: 9E2E958C: sender non-de 
livery notification: BEBC67D0 
Nov  4 21:34:59 sparrow postfix/qmgr[10153]: 9E2E958C: removed 
Nov  4 21:35:00 sparrow postfix/smtp[10168]: BEBC67D0: to=<mekani@gmai 
l.com>, relay=gmail-smtp-in.l.google.com[64.233.183.114]:25, delay=0.3 
6, delays=0.01/0.02/0.08/0.25, dsn=2.0.0, status=sent (250 2.0.0 OK 11 
62672391 k9si6660750nfc) 
Nov  4 21:35:00 sparrow postfix/qmgr[10153]: BEBC67D0: removed 




Ne kontam odakle mu sad to -f kad pokreće procmail.


Site Admin
Učlanjen: 31 Mar 05
Lokacija: Zürich
Poruke: 226
profil¬ poruka¬
upRE: postfix + dspam problem  Oglašeno: 07 Nov 06  22:38  

dspam   unix    -       n       n       -       10       pipe 
flags=Ru user=dspam argv=/usr/local/bin/dspam --deliver=innocent 
--user ${recipient} -f $sender


Vidis taj -f prije $sender?


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 08 Nov 06  08:51  

Za početak, pa gde si ti steveb? Nema te sto godina. Drugo, hvala, oćoravio sam malo od monitora, izgleda. Hvala puno!


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 08 Nov 06  13:54  

Uh. Nove radosti me dočekaše kad sam sklonio to -f. Iz nekog razloga, dspam samo usisa emajl i ništa ne kaže, nit mi emajl stigne. Kako da tražim log fajlove, uopšte?


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 09 Nov 06  08:29  

Daklem, problem sa log fajlovima je bio što nije postojao /var/spool/dspam direktorijum. Kad ga napravih i postavih dozvole kako treba, počeo je da loguje, ali pomalo čudno. Prvo, dodao sam ovo u /etc/postfix/master.cf (gde li sam ja gledao kad sam ovo u početku zaboravljao?):
 
localhost:10025 inet  n -       n       -       -        smtpd 
-o content_filter= 
-o receive_override_options=no_unknown_recipient_checks,no_header_body 
_checks 
-o smtpd_helo_restrictions= 
-o smtpd_client_restrictions= 
-o smtpd_sender_restrictions= 
-o smtpd_recipient_restrictions=permit_mynetworks,reject 
-o mynetworks=127.0.0.0/8 
-o smtpd_authorized_xforward_hosts=127.0.0.0/8 

Posle sam zakomentarisao TrustedDeliveryAgent "/usr/bin/procmail -d %u" u dspam.conf i nekako sam očekivao da postfix 2 puta primi isti emajl. Jednom od klijenta koji šalje, drugi put od dspam-a. Gde grešim?


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 09 Nov 06  09:18  

Pa ... evo šta kaže /var/log/dspam/system.log:
 
1163059095      I       meka@xxxxxx    4552df97325124401120435 dspam t 
est      0.003707        meka@yyyyyyyy     Delivere 
d       <Pine.LNX.4.64.0611090901100.24456@yyyyyyyyyyy> 


Naravno, xxxxx i yyyyy su izmenjeni, čisto da ne stoji ovde moj emajl. Daklem, xxxxx je domen sa koga šaljem, a yyyyy domen na koji šaljem.


Site Admin
Učlanjen: 31 Mar 05
Lokacija: Zürich
Poruke: 226
profil¬ poruka¬
upRE: postfix + dspam problem  Oglašeno: 19 Nov 06  10:46  

Evo me. Tu sam. Preko nedelje radim u Fräsunda u Stockholm a preko weekend sam nazad u Zürich.

Moj master.cf:
mail log # cat /etc/postfix/master.cf 
# 
# Postfix master process configuration file.  For details on the forma 
t 
# of the file, see the master(5) manual page (command: "man 5 master") 
. 
# 
# ==================================================================== 
====== 
# service type  private unpriv  chroot  wakeup  maxproc command + args 
#               (yes)   (yes)   (yes)   (never) (100) 
# ==================================================================== 
====== 
 
smtp      inet  n       -       n       -       -       smtpd 
-o content_filter=smtp-amavis:[127.0.0.1]:10024 
-o cleanup_service_name=pre-cleanup 
 
192.168.0.115:125         inet  n       -       n       -       -      
  smtpd 
-o content_filter=smtp-amavis:[127.0.0.1]:10024 
-o cleanup_service_name=pre-cleanup 
#==================================================================== =  
====== 
 
#submission inet n       -       n       -       -       smtpd 
#  -o smtpd_enforce_tls=yes 
#  -o smtpd_sasl_auth_enable=yes 
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject 
#smtps     inet  n       -       n       -       -       smtpd 
#  -o smtpd_tls_wrappermode=yes 
#  -o smtpd_sasl_auth_enable=yes 
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject 
 
ssmtp     inet  n       -       n       -       -       smtpd 
-o content_filter=smtp-amavis:[127.0.0.1]:10024 
-o cleanup_service_name=pre-cleanup 
-o smtpd_tls_wrappermode=yes 
-o smtpd_sasl_auth_enable=yes 
#==================================================================== =  
====== 
 
#submission   inet    n       -       n       -       -       smtpd 
#  -o smtpd_etrn_restrictions=reject 
#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes 
#628      inet  n       -       n       -       -       qmqpd 
pickup    fifo  n       -       n       60      1       pickup 
 
#[VUNET]#============================================================ =  
====== 
#cleanup   unix  n       -       n       -       0       cleanup 
#==================================================================== =  
====== 
 
qmgr      fifo  n       -       n       300     1       qmgr 
#qmgr     fifo  n       -       n       300     1       oqmgr 
tlsmgr    unix  -       -       n       1000?   1       tlsmgr 
rewrite   unix  -       -       n       -       -       trivial-rewrit 
e 
bounce    unix  -       -       n       -       0       bounce 
defer     unix  -       -       n       -       0       bounce 
trace     unix  -       -       n       -       0       bounce 
verify    unix  -       -       n       -       1       verify 
flush     unix  n       -       n       1000?   0       flush 
proxymap  unix  -       -       n       -       -       proxymap 
smtp      unix  -       -       n       -       -       smtp 
# When relaying mail as backup MX, disable fallback_relay to avoid MX  
loops 
relay     unix  -       -       n       -       -       smtp 
-o fallback_relay= 
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 
showq     unix  n       -       n       -       -       showq 
error     unix  -       -       n       -       -       error 
discard   unix  -       -       n       -       -       discard 
 
#[VUNET]#============================================================ =  
====== 
#local     unix  -       n       n       -       -       local 
#==================================================================== =  
====== 
 
virtual   unix  -       n       n       -       -       virtual 
lmtp      unix  -       -       n       -       -       lmtp 
anvil     unix  -       -       n       -       1       anvil 
scache    unix  -       -       n       -       1       scache 
# 
# ==================================================================== 
# Interfaces to non-Postfix software. Be sure to examine the manual 
# pages of the non-Postfix software to find out what options it wants. 
# 
# Many of the following services use the Postfix pipe(8) delivery 
# agent.  See the pipe(8) man page for information about ${recipient} 
    # and other message envelope options. 
    # ================================================================ 
==== 
    # 
    # maildrop. See the Postfix MAILDROP_README file for details. 
    # Also specify in main.cf: maildrop_destination_recipient_limit=1 
    # 
    maildrop  unix  -       n       n       -       -       pipe 
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} 
    # 
    # The Cyrus deliver program has changed incompatibly, multiple tim 
es. 
    # 
    old-cyrus unix  -       n       n       -       -       pipe 
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} 
    # Cyrus 2.1.5 (Amos Gouaux) 
    # Also specify in main.cf: cyrus_destination_recipient_limit=1 
    cyrus     unix  -       n       n       -       -       pipe 
flags=hu user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m ${e 
xtension} ${user} 
    # Cyrus with "virtdomains: yes" 
    # Also specify in main.cf: virtual_transport = virt-cyrus 
    virt-cyrus     unix  -       n       n       -       -       pipe 
flags=hu user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m ${r 
ecipient} ${user} 
    # 
    # See the Postfix UUCP_README file for configuration details. 
    # 
    uucp      unix  -       n       n       -       -       pipe 
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail  
($recipient) 
    # 
    # Other external delivery methods. 
    # 
    ifmail    unix  -       n       n       -       -       pipe 
    flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipie 
nt) 
    bsmtp     unix  -       n       n       -       -       pipe 
    flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop  
$recipient 
     
     
    #[VUNET]#========================================================= 
========== 
    # AV scan filter 
    smtp-amavis unix -      -       n       -       5      lmtp 
    -o lmtp_data_done_timeout=1200 
    -o lmtp_send_xforward_command=yes 
    -o disable_dns_lookups=yes 
    -o max_use=5 
     
    # For injecting mail back into postfix from the filter 
    127.0.0.1:10025 inet n  -       n       -       -       smtpd 
    -o cleanup_service_name=cleanup 
    -o local_recipient_maps= 
    -o relay_recipient_maps= 
    -o receive_override_options=no_unknown_recipient_checks,no_header_ 
body_checks 
    -o smtpd_restriction_classes= 
    -o smtpd_client_restrictions= 
    -o smtpd_helo_restrictions= 
    -o smtpd_sender_restrictions= 
    -o smtpd_recipient_restrictions=permit_mynetworks,reject 
    -o mynetworks=127.0.0.0/8 
    -o mynetworks_style=host 
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8 
    -o strict_rfc821_envelopes=yes 
    -o smtpd_error_sleep_time=0 
    -o smtpd_soft_error_limit=1001 
    -o smtpd_hard_error_limit=1000 
    -o smtp_send_xforward_command=yes 
    -o content_filter=dspam:dummy 
    #    -o content_filter=lmtp:unix:/var/run/dspam/dspam.sock 
     
    # For injecting mail back into postfix from the filter 
    127.0.0.1:10026 inet n  -       n       -       -       smtpd 
    -o local_recipient_maps= 
    -o relay_recipient_maps= 
    -o receive_override_options=no_unknown_recipient_checks,no_header_ 
body_checks 
    -o smtpd_restriction_classes= 
    -o smtpd_client_restrictions= 
    -o smtpd_helo_restrictions= 
    -o smtpd_sender_restrictions= 
    -o smtpd_recipient_restrictions=permit_mynetworks,reject 
    -o mynetworks=127.0.0.0/8 
    -o mynetworks_style=host 
    -o strict_rfc821_envelopes=yes 
    -o smtpd_error_sleep_time=0 
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8 
    -o smtpd_soft_error_limit=1001 
    -o smtpd_hard_error_limit=1000 
    -o content_filter= 
     
    # The first cleanup step. This do the header_checks, body_checks a 
nd mime_header_check 
    pre-cleanup     unix  n  -       n       -        0     cleanup 
    -o virtual_alias_maps= 
    -o canonical_maps= 
    -o sender_canonical_maps= 
    -o recipient_canonical_maps= 
    -o masquerade_domains= 
    -o always_bcc= 
    -o sender_bcc_maps= 
    -o recipient_bcc_maps= 
     
    # The second cleanup step. This is used so that no header_checks,  
body_checks or 
    # mime_header_checks are performed again. Otherwise a loop is crea 
ted when a spam 
    # is found in the checks. 
    cleanup         unix  n  -        n       -        0     cleanup 
    -o mime_header_checks= 
    -o nested_header_checks= 
    -o body_checks= 
    -o header_checks= 
    -o cleanup_service_name=cleanup 
     
    local           unix  -  n        n       -       -       local 
    -o content_filter= 
    -o myhostname=localhost 
    -o local_recipient_maps= 
    -o relay_recipient_maps= 
    -o mynetworks=127.0.0.0/8 
    -o mynetworks_style=host 
    -o smtpd_restriction_classes= 
    -o smtpd_client_restrictions= 
    -o smtpd_helo_restrictions= 
    -o smtpd_sender_restrictions= 
    -o smtpd_recipient_restrictions=permit_mynetworks,reject 
     
    vacation        unix   -      n       n       -       -       pipe 
    flags=DRhu user=vacation:vacation argv=/var/spool/vacation/vacatio 
n_new.pl 
     
    # policyd-weight 
    policyd-weight     unix   -      n       n       -       -       s 
pawn 
    user=polw argv=/usr/bin/perl /etc/postfix/policyd-weight 
     
    # SPF 
    spf-smtpd-policy   unix   -      n       n       -       -       s 
pawn 
    user=nobody argv=/usr/bin/perl /etc/postfix/spf-smtpd-policy.pl 
     
    ## DSPAM 
    # 
     
    #[DSPAM PIPE]#================ 
     
    # Without quarantine 
    #   --deliver=spam,innocent,summary 
    dspam           unix   -      n       n       -        -      pipe 
    flags=Rhq user=dspam:mail argv=/usr/bin/dspam 
    --deliver=innocent 
--user ${recipient} 
-i -f ${sender} -- ${recipient} 
    #[DSPAM PIPE]#================ 
     
    #[DSPAM LMTP]#================ 
    #127.0.0.1:10023 inet n  -       n       -       -       smtpd 
    #    -o receive_override_options=no_unknown_recipient_checks,no_he 
ader_body_checks 
    #    -o content_filter= 
    #    -o local_recipient_maps= 
    #    -o relay_recipient_maps= 
    #    -o mynetworks_style=host 
    #    -o smtpd_restriction_classes= 
    #    -o smtpd_client_restrictions= 
    #    -o smtpd_helo_restrictions= 
    #    -o smtpd_sender_restrictions= 
    #    -o smtpd_recipient_restrictions=permit_mynetworks,reject 
    #    -o mynetworks=127.0.0.0/8 
    #    -o smtpd_authorized_xforward_hosts=127.0.0.0/8 
    #    -o strict_rfc821_envelopes=yes 
    #    -o smtpd_error_sleep_time=0 
    #    -o smtpd_soft_error_limit=1001 
    #    -o smtpd_hard_error_limit=1000 
    #    -o smtp_send_xforward_command=yes 
    # 
    #dspam            unix   -      -       n       -       10      lm 
tp 
    #[DSPAM LMTP]#================ 
     
     
    #dspam           unix   -      n       n       -        -      pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspam 
    #   --mode=teft 
    #   --deliver=spam,innocent,summary 
    #   --feature=ch,no,wh,tb=5 
#   -i -f ${sender} -- %u --user ${recipient} 
     
    dspamdel        unix   -      n       n       -       -       pipe 
    flags=Rhq user=dspam:mail argv=/usr/bin/dspam 
--user ${nexthop} 
    --class=innocent 
    --source=error 
    --deliver=spam,innocent,summary 
    --stdout 
     
    dspamadd        unix   -      n       n       -       -       pipe 
    flags=Rhq user=dspam:mail argv=/usr/bin/dspam 
--user ${nexthop} 
    --class=spam 
    --source=error 
    --deliver=spam,innocent,summary 
    --stdout 
     
    dspam-retrain   unix   -      n       n       -       -       pipe 
    flags=Rhq user=dspam:mail argv=/usr/bin/dspam 
    --class=$nexthop 
    --source=error 
    --deliver=spam,innocent 
    --stdout 
     
     
    ## DSPAM Agent :: delivering spam and innocent 
    # 
    #dspam           unix   -      n       n       -        -      pip 
e 
    #   flags=Rhqu user=dspam:mail argv=/usr/bin/dspamc 
    #   --client 
    #   --mode=teft 
    #   --deliver=spam,innocent 
    #   --feature=ch,no,wh,tb=5 
#   --user ${recipient} 
#   -i -f ${sender} -- ${recipient} 
    # 
    #dspamdel        unix   -      n       n       -       -       pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspamc 
    #   --client 
#   --user ${nexthop} 
    #   --class=innocent 
    #   --source=error 
    #   --deliver=spam,innocent 
    #   --stdout 
    # 
    #dspamadd        unix   -      n       n       -       -       pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspamc 
    #   --client 
#   --user ${nexthop} 
    #   --class=spam 
    #   --source=error 
    #   --deliver=spam,innocent 
    #   --stdout 
    # 
    #dspam-retrain   unix   -      n       n       -       -       pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspamc 
    #   --user globaluser 
    #   --class=$nexthop 
    #   --source=error 
    #   --deliver=spam,innocent 
    #   --stdout 
     
     
    ## DSPAM Agent :: delivering innocent 
    # 
    #dspam           unix   -      n       n       -        -      pip 
e 
    #   flags=Rhqu user=dspam:mail argv=/usr/bin/dspamc 
    #   --client 
    #   --mode=teft 
    #   --deliver=innocent 
    #   --feature=ch,no,wh,tb=5 
#   --user ${recipient} 
#   -i -f ${sender} -- ${recipient} 
    # 
    #dspamdel        unix   -      n       n       -       -       pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspamc 
    #   --client 
#   --user ${nexthop} 
    #   --class=innocent 
    #   --source=error 
    #   --deliver=spam,innocent 
    #   --stdout 
    # 
    #dspamadd        unix   -      n       n       -       -       pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspamc 
    #   --client 
#   --user ${nexthop} 
    #   --class=spam 
    #   --source=error 
    #   --deliver=spam,innocent 
    #   --stdout 
    # 
    #dspam-retrain   unix   -      n       n       -       -       pip 
e 
    #   flags=Rhq user=dspam:mail argv=/usr/bin/dspamc 
    #   --user globaluser 
    #   --class=$nexthop 
    #   --source=error 
    #   --deliver=spam,innocent 
    #   --stdout 
     
    #================================================================= 
==========


Evo moj dspam.conf:
## $Id: dspam.conf.in,v 1.72 2006/05/14 15:40:42 jonz Exp $ 
## dspam.conf -- DSPAM configuration file 
## 
 
# 
# DSPAM Home: Specifies the base directory to be used for DSPAM storag 
e 
# 
Home /var/spool/dspam 
 
# 
# StorageDriver: Specifies the storage driver backend (library) to use 
. 
# You'll only need to set this if you are using dynamic storage driver 
 plugins. 
# The default when one storage driver is specified is to statically li 
nk. Be 
# sure to include the path to the library if necessary, and some syste 
ms may 
# use an extension other than .so. 
# 
# Options include: 
# 
#   libmysql_drv.so     libpgsql_drv.so   libsqlite_drv.so 
#   libsqlite3_drv.so   libora_drv.so     libhash_drv.so 
# 
# IMPORTANT: Switching storage drivers requires more than merely chang 
ing 
# this option. If you do not wish to lose all of your data, you will n 
eed to 
# migrate it to the new backend before making this change. 
# 
StorageDriver /usr/lib/libmysql_drv.so 
 
# 
# Trusted Delivery Agent: Specifies the local delivery agent DSPAM sho 
uld call 
# when delivering mail as a trusted user. Use %u to specify the user D 
SPAM is 
# processing mail for. It is generally a good idea to allow the MTA to 
 specify 
# the pass-through arguments at run-time, but they may also be specifi 
ed here. 
# 
# Most operating system defaults: 
#TrustedDeliveryAgent "/usr/bin/procmail"       # Linux 
#TrustedDeliveryAgent "/usr/bin/mail"           # Solaris 
#TrustedDeliveryAgent "/usr/libexec/mail.local" # FreeBSD 
#TrustedDeliveryAgent "/usr/bin/procmail"       # Cygwin 
# 
# Other popular configurations: 
#TrustedDeliveryAgent "/usr/cyrus/bin/deliver"  # Cyrus 
#TrustedDeliveryAgent "/bin/maildrop"           # Maildrop 
#TrustedDeliveryAgent "/usr/local/sbin/exim -oMr spam-scanned" # Exim 
# 
#UntrustedDeliveryAgent "/usr/bin/procmail -d %u" 
TrustedDeliveryAgent "/usr/sbin/sendmail" 
 
# 
# Untrusted Delivery Agent: Specifies the local delivery agent and arg 
uments 
# DSPAM should use when delivering mail and running in untrusted user  
mode. 
# Because DSPAM will not allow pass-through arguments to be specified  
to 
# untrusted users, all arguments should be specified here. Use %u to s 
pecify 
# the user DSPAM is processing mail for. This configuration parameter  
is only 
# necessary if you plan on allowing untrusted processing. 
# 
#UntrustedDeliveryAgent "/usr/bin/procmail -d %u" 
UntrustedDeliveryAgent "/usr/sbin/sendmail" 
 
# 
# SMTP or LMTP Delivery: Alternatively, you may wish to use SMTP or LM 
TP 
# delivery to deliver your message to the mail server. You will need t 
o 
# configure with --enable-daemon to use host delivery, however you do  
not need 
# to operate in daemon mode. Specify an IP address or UNIX path to a d 
omain 
# socket below as a host. 
# 
# If you would like to set up DeliveryHost's on a per-domain basis, us 
e 
# the syntax: DeliveryHost.domain.com 1.2.3.4 
# 
#DeliveryHost        127.0.0.1 
#DeliveryPort        24 
#DeliveryIdent       localhost 
#DeliveryProto       LMTP 
 
# 
# FallbackDomains: If you want to specify certain domains as fallback  
domains, 
# enable this option. For example, you could create a user @domain.com 
, and 
# if bob@domain.com does not resolve to a known user on the system, th 
e user 
# could default to your @domain.com user. NOTE: This also requires des 
ignating 
# fallbackDomain for the domain name; 
# e.g. dspam_admin ch pref domain.com fallbackDomain on 
# 
#FallbackDomains on 
 
# 
# Quarantine Agent: DSPAM's default behavior is to quarantine all mail 
 it 
# thinks is spam. If you wish to override this behavior, you may speci 
fy 
# a quarantine agent which will be called with all messages DSPAM thin 
ks is 
# spam. Use %u to specify the user DSPAM is processing mail for. 
# 
#QuarantineAgent        "/usr/bin/procmail -d spam" 
 
# 
# DSPAM can optionally process "plused users" (addresses in the user+d 
etail 
# form) by truncating the username just before the "+", so all interna 
l 
# processing occurs for "user", but delivery will be performed for 
# "user+detail". This is only useful if the LDA can handle "plused use 
rs" 
# (for example Cyrus IMAP) and when configured for LMTP delivery above 
# 
# NOTE: Plused detail presently only works when usernames are provided 
 and 
#       not fully qualified email address (@domain). 
# 
#EnablePlusedDetail     on 
 
# 
# Quarantine Mailbox: DSPAM's LMTP code can send spam mail using LMTP  
to a 
# "plused" mailbox (such as user+quarantine) leaving quarantine proces 
sing 
# for retraining or deletion to be performed by the LDA and the mail c 
lient. 
# "plused" mailboxes are supported by Cyrus IMAP and possibly other LD 
As. 
# The mailbox name must have the + 
# 
#QuarantineMailbox      +quarantine 
 
# 
# OnFail: What to do if local delivery or quarantine should fail. If s 
et 
# to "unlearn", DSPAM will unlearn the message prior to exiting with a 
n 
# un successful return code. The default option, "error" will not unle 
arn 
# the message but return the appropriate error code. The unlearn optio 
n 
# is use-ful on some systems where local delivery failures will cause  
the 
# message to be requeued for delivery, and could result in the message 
# being processed multiple times. During a very large failure, however 
, 
# this could cause a significant load increase. 
# 
OnFail error 
 
# Trusted Users: Only the users specified below will be allowed to per 
form 
# administrative functions in DSPAM such as setting the active user an 
d 
# accessing tools. All other users attempting to run DSPAM will be res 
tricted; 
# their uids will be forced to match the active username and they will 
 not be 
# able to specify delivery agent privileges or use tools. 
# 
Trust root 
Trust mail 
Trust mailnull 
Trust smmsp 
Trust daemon 
Trust nobody 
Trust majordomo 
Trust apache 
Trust mailman 
Trust postfix 
Trust dspam 
 
# 
# Debugging: Enables debugging for some or all users. IMPORTANT: DSPAM 
 must 
# be compiled with debug support in order to use this option. DSPAM sh 
ould 
# never be running in production with debug active unless you are 
# troubleshooting problems. 
# 
# DebugOpt: One or more of: process, classify, spam, fp, inoculation,  
corpus 
#   process     standard message processing 
#   classify    message classification using --classify 
#   spam        error correction of missed spam 
#   fp          error correction of false positives 
#   inoculation message inoculations (source=inoculation) 
#   corpus      corpusfed messages (source=corpus) 
# 
#Debug * 
#Debug bob bill 
# 
#DebugOpt process spam fp 
#DebugOpt process classify spam fp inoculation corpus 
 
# 
# ClassAlias: Alias a particular class to spam/nonspam. This is useful 
 if 
# classifying things other than spam. 
#ClassAliasSpam badstuff 
#ClassAliasNonspam goodstuff 
 
# 
# Training Mode: The default training mode to use for all operations,  
when 
# one has not been specified on the commandline or in the user's prefe 
rences. 
# Acceptable values are: toe, tum, teft, notrain 
# 
TrainingMode toe 
 
# 
# TestConditionalTraining: By default, dspam will retrain certain erro 
rs 
# until the condition is no longer met. This usually accelerates learn 
ing. 
# Some people argue that this can increase the risk of errors, however 
. 
# 
TestConditionalTraining on 
 
# 
# Features: Specify features to activate by default; can also be speci 
fied 
# on the commandline. See the documentation for a list of available fe 
atures. 
# If _any_ features are specified on the commandline, these are ignore 
d. 
# 
# NOTE: For standard "CRM114" Markovian weighting, use sbph 
# 
#Feature sbph 
Feature noise 
Feature chained 
Feature whitelist 
 
# Training Buffer: The training buffer waters down statistics during t 
raining. 
# It is designed to prevent false positives, but can also dramatically 
 reduce 
# dspam's catch rate during initial training. This can be a number fro 
m 0 
# (no buffering) to 10 (maximum buffering). If you are paranoid about  
false 
# positives, you should probably enable this option. 
Feature tb=5 
 
# 
# Algorithms: Specify the statistical algorithms to use, overriding an 
y 
# defaults configured in the build. The options are: 
#    naive       Naive-Bayesian (All Tokens) 
#    graham      Graham-Bayesian ("A Plan for Spam") 
#    burton      Burton-Bayesian (SpamProbe) 
#    robinson    Robinson's Geometric Mean Test (Obsolete) 
#    chi-square  Fisher-Robinson's Chi-Square Algorithm 
# 
# You may have multiple algorithms active simultaneously, but it is st 
rongly 
# recommended that you group Bayesian algorithms with other Bayesian 
# algorithms, and any use of Chi-Square remain exclusive. 
# 
# NOTE: For standard "CRM114" Markovian weighting, use 'naive', or con 
sider 
#       using 'burton' for slightly better accuracy 
# 
# Don't mess with this unless you know what you're doing 
# 
#Algorithm chi-square 
#Algorithm naive 
Algorithm burton graham naive 
#Algorithm burton 
 
# 
# PValue: Specify the technique used for calculating PValues, overridi 
ng any 
# defaults configured in the build. These options are: 
#    graham      Graham's Technique ("A Plan for Spam") 
#    robinson    Robinson's Technique 
#    markov      Markovian Weighted Technique 
# 
# Unlike algorithms, you may only have one of these defined. Use of th 
e 
# chi-square algorithm automatically changes this to robinson. 
# 
# Don't mess with this unless you know what you're doing. 
# 
#PValue robinson 
#PValue markov 
PValue graham 
 
# 
# SupressWebStats: Enable this if you are not using the CGI, and don't 
 want 
# .stats files written. 
#SupressWebStats on 
 
# 
# ImprobabilityDrive: Calculate odds-ratios for ham/spam, and add to 
# X-DSPAM-Improbability headers 
ImprobabilityDrive on 
 
# 
# Preferences: Specify any preferences to set by default, unless other 
wise 
# overridden by the user (see next section) or a default.prefs file. 
# If user or default.prefs are found, the user's preferences will over 
ride any 
# defaults. 
# 
Preference "trainingMode=TOE"      # TEFT, TUM, TOE 
Preference "spamAction=tag"      # tag, quarantine, deliver 
Preference "signatureLocation=message"   # 'message' or 'headers' 
Preference "spamSubject=[SPAM]" 
Preference "statisticalSedation=5"   # 0 to 9 
Preference "enableBNR=on"      # on, off 
Preference "showFactors=off"      # on, off 
Preference "enableWhitelist=on"      # on, off 
Preference "whitelistThreshold=10" 
 
# 
# Overrides: Specifies the user preferences which may override configu 
ration 
# and commandline defaults. Any other preferences supplied by an untru 
sted user 
# will be ignored. 
# 
AllowOverride enableBNR 
AllowOverride enableWhitelist 
AllowOverride fallbackDomain 
AllowOverride ignoreGroups 
AllowOverride localStore 
AllowOverride makeCorpus 
AllowOverride optIn 
AllowOverride optOut 
AllowOverride optOutClamAV 
AllowOverride processorBias 
AllowOverride showFactors 
AllowOverride signatureLocation 
AllowOverride spamAction 
AllowOverride spamSubject 
AllowOverride statisticalSedation 
AllowOverride storeFragments 
AllowOverride trainPristine 
AllowOverride trainingMode 
AllowOverride whitelistThreshold 
 
# --- MySQL --- 
 
# 
# Storage driver settings: Specific to a particular storage driver. Un 
comment 
# the configuration specific to your installation, if applicable. 
# 
MySQLServer             /var/run/mysqld/mysqld.sock 
MySQLPort 
MySQLUser               XXXXXXX 
MySQLPass               ****************** 
MySQLDb                 dspam 
MySQLCompress           true 
 
# If you are using replication for clustering, you can also specify a  
separate 
# server to perform all writes to. 
# 
#MySQLWriteServer       /var/run/mysqld/mysqld.sock 
#MySQLWritePort 
#MySQLWriteUser         dspam 
#MySQLWritePass         changeme 
#MySQLWriteDb           dspam_write 
#MySQLCompress          true 
 
# If your replication isn't close to real-time, your retraining might  
fail if 
# the  signature isn't found. One workaround for this is to use the wr 
ite 
# database for all signature reads: 
# 
#MySQLReadSignaturesFromWriteDb on 
 
# Use this if you have the 4.1 quote bug (see doc/mysql.txt) 
#MySQLSupressQuote      on 
 
# If you're running DSPAM in client/server (daemon) mode, uncomment th 
e 
# setting below to override the default connection cache size (the num 
ber 
# of connections the server pools between all clients). The connection 
 cache 
# represents the maximum number of database connections *available* an 
d should 
# be set based on the maximum number of concurrent connections you're  
likely 
# to have. Each connection may be used by only one thread at a time, s 
o all 
# other threads _will block_ until another connection becomes availabl 
e. 
# 
#MySQLConnectionCache   10 
 
# If you're using vpopmail or some other type of virtual setup and wis 
h to 
# change the table dspam uses to perform username/uid lookups, you can 
 over- 
# ride it below 
 
#MySQLVirtualTable          dspam_virtual_uids 
#MySQLVirtualUIDField       uid 
#MySQLVirtualUsernameField  username 
 
# UIDInSignature: MySQL supports the insertion of the user id into the 
 DSPAM 
# signature. This allows you to create one single spam or fp alias 
# (pointing to some arbitrary user), and the uid in the signature will 
# switch to the correct user. Result: you need only one spam alias 
 
MySQLUIDInSignature     on 
 
# --- PostgreSQL --- 
 
#PgSQLServer            127.0.0.1 
#PgSQLPort              5432 
#PgSQLUser              dspam 
#PgSQLPass              changeme 
#PgSQLDb                dspam 
 
# If you're running DSPAM in client/server (daemon) mode, uncomment th 
e 
# setting below to override the default connection cache size (the num 
ber 
# of connections the server pools between all clients). 
# 
#PgSQLConnectionCache   3 
 
# UIDInSignature: PgSQL supports the insertion of the user id into the 
 DSPAM 
# signature. This allows you to create one single spam or fp alias 
# (pointing to some arbitrary user), and the uid in the signature will 
# switch to the correct user. Result: you need only one spam alias 
 
#PgSQLUIDInSignature    on 
 
# If you're using vpopmail or some other type of virtual setup and wis 
h to 
# change the table dspam uses to perform username/uid lookups, you can 
 over- 
# ride it below 
 
#PgSQLVirtualTable          dspam_virtual_uids 
#PgSQLVirtualUIDField       uid 
#PgSQLVirtualUsernameField  username 
 
# --- Oracle --- 
 
#OraServer       "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1) 
(PORT=1521))(CONNECT_DATA=(SID=PROD)))" 
#OraUser         dspam 
#OraPass         changeme 
#OraSchema       dspam 
 
# --- SQLite --- 
 
#SQLitePragma   "synchronous = OFF" 
 
# --- Hash --- 
 
# HashRecMax: Default number of records to create in the initial segme 
nt when 
# building hash files. 100,000 yields files 1.6MB in size, but can fil 
l up 
# fast, so be sure to increase this (to a million or more) if you're n 
ot using 
# autoextend. 
# 
# Primes List: 
#  53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317 
, 196613, 
#  393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 5033 
1653, 
#  100663319, 201326611, 402653189, 805306457, 1610612741, 3221225473, 
#  4294967291 
# 
HashRecMax              98317 
 
# HashAutoExtend: Autoextend hash databases when they fill up. This al 
lows 
# them to continue to train by adding extents (extensions) to the file 
. There 
# will be a small delay during the growth process, as everything needs 
 to be 
# closed and remapped. 
# 
HashAutoExtend          on 
 
# HashMaxExtents: The maximum number of extents that may be created in 
 a single 
# hash file. Set this to zero for unlimited 
# 
HashMaxExtents          0 
 
# HashExtentSize: The record size for newly created extents. Creating  
this too 
# small could result in many extents being created. Creating this too  
large 
# could result in excessive disk space usage. 
# 
HashExtentSize          49157 
 
# HashMaxSeek: The maximum number of records to seek to insert a new r 
ecord 
# before failing or adding a new extent. Setting this too high will ex 
haustively 
# scan each segment and kill performance. Typically, a low value is ac 
ceptable 
# as even older extents will continue to fill over time. 
# 
HashMaxSeek             100 
 
# HashConcurrentUser: If you are using a single, stateful hash databas 
e in 
# daemon mode, specifying a concurrent user will cause the user to be 
# permanently mapped into memory and shared via rwlocks. 
# 
#HashConcurrentUser     user 
 
# HashConnectionCache: If running in daemon mode, this is the max # of 
# concurrent connections that will be supported. NOTE: If you are usin 
g 
# HashConcurrentUser, this option is ignored, as all connections are r 
ead- 
# write locked instead of mutex locked. 
HashConnectionCache     10 
 
# LDAP: Perform various LDAP functions depending on LDAPMode variable. 
# Presently, the only mode supported is 'verify', which will verify th 
e existence 
# of an unknown user in LDAP prior to creating them as a new user in t 
he system. 
# This is useful on some systems acting as gateway machines. 
# 
#LDAPMode       verify 
#LDAPHost       ldaphost.mydomain.com 
#LDAPFilter     "(mail=%u)" 
#LDAPBase       ou=people,dc=domain,dc=com 
 
# Optionally, you can specify storage profiles, and specify the server 
 to 
# use on the commandline with --profile. For example: 
# 
Profile Spok 
MySQLServer.Spok                /var/run/mysqld/mysqld.sock 
MySQLPort.Spok                  3306 
MySQLUser.Spok                  XXXXXXX 
MySQLPass.Spok                  ****************** 
MySQLDb.Spok                    dspam 
MySQLCompress.Spok              true 
MySQLUIDInSignature.Spok        on 
# 
#Profile DECAlpha 
#MySQLServer.DECAlpha   10.0.0.1 
#MySQLPort.DECAlpha     3306 
#MySQLUser.DECAlpha     dspam 
#MySQLPass.DECAlpha     changeme 
#MySQLDb.DECAlpha       dspam 
#MySQLCompress.DECAlpha true 
# 
#Profile Sun420R 
#MySQLServer.Sun420R    10.0.0.2 
#MySQLPort.Sun420R      3306 
#MySQLUser.Sun420R      dspam 
#MySQLPass.Sun420R      changeme 
#MySQLDb.Sun420R        dspam 
#MySQLCompress.Sun420R  false 
# 
#DefaultProfile DECAlpha 
DefaultProfile Spok 
 
# 
# If you're using storage profiles, you can set failovers for each pro 
file. 
# Of course, if you'll be failing over to another database, that datab 
ase 
# must have the same information as the first. If you're using a globa 
l 
# database with no training, this should be relatively simple. If you' 
re 
# configuring per-user data, however, you'll need to set up some type  
of 
# replication between databases. 
# 
#Failover.DECAlpha      SUN420R 
#Failover.Sun420R       DECAlpha 
 
# If the storage fails, the agent will follow each profile's failover  
up to 
# a maximum number of failover attempts. This should be set to a maxim 
um of 
# the number of profiles you have, otherwise the agent could loop and  
try 
# the same profile multiple times (unless this is your desired behavio 
r). 
# 
#FailoverAttempts       1 
 
# 
# Ignored headers: If DSPAM is behind other tools which may add a head 
er to 
# incoming emails, it may be beneficial to ignore these headers - espe 
cially 
# if they are coming from another spam filter. If you are _not_ using  
one of 
# these tools, however, leaving the appropriate headers commented out  
will 
# allow DSPAM to use them as telltale signs of forged email. 
# 
IgnoreHeader X--MailScanner-SpamCheck 
IgnoreHeader X-Admission-MailScanner-SpamCheck 
IgnoreHeader X-Admission-MailScanner-SpamScore 
IgnoreHeader X-Amavis-Alert 
IgnoreHeader X-Antispam 
IgnoreHeader X-AntiVirus 
IgnoreHeader X-Antivirus-Scanner 
IgnoreHeader X-Antivirus-Status 
IgnoreHeader X-Assp-Spam-Prob 
IgnoreHeader X-AV-Scanned 
IgnoreHeader X-AVAS-Spam-Level 
IgnoreHeader X-AVAS-Spam-Score 
IgnoreHeader X-AVAS-Spam-Status 
IgnoreHeader X-AVAS-Spam-Symbols 
IgnoreHeader X-AVAS-Virus-Status 
IgnoreHeader X-AVK-Virus-Check 
IgnoreHeader X-Barracuda-Spam-Flag 
IgnoreHeader X-Barracuda-Spam-Report 
IgnoreHeader X-Barracuda-Spam-Score 
IgnoreHeader X-Barracuda-Spam-Status 
IgnoreHeader X-BTI-AntiSpam 
IgnoreHeader X-Bogosity 
IgnoreHeader X-ClamAntiVirus-Scanner 
IgnoreHeader X-CRM114-Status 
IgnoreHeader X-Despammed-Tracer 
IgnoreHeader X-ELTE-SpamCheck 
IgnoreHeader X-ELTE-SpamCheck-Details 
IgnoreHeader X-ELTE-SpamScore 
IgnoreHeader X-ELTE-SpamVersion 
IgnoreHeader X-ELTE-VirusStatus 
IgnoreHeader X-GMX-Antispam 
IgnoreHeader X-GMX-Antivirus 
IgnoreHeader X-Greylist 
IgnoreHeader X-GWSPAM 
IgnoreHeader X-HTMLM 
IgnoreHeader X-HTMLM-Info 
IgnoreHeader X-HTMLM-Score 
IgnoreHeader X-iHateSpam-Checked 
IgnoreHeader X-iHateSpam-Quarantined 
IgnoreHeader X-IMAIL-SPAM-STATISTICS 
IgnoreHeader X-IMAIL-SPAM-URL-DBL 
IgnoreHeader X-IMAIL-SPAM-VALFROM 
IgnoreHeader X-IMAIL-SPAM-VALHELO 
IgnoreHeader X-IMAIL-SPAM-VALREVDNS 
IgnoreHeader X-IronPort-Anti-Spam-Filtered 
IgnoreHeader X-IronPort-Anti-Spam-Result 
IgnoreHeader X-Kaspersky-Antivirus 
IgnoreHeader X-KSV-Antispam 
IgnoreHeader X-Mailer 
IgnoreHeader X-MailScanner 
IgnoreHeader X-MailScanner-Information 
IgnoreHeader X-MailScanner-SpamCheck 
IgnoreHeader X-MDaemon-Deliver-To 
IgnoreHeader X-MDAV-Processed 
IgnoreHeader X-MDRemoteIP 
IgnoreHeader X-MIE-MailScanner-SpamCheck 
IgnoreHeader X-MIMEOLE 
IgnoreHeader X-Mlf-Spam-Status 
IgnoreHeader X-MSMail-Priority 
IgnoreHeader X-NAI-Spam-Checker-Version 
IgnoreHeader X-NAI-Spam-Flag 
IgnoreHeader X-NAI-Spam-Level 
IgnoreHeader X-NAI-Spam-Route 
IgnoreHeader X-NAI-Spam-Rules 
IgnoreHeader X-NAI-Spam-Score 
IgnoreHeader X-NAI-Spam-Threshold 
IgnoreHeader X-NetcoreISpam1-ECMScanner 
IgnoreHeader X-NetcoreISpam1-ECMScanner-From 
IgnoreHeader X-NetcoreISpam1-ECMScanner-Information 
IgnoreHeader X-NetcoreISpam1-ECMScanner-SpamCheck 
IgnoreHeader X-NetcoreISpam1-ECMScanner-SpamScore 
IgnoreHeader X-NEWT-spamscore 
IgnoreHeader X-No-Spam 
IgnoreHeader X-Olypen-Virus 
IgnoreHeader X-OWM-SpamCheck 
IgnoreHeader X-OWM-VirusCheck 
IgnoreHeader X-PAA-AntiVirus 
IgnoreHeader X-PAA-AntiVirus-Message 
IgnoreHeader X-PIRONET-NDH-MailScanner-SpamCheck 
IgnoreHeader X-PIRONET-NDH-MailScanner-SpamScore 
IgnoreHeader X-PN-SPAMFiltered 
IgnoreHeader X-Priority 
IgnoreHeader X-Proofpoint-Spam-Details 
IgnoreHeader X-purgate 
IgnoreHeader X-purgate-Ad 
IgnoreHeader X-purgate-ID 
IgnoreHeader X-RAV-AntiVirus 
IgnoreHeader X-Rc-Spam 
IgnoreHeader X-Rc-Virus 
IgnoreHeader X-RedHat-Spam-Score 
IgnoreHeader X-RedHat-Spam-Warning 
IgnoreHeader X-RegEx 
IgnoreHeader X-RegEx-Score 
IgnoreHeader X-RITmySpam 
IgnoreHeader X-RITmySpam-IP 
IgnoreHeader X-RITmySpam-Spam 
IgnoreHeader X-Rocket-Spam 
IgnoreHeader X-SA-GROUP 
IgnoreHeader X-SA-RECEIPTSTATUS 
IgnoreHeader X-Sohu-Antivirus 
IgnoreHeader X-Spam 
IgnoreHeader X-Spam-Check 
IgnoreHeader X-Spam-Checked-By 
IgnoreHeader X-Spam-Checker 
IgnoreHeader X-Spam-Checker-Version 
IgnoreHeader X-Spam-DCC 
IgnoreHeader X-Spam-Details 
IgnoreHeader X-Spam-detection-level 
IgnoreHeader X-Spam-Filter 
IgnoreHeader X-Spam-Filtered 
IgnoreHeader X-Spam-Flag 
IgnoreHeader X-Spam-Level 
IgnoreHeader X-Spam-OrigSender 
IgnoreHeader X-Spam-Pct 
IgnoreHeader X-Spam-Prev-Subject 
IgnoreHeader X-Spam-Processed 
IgnoreHeader X-Spam-Pyzor 
IgnoreHeader X-Spam-Rating 
IgnoreHeader X-Spam-Report 
IgnoreHeader X-Spam-Scanned 
IgnoreHeader X-Spam-Score 
IgnoreHeader X-Spam-Status 
IgnoreHeader X-Spam-Tagged 
IgnoreHeader X-Spam-Tests 
IgnoreHeader X-Spam-Tests-Failed 
IgnoreHeader X-Spam-Virus 
IgnoreHeader X-Spamadvice 
IgnoreHeader X-Spamarrest-noauth 
IgnoreHeader X-Spamarrest-speedcode 
IgnoreHeader X-SpamBouncer 
IgnoreHeader X-Spambayes-Classification 
IgnoreHeader X-SpamCatcher-Score 
IgnoreHeader X-SpamCop-Checked 
IgnoreHeader X-SpamCop-Disposition 
IgnoreHeader X-SpamCop-Whitelisted 
IgnoreHeader X-Spamcount 
IgnoreHeader X-SpamDetected 
IgnoreHeader X-SpamInfo 
IgnoreHeader X-SpamPal 
IgnoreHeader X-SpamPal-Timeout 
IgnoreHeader X-SpamReason 
IgnoreHeader X-SpamScore 
IgnoreHeader X-Spamsensitivity 
IgnoreHeader X-SpamTest-Categories 
IgnoreHeader X-SpamTest-Info 
IgnoreHeader X-SpamTest-Method 
IgnoreHeader X-SpamTest-Status 
IgnoreHeader X-SpamTest-Version 
IgnoreHeader X-STA-NotSpam 
IgnoreHeader X-STA-Spam 
IgnoreHeader X-TERRACE-SPAMMARK 
IgnoreHeader X-TERRACE-SPAMRATE 
IgnoreHeader X-to-viruscore 
IgnoreHeader X-Text-Classification 
IgnoreHeader X-Text-Classification-Data 
IgnoreHeader X-UCD-Spam-Score 
IgnoreHeader x-uscspam 
IgnoreHeader X-Virus-Check 
IgnoreHeader X-Virus-Checked 
IgnoreHeader X-Virus-Checker-Version 
IgnoreHeader X-Virus-Scan 
IgnoreHeader X-Virus-Scanned 
IgnoreHeader X-Virus-Scanner 
IgnoreHeader X-Virus-Scanner-Result 
IgnoreHeader X-Virus-Status 
IgnoreHeader X-VirusChecked 
IgnoreHeader X-Virusscan 
IgnoreHeader X-WinProxy-AntiVirus 
IgnoreHeader X-WinProxy-AntiVirus-Message 
 
# 
# Lookup: Perform lookups on streamlined blackhole list servers (see 
# http://www.nuclearelephant.com/projects/sbl/). The streamlined black 
list 
# server is machine-automated, unsupervised blacklisting system design 
ed to 
# provide real-time and highly accurate blacklisting based on network  
spread. 
# When performing a lookup, DSPAM will automatically learn the inbound 
 message 
# as spam if the source IP is listed. Until an official public RABL se 
rver is 
# available, this feature is only useful if you are running your own 
# streamlined blackhole list server for internal reporting among multi 
ple mail 
# servers. Provide the name of the lookup zone below to use. 
# 
# This function performs standard reverse-octet.domain lookups, and wh 
ile it 
# will function with many RBLs, it's strongly discouraged to use those 
# maintained by humans as they're often inaccurate and could hurt filt 
er 
# learning and accuracy. 
# 
#Lookup "sbl.yourdomain.com" 
Lookup  "sbl-xbl.spamhaus.org" 
 
# 
# RBLInoculate: If you want to inoculate the user from RBL'd messages  
it would 
# have otherwise missed, set this to on. 
# 
RBLInoculate on 
 
# 
# Notifications: Enable the sending of notification emails to users (f 
irst 
# message, quarantine full, etc.) 
# 
Notifications   on 
 
# 
# Purge configuration: Set dspam_clean purge default options, if not o 
therwise 
# specified on the commandline 
# 
#PurgeSignatures 14          # Stale signatures 
#PurgeNeutral    90          # Tokens with neutralish probabilities 
#PurgeUnused     90          # Unused tokens 
#PurgeHapaxes    30          # Tokens with less than 5 hits (hapaxes) 
#PurgeHits1S     15          # Tokens with only 1 spam hit 
#PurgeHits1I     15          # Tokens with only 1 innocent hit 
 
# 
# Purge configuration for SQL-based installations using purge.sql 
# 
PurgeSignature off # Specified in purge.sql 
PurgeNeutral   90 
PurgeUnused    off # Specified in purge.sql 
PurgeHapaxes   off # Specified in purge.sql 
PurgeHits1S    off # Specified in purge.sql 
PurgeHits1I    off # Specified in purge.sql 
 
# 
# Local Mail Exchangers: Used for source address tracking, tells DSPAM 
 which 
# mail exchangers are local and therefore should be ignored in the Rec 
eived: 
# header when tracking the source of an email. Note: you should use th 
e address 
# of the host as appears between brackets [ ] in the Received header. 
# 
LocalMX 127.0.0.1 
 
# 
# Logging: Disabling logging for users will make usage graphs unavaila 
ble to 
# them. Disabling system logging will make admin graphs unavailable. 
# 
SystemLog on 
UserLog   on 
 
# 
# TrainPristine: for systems where the original message remains server 
 side 
# and can therefore be presented in pristine format for retraining. Th 
is option 
# will cause DSPAM to cease all writing of signatures and DSPAM header 
s to the 
# message, and deliver the message in as pristine format as possible.  
This mode 
# REQUIRES that the original message in its pristine format (as of del 
ivery) 
# be presented for retraining, as in the case of webmail, imap, or oth 
er 
# applications where the message is actually kept server-side during r 
eading, 
# and is preserved. DO NOT use this switch unless the original message 
 can be 
# presented for retraining with the ORIGINAL HEADERS and NO MODIFICATI 
ONS. 
# 
#TrainPristine on 
 
# 
# Opt: in or out; determines DSPAM's default filtering behavior. If th 
is value 
# is set to in, users must opt-in to filtering by dropping a .dspam fi 
le in 
# /var/dspam/opt-in/user.dspam (or if you have homedirs configured, a  
.dspam 
# folder in their home directory).  The default is opt-out, which mean 
s all 
# users will be filtered unless a .nodspam file is dropped in 
# /var/dspam/opt-out/user.nodspam 
# 
Opt in 
 
# 
# TrackSources: specify which (if any) source addresses to track and r 
eport 
# them to syslog (mail.info). This is useful if you're running a firew 
all or 
# blacklist and would like to use this information. Spam reporting als 
o drops 
# RABL blacklist files (see http://www.nuclearelephant.com/projects/ra 
bl/). 
# 
TrackSources spam nonspam 
 
# 
# ParseToHeaders: In lieu of setting up individual aliases for each us 
er, 
# DSPAM can be configured to automatically parse the To: address for s 
pam and 
# false positive forwards. From there, it can be configured to either  
set the 
# DSPAM user based on the username specified in the header and/or chan 
ge the 
# training class and source accordingly. The options below can be used 
 to 
# customize most common types of header parsing behavior to avoid the  
need for 
# multiple aliases, or if using LMTP, aliases entirely.. 
# 
# ParseToHeader: Parse the To: headers of an incoming message. This mu 
st be 
#                set to 'on' to use either of the following features. 
# 
# ChangeModeOnParse: Automatically change the class (to spam or innoce 
nt) 
#   depending on whether spam- or notspam- was specified, and change t 
he source 
#   to 'error'. This is convenient if you're not using aliases at all, 
 but 
#   are delivering via LMTP. 
# 
# ChangeUserOnParse: Automatically change the username to match that s 
pecified 
#   in the To: header. For example, spam-bob@domain.tld will set the u 
sername 
#   to bob, ignoring any --user passed in. This may not always be desi 
rable if 
#   you are using virtual email addresses as usernames. Options: 
#     on or user        take the portion before the @ sign only 
#     full              take everything after the initial {spam,notspa 
m}-. 
    # 
    ParseToHeaders on 
    ChangeModeOnParse on 
    ChangeUserOnParse off 
     
    # 
    # Broken MTA Options: Some MTAs don't support the proper functiona 
lity 
    # necessary. In these cases you can activate certain features in D 
SPAM to 
    # compensate. 'returnCodes' causes DSPAM to return an exit code of 
 99 if 
    # the message is spam, 0 if not, or a negative code if an error ha 
s occured. 
    # Specifying 'case' causes DSPAM to force the input usernames to l 
owercase. 
    # Spceifying 'lineStripping' causes DSPAM to strip ^M's from messa 
ges passed 
    # in. 
    # 
    #Broken returnCodes 
    Broken case 
    Broken lineStripping 
     
    # 
    # MaxMessageSize: You may specify a maximum message size for DSPAM 
 to process. 
    # If the message is larger than the maximum size, it will be deliv 
ered 
    # without processing. Value is in bytes. 
    # 
    MaxMessageSize 20971520 
     
    # 
    # Virus Checking: If you are running clamd, DSPAM can perform stre 
am-based 
    # virus checking using TCP. Uncomment the values below to enable v 
irus 
    # checking. 
    # 
    # ClamAVResponse: reject (reject or drop the message with a perman 
ent failure) 
    #                 accept (accept the message and quietly drop the  
message) 
    #                 spam   (treat as spam and quarantine/tag/whateve 
r) 
    # 
    #ClamAVPort     3310 
    #ClamAVHost     127.0.0.1 
    #ClamAVResponse accept 
     
    # 
    # Daemonized Server: If you are running DSPAM as a daemonized serv 
er using 
    # --daemon, the following parameters will override the default. Us 
e the 
    # ServerPass option to set up accounts for each client machine. Th 
e DSPAM 
    # server will process and deliver the message based on the paramet 
ers 
    # specified. If you want the client machine to perform delivery, u 
se 
    # the --stdout option in conjunction with a local setup. 
    # 
    #ServerPort             24 
    ServerQueueSize         32 
    ServerPID               /var/run/dspam/dspam.pid 
     
    # 
    # ServerMode specifies the type of LMTP server to start. This can  
be one of: 
    #     dspam: DSPAM-proprietary DLMTP server, for communicating wit 
h dspamc 
    #  standard: Standard LMTP server, for communicating with Postfix  
or other MTA 
    #      auto: Speak both DLMTP and LMTP; auto-detect by ServerPass. 
IDENT 
    # 
    ServerMode auto 
     
    # If supporting DLMTP (dspam) mode, dspam clients will require aut 
hentication 
    # as they will be passing in parameters. The idents below will be  
used to 
    # determine which clients will be speaking DLMTP, so if you will b 
e using 
    # both LMTP and DLMTP from the same host, be sure to use something 
 other 
    # than the server's hostname below (which will be sent by the MTA  
during a 
    # standard LMTP LHLO). 
    # 
    #ServerPass.Relay1      "secret" 
    #ServerPass.Relay2      "password" 
    # 
    ServerPass.Spok         "******************" 
     
    # If supporting standard LMTP mode, server parameters will need to 
 be specified 
    # here, as they will not be passed in by the mail server. The Serv 
erIdent 
    # specifies the 250 response code ident sent back to connecting cl 
ients and 
    # should be set to the hostname of your server, or an alias. 
    # 
    # NOTE: If you specify --user in ServerParameters, the RCPT TO wil 
l be 
    #       used only for delivery, and not set as the active user for 
 processing. 
    # 
    ServerParameters        "--deliver=innocent,spam -d %u" 
    ServerIdent             "******************" 
     
    # If you wish to use a local domain socket instead of a TCP socket 
, uncomment 
    # the following. It is strongly recommended you use local domain s 
ockets if 
    # you are running the client and server on the same machine, as it 
 eliminates 
    # much of the bandwidth overhead. 
    # 
    ServerDomainSocketPath  "/var/run/dspam/dspam.sock" 
     
    # 
    # Client Mode: If you are running DSPAM in client/server mode, unc 
omment and 
    # set these variables. A ClientHost beginning with a / will be tre 
ated as 
    # a domain socket. 
    # 
    #ClientHost     /tmp/dspam.sock 
    #ClientIdent    "secret@Relay1" 
    # 
    #ClientHost     127.0.0.1 
    #ClientPort     24 
    #ClientIdent    "secret@Relay1" 
    # 
    ClientHost      /var/run/dspam/dspam.sock 
    ClientIdent     "******************@Spok" 
     
    # RABLQueue: Touch files in the RABL queue 
    # If you are a reporting streamlined blackhole list participant, y 
ou can 
    # touch ip addresses within the directory the rabl_client process  
is watching. 
    # 
    #RABLQueue      /var/spool/rabl 
     
    # DataSource: If you are using any type of data source that does n 
ot include 
    # email-like headers (such as documents), uncomment the line below 
. This 
    # will cause the entire input to be treated like a message "body" 
    # 
    #DataSource      document 
     
    # ProcessorWordFrequency: By default, words are only counted once  
per message. 
    # If you are classifying large documents, however, you may wish to 
 count once 
    # per occurrence instead. 
    # 
    #ProcessorWordFrequency  occurrence 
     
    # ProcessorBias: Bias causes the filter to lean more toward 'innoc 
ent', and 
    # usually greatly reduces false positives. It is the default behav 
ior of 
    # most Bayesian filters (including dspam). 
    # 
    # NOTE: You probably DONT want this if you're using Markovian Weig 
hting, unless 
    # you are paranoid about false positives. 
    # 
    ProcessorBias on 
     
    ## EOF



Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 20 Nov 06  08:43  

Hvala ti, steveb. Kad svarim sve informacije, javljam se. smile


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 12 Dec 06  20:03  

Uh. Napokon sam sažvakao sve informacije, samo me još jedno interesuje. Kako da inicijalno istreniram dspam? Koliko se sećam, trebao bi negde da postoji neka corpus arhiva (ako se to tako zove) i neki `sistemski` dspam korisnik (korisnik za dspam_train koji nije ni jedan sa mail account-om, nego kad treniram njega, treniram ih sve).

PS. Kao što se da videti, još uvek nisam provalio dspam čestito, ali radi se na tome (i na još 100 drugih stvari istovremeno, pa ide dosta sporo).


Site Admin
Učlanjen: 31 Mar 05
Lokacija: Zürich
Poruke: 226
profil¬ poruka¬
upRE: postfix + dspam problem  Oglašeno: 14 Dec 06  01:39  

Za zalost spamarchive.org nije vise. Inace bi mogo uzeti celi spamarchive.org za training.

Pogledaj ovde:
http://www.iit.demokritos.gr/skel/i-config/downloads/
http://spamassassin.apache.org/publiccorpus/readme.html
http://www.trudgian.net/spamkann/synthetic_corpus.php
http://www.spamarchive.org/
http://www.cs.cmu.edu/~enron/
http://download.foxmail4u.de/
http://forgeftp.novell.com//nw-assp/Sample%20Spam%20Database/asspsmpl- 0.1/
http://wiki.cs.pdx.edu/~psam/CorpusSets


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 14 Dec 06  08:23  

Hvala, steveb, do nebesa. :o)


Član
Učlanjen: 04 May 05
Lokacija: Novi Sad
Poruke: 578
profil¬ poruka¬ www¬
upRE: postfix + dspam problem  Oglašeno: 30 Jan 07  11:29  

Eto meni novih problema. Iz nekog razloga, dobijam ovu poruku svaki put kad pristigne emajl:
Jan 21 14:36:45 sparrow dspam[7945]: bailing on error -2 
Jan 21 14:36:45 sparrow dspam[7945]: received invalid result (! DSR_IS 
SPAM || DSR_INNOCENT) : -2 
Jan 21 14:36:45 sparrow dspam[7945]: process_message returned error -2 
. delivering.

Šta ovo uopšte znači, pošto google ne zna.