Morgen gocart du altes Haus
Vielen Dank für die aktuellste Version von SMTP-Proxy ! Hast mich auch gleich dazu genötigt die x64 Version zu installieren, was nach über 6 Jahren eh mal fällig war
Eine Frage zu deinen Paketen, du hast hier auch guardian dabei, warum ist der denn da enthalten und wie setzt man das dann ein?
Eine Kleinigkeit die mir noch aufgefallen ist, könntest du in der master.cf folgenden Wert hinzu fügen, dieser wird benötigt um "Verzögerungsmails" an die Versender zu schicken:
Code: Select all
#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -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
cleanup unix n - n - 0 cleanup
-o canonical_classes=envelope_recipient,header_recipient
-o canonical_maps=regexp:/etc/postfix/batv.regexp
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
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
retry 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
Ein weiterer Punkt wäre in der main.cf unter ender_restrictions den permit_mynetworks etwas höher zu setzten da der smarthost, je nach setting, sonst sich selber blockeriert mit dem HELO error:
Code: Select all
smtpd_sender_restrictions =
reject_non_fqdn_sender,
check_helo_access hash:$maps_dir/helo_access,
reject_unknown_sender_domain,
permit_mynetworks,
check_sender_access btree:$maps_dir/sender_access,
check_sender_access btree:$maps_dir/sld_access,
check_sender_access btree:$maps_dir/tld_access,
check_sender_access btree:$maps_dir/tld_new_access,
check_sender_access pcre:$conf_dir/spamphrases-white.pcre,
check_sender_access pcre:$conf_dir/spamphrases-block.pcre,
# activate sender address verification (care, blocks autoresponder and other addresses)
# add the needed addresses to the whitelist (sender_access)
#reject_unverified_sender,
permit
So nun noch eine Optimierungsmöglichkeit, wäre eine helo_access & db zu hinterlegen:
Code: Select all
check_helo_access hash:$maps_dir/helo_access,
da es doch vorkommen kann, dass Sendesystem nicht gleich Absender ist. In der mpup.sh ist der Wert auch nicht hinterlegt, daher müsste es dort evtl auch noch eingepflegt werden für Updates der helo_access - ansonsten reicht je auch ein postmap auf die helo_access, aber schöner wäre es in der mpup.sh.
Hinzu kommt, für den spamassassin könnte man noch die freie Version des malware patrol hinterlegen.
Unter dem Punk SpamAssassin zu finden:
https://www.malwarepatrol.net/tech-supp ... figuration
Coole Arbeit, danke dir und eine schönen Tag & bleibt gesund!
5p9
UPDATE: Für Interessenten habe ich ein kleines Logscript für die Mails gebastelt, damit es farblich schöner wirkt, diese einfach in die Bashrc als alias hinterlegen und hier habt nen schöneren Überblick:
Code: Select all
#!/bin/bash
# Script tail color for smtp proxy logs
## FEEL FREE ##
# $author: 5p9 ; $date: 28.04.20
#############################################
shopt -s expand_aliases
alias grey-grep="GREP_COLOR='1;30' grep -E --color=always --line-buffered"
alias red-grep="GREP_COLOR='1;31' grep -E --color=always --line-buffered"
alias green-grep="GREP_COLOR='1;32' grep -E --color=always --line-buffered"
alias yellow-grep="GREP_COLOR='1;33' grep -E --color=always --line-buffered"
alias cyan-grep="GREP_COLOR='1;36' grep -E --color=always --line-buffered"
alias blue-grep="GREP_COLOR='1;34' grep -E --color=always --line-buffered"
tail -1000f /var/log/mail | grey-grep ".*ipfire-NAME.*|$" | cyan-grep "postfix|$" | yellow-grep "amavis|$" | red-grep "NOQUEUE.*|$" | green-grep "Anonymous.*| to=.*|$" | blue-grep "disconnect.*|$" | red-grep "Connection refused|$" | red-grep "refused to talk to me.*|$" | red-grep "Passed SPAM|$" | red-grep "lost connection after AUTH from unknown.*|$" | red-grep "INFECTED.*|$" | red-grep "warning.*|$" | red-grep "reject.*|$" | red-grep "spam.*|$" | red-grep "connect from unknown|$" | yellow-grep "Untrusted TLS connection established to|$"
Passt folgenden Wert entsprechend noch an: