here comes a reference configuration for kas-kav, which works fine and is pretty simple,
it is obtained just after installing both applications and running respective postinstallation scripts.
you need an additional smtpd since this is a standard (tested and supported) integration schema.
Of course, you may configure postfix, kas and kav on completely different manner manually, but in this case all integration issues are up to you...
main.cf:
CODE
#kav4lms-filter-begin
content_filter = kav4lms_filter:127.0.0.1:10025
#kav4lms-filter-end
master.cf:
CODE
smtp inet n - n - - smtpd
### KASPERSKY ANTI-SPAM BEGIN ###
-o content_filter=kas3scan:127.0.0.1:9026
### KASPERSKY ANTI-SPAM END ###
...
#kav4lms-filter-begin
kav4lms_filter unix - - n - 10 smtp
-o smtp_send_xforward_command=yes
127.0.0.1:10026 inet n - n - 10 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_ad
dress_mappings
-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,[::1]/128
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
#kav4lms-filter-end
### KASPERSKY ANTI-SPAM BEGIN ###
127.0.0.1:9026 inet n n n - 20 spawn
user=mailflt3 argv=/usr/local/ap-mailfilter3/bin/kas-pipe
127.0.0.1:9025 inet n - n - 25 smtpd
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
-o local_recipient_maps=
-o relay_recipient_maps=
-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 strict_rfc821_envelopes=no
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_address_mappings
kas3scan unix - - n - 10 smtp
-o smtp_send_xforward_command=yes
### KASPERSKY ANTI-SPAM END ###
filter.conf:
CODE
PipeInProtocol smtp
PipeOutProtocol smtp
PipeOutgoingAddr tcp:127.0.0.1:9025
PipeUseXForward yes
kav4linuxmailserver.conf:
CODE
FilterSocket=inet:10025@127.0.0.1