I have a machine running postfix 2.1.4, spamassassin and Kaspersky A/V
relaying all mail to an internal mail server with no local user.
Relay if defined by a user map in the form of:
du...@kolcore.com smtp:[192.168.0.205]
/etc/postfix/transport:
kolcore.com smtp:[192.168.0.205]
This setup works just fine, no problems what so ever.
I am trying to implement 2 local aliases that will pipe sa-learn with
the proper param for ham/spam learning, but this does not seem to work,
all I get is a "User unknown" in mail.log:
Oct 23 18:49:54 kitty postfix/smtpd[2136]: NOQUEUE: reject: RCPT from
localhost[127.0.0.1]: 550 <sp...@kolcore.com>: Recipient address
rejected: User unknown; from=3D<ro...@kitty.kolcore.com>
to=3D<sp...@kolcore.com> proto=3DSMTP helo=3D<kitty>
My /etc/postfix/aliases has:
spam: | /path/to/sa-learn + params
ham: | /path/to/sa-learn + params
This all sounds preety simple, I must be missing something here.
TIA
My main.cf and master.cf follows:
#
#
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D
#smtp inet n - - - - smtpd
smtp inet n - n - - smtpd -o
content_filter=3Dspamassassin
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=3Dreject
#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=3D5 -o smtp_connect_timeout=3D5
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
maildrop unix - n n - - pipe
flags=3DDRhu user=3Dvmail argv=3D/usr/local/bin/maildrop -d =
${recipient}
cyrus unix - n n - - pipe
flags=3DR user=3Dcyrus argv=3D/usr/sbin/cyrdeliver -e -m =
"${extension}"
${user}
uucp unix - n n - - pipe
flags=3DFqhu user=3Duucp argv=3Duux -r -n -z -a$sender - =
$nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=3DF user=3Dftn argv=3D/usr/lib/ifmail/ifmail -r $nexthop =
($recipient)
bsmtp unix - n n - - pipe
flags=3DFq. user=3Dbsmtp argv=3D/usr/lib/bsmtp/bsmtp -d -t$nexthop =
-f$sender
$recipient
scalemail-backend unix - n n - 2 pipe
flags=3DR user=3Dscalemail =
argv=3D/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
smtps inet n - n - - smtpd -o
smtpd_tls_wrappermode=3Dyes -o smtpd_sasl_auth_enable=3Dyes
#587 inet n - n - - smtpd -o
smtpd_enforce_tls=3Dyes -o smtpd_sasl_auth_enable=3Dyes
spamassassin unix - n n - - pipe user=3Dnobody argv=3D/usr/bin/spamc -f =
-e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}
## This line is added by Kaspersky Antivirus Installer
127.0.0.1:10025 inet n n n - 10 spawn
user=3Dfilter argv=3D/opt/kav/bin/smtpscanner
127.0.0.1:10026 inet n - n - 10 smtpd
-o content_filter=3D -o myhostname=3Dkitty
# See /usr/share/postfix/main.cf.dist for a commented, more complete
version
setgid_group =3D postdrop
smtpd_banner =3D $myhostname ESMTP $mail_name (Debian/GNU)
biff =3D no
# appending .domain is the MUA's job.
append_dot_mydomain =3D no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time =3D 4h
command_directory =3D /usr/sbin
daemon_directory =3D /usr/lib/postfix
program_directory =3D /usr/lib/postfix
myhostname =3D kitty.kolcore.com
alias_maps =3D hash:/etc/aliases
alias_database =3D hash:/etc/aliases
mydestination =3D localhost, zablab.com, kolcore.com, kolcore.net,
noam.tv, noam.fm
smtpd_sasl_application_name =3D smtpd
smtpd_sasl_auth_enable =3D yes
smtpd_sasl_security_options =3D noanonymous
smtpd_sasl_local_domain =3D
smtpd_use_tls =3D yes
smtpd_tls_cert_file =3D /etc/postfix/smtpd.cert
smtpd_tls_key_file =3D /etc/postfix/smtpd.key
smtp_connect_timeout =3D 60
ignore_mx_lookup_error =3D yes
broken_sasl_auth_clients =3D yes
#relayhost =3D localhost
mynetworks =3D 127.0.0.0/8
mailbox_command =3D procmail -a "$EXTENSION"
message_size_limit =3D 102400000
recipient_delimiter =3D +
#myorigin =3D kolcore.com
#local_transport =3D=20
local_recipient_maps =3D hash:/etc/postfix/user_relay
#local_recipient_maps =3D
show_user_unknown_table_name =3D no
relay_recipient_maps =3D hash:/etc/postfix/user_relay
transport_maps =3D hash:/etc/postfix/transport
relocated_maps =3D hash:/etc/postfix/relocated
unknown_local_recipient_reject_code =3D 550
alias_maps =3D hash:/etc/aliases
virtual_alias_maps =3D hash:/etc/postfix/virtual
smtpd_delay_reject =3D no
header_checks =3D pcre:/etc/postfix/headers
body_checks =3D pcre:/etc/postfix/bodies
check_client_access =3D hash:/etc/postfix/access
smtpd_recipient_restrictions =3D permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
## This line is added by Kaspersky Antivirus Installer
content_filter =3D lmtp:127.0.0.1:10025
http://www.postfix.org/postconf.5.html#local_recipient_maps
http://www.postfix.org/LOCAL_RECIPIENT_README.html
Wietse