Postfix (SPAM Filterung) Config

phpman

Registered User
Hallo zusammen,

ich habe hier einen VSever welcher z.Zt. massenweise mit SPAM beschossen wird und versuche nun die Config entprechend
anzupassen und wäre sehr dankbar wenn Ihr mir hier weiterhelfen könntet bei der Optimierung.

z.Zt. ist folgendes Installiert:

OS: Debian 3.1 / 4.0
MTA : Postfix v2.1.5
Postgrey
Spamassassin

meine Aktuelle Config:

/etc/postfix/main.cf

Code:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = mars.xyz-domain.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.localdomain, localhost
mynetworks = 127.0.0.0/8
mailbox_command = procmail
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
default_process_limit = 25

#minimal config test
#smtpd_recipient_restrictions = permit_sasl_authenticated,
#                                permit_mx_backup,
#                               permit_mynetworks,
#                               reject_unauth_destination,
#                               reject_non_fqdn_sender,
#                               reject_non_fqdn_recipient,
#                               reject_rbl_clients relay.osirusoft.com,
#                               reject_rbl_clients zen.spamhaus.org,
#                               reject_rbl_clients list.dsbl.org


smtpd_recipient_restrictions = permit_sasl_authenticated,
                               permit_mynetworks,
                               reject_non_fqdn_sender,
                               reject_non_fqdn_recipient,
                               reject_non_fqdn_hostname,
                               reject_unknown_recipient_domain,
                               reject_invalid_hostname,
                               reject_unknown_hostname,
                               reject_unknown_sender_domain,
                               reject_rbl_client,
                               permit_mx_backup,
                               reject_unauth_destination

check_policy_service = inet:127.0.0.1:60000
message_size_limit = 15360000


maps_rbl_domains = sbl.spamhaus.org,
                   relays.ordb.org,
                   unconfirmed.dsbl.org

local_recipient_maps = $alias_maps unix:passwd.byname

content_filter = scan:[127.0.0.1]:10025

## SMTP AUTH & TLS
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_use_tls = no
#smtpd_tls_key_file = /etc/apache/ssl.key/confixx.key
#smtpd_tls_cert_file = /etc/apache/ssl.crt/confixx.crt
#smtpd_tls_loglevel = 3
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

/etc/postfix/master.cf

Code:
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n      -       -       -       -       smtpd
#       -o smtpd_etrn_restrictions=reject
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       -       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
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 ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}

# only used by postfix-tls
#tlsmgr   fifo  -       -       n       300     1       tlsmgr
#smtps    inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587      inet  n       -       n       -       -       smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

# AV scan filter (used by content_filter)
#scan      unix  -       -       n       -       16      smtp        -o smtp_send_xforward_command=yes
# AV scan filter (used by content_filter)
scan      unix  -       -       n       -       16      smtp
         -o smtp_send_xforward_command=yes
         -o smtp_enforce_tls=no

# For injecting mail back into postfix from the filter
127.0.0.1:10026 inet  n -       n       -       16      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_style=host
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8

Was kann/muss ich noch optimieren oder was habe ich ggf. falsch konfiguriert um hier besser gegen SPAM geschützt zu sein.

Ich hoffe die Informationen sind soweit ausreichend wenn nicht bitte sagen reiche dann nach.

Vielen Dank im voraus für Eure Hilfe.

Gruß, PHPman
 
RBL bin ich mittlerweile überzeugt von zen.spamhaus.org - ist als einzige bei mir aktiv.

An den Anfang deiner Restrictions ein "reject_unknown_client" - das blockt alle Clients ohne PTR, also ein Großteil der Dialups :)

Wenn ich später etwas mehr Ruhe habe werd ich mir deine Config nochmal zu Gemüte führen :)
 
Back
Top