проблема в том, что не могу правильно заточить master.cf для корректной проверки clamav + spamassassin, где-то жутко туплю.
конфиге все заточены потры все слушаются
tcp4 0 0 127.0.0.1.10025 *.* LISTEN
tcp4 0 0 127.0.0.1.10026 *.* LISTEN
tcp4 0 0 127.0.0.1.10027 *.* LISTENclamsmtpd.conf
OutAddress: 10026
XClient: off
Listen: 127.0.0.1:10025
ClamAddress: /var/run/clamav/clamd
Header: X-Virus-Scanned: ClamAV using ClamSMTP
TempDirectory: /tmp
Bounce: off
Quarantine: off
TransparentProxy: off
User: clamavпри получение письма MUA и дальнейшем разборе Header: X-Virus-Scanned: ClamAV using ClamSMTP запись отсутствует
clamd.conf
LogFile /var/log/clamav/clamd.log
LogFileMaxSize 2M
LogTime
PidFile /var/run/clamav/clamd.pid
TemporaryDirectory /tmp
DatabaseDirectory /var/db/clamav
LocalSocket /var/run/clamav/clamd
FixStaleSocket
MaxThreads 20
ReadTimeout 120
IdleTimeout 30
MaxDirectoryRecursion 15
FollowDirectorySymlinks
SelfCheck 1800
User clamav
AllowSupplementaryGroups
ScanPE
ScanOLE2
ScanMail
ScanHTML
ScanArchive
ArchiveMaxFileSize 15M
ArchiveMaxRecursion 10
ArchiveMaxFiles 1500
ArchiveMaxCompressionRatio 300master.cf
smtp inet n - n - 16 smtpd -o content_filter=spamfilter
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-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 - - smtprelay 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} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#Clamav
scan unix - - n - 16 smtp
-o smtp_send_xforward_command=yes
127.0.0.1:10026 inet n - n - 16 smtpd
-o content_filter=spamfilter
-o recive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smptd_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
#Spamassassin
spamfilter unix - n n - 10 pipe
flags=R
user=filter
argv=/usr/local/etc/postfix/scripts/spam.pl "localhost:10027" "spamfilter"
"${sender}" "$(recipient)" "/usr/local/bin/spamc"localhost:10027 inet n - n - 10 smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o mynetworks=127.0.0.0/8
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o myhostname=localhost
router0# cat /var/log/maillog|grep clamd
router0# cat /var/log/maillog | grep clamsmtpd
May 12 03:02:14 router0 clamsmtpd: 100020: accepted connection from: 127.0.0.1
May 12 03:02:14 router0 clamsmtpd: 100021: accepted connection from: 127.0.0.1
May 12 03:02:14 router0 clamsmtpd: 100020: from=root@router0.galaform.ru, to=root@router0.galaform.ru, status=CLEAN
May 12 03:02:14 router0 clamsmtpd: 100021: from=root@router0.galaform.ru, to=root@router0.galaform.ru, status=CLEAN
clamav-0.88.2 Command line virus scanner written entirely in C
clamsmtp-1.6_3 An ClamAV anti-virus SMTP FilteMay 12 14:03:21 router0 spamd[47857]: spamd: clean message (0.6/7.0) for filter:1004 in 4.0 seconds, 61046 bytes.
May 12 14:03:21 router0 spamd[47857]: spamd: result: . 0 - MANY_EXCLAMATIONS,NO_REAL_NAME scantime=4.0,size=61046,user=filter,uid=1004,required_score=7.0,rhost=localhost.galaform.ru,raddr=127.0.0.1,rport=64712,mid=<019401c675a9$4dab69c0$765f54c2@Alenka>,autolearn=disabled
May 12 14:03:21 router0 postfix/cleanup[52594]: 2A7645EDD: message-id=<019401c675a9$4dab69c0$765f54c2@Alenka>
May 12 14:03:21 router0 spamd[682]: prefork: child states: II
May 12 14:03:21 router0 postfix/qmgr[60076]: 2A7645EDD: from=<spo@zeus.ru>, size=62238, nrcpt=1 (queue active)
May 12 14:03:21 router0 postfix/smtpd[52805]: disconnect from localhost.galaform.ru[127.0.0.1]
May 12 14:03:21 router0 postfix/pipe[52802]: B5A225EC4: to=<avia@randevu-tour.ru>, relay=spamfilter, delay=20, status=sent (router0.galaform.ru)
May 12 14:03:21 router0 postfix/qmgr[60076]: B5A225EC4: removedв логах clamd не отмечается, где нужно поправить подскажите пожалуйста
router0# postconf -n|grep scan
content_filter = scan:127.0.0.1:10025