Hi,

I'm looking at integrating dspam into postfix in a "Non-Postfix mailbox store: separate domains, non-UNIX accounts" setup as described here:
http://www.postfix.org/VIRTUAL_README.html#in_virtual_other
The problem I have is getting the retraining to work. The idea is to forward an email with wrong classification to spam@... or ham@... so that dspam retrains. But after being processed by the dspam retrain script, postfix attempts to deliver the forwarded email which fails because there are no spam@... ham@... email addresses. Anyone have a hint what I'm doing wrong?

/var/log/maillog:

Jun 10 20:19:07 test postfix/smtpd[13975]: connect from localhost[::1]
Jun 10 20:19:08 test postfix/cleanup[13958]: 12812BE6: message-id=<20130610181908.12812...@test.puzzled.xs4all.nl> Jun 10 20:19:08 test postfix/qmgr[13952]: 12812BE6: from=<double-bou...@test.puzzled.xs4all.nl>, size=317, nrcpt=1 (queue active) Jun 10 20:19:08 test postfix/pipe[13979]: 12812BE6: to=<s...@example.org>, relay=dspam-retrain, delay=0.07, delays=0.06/0.01/0/0, dsn=2.0.0, status=deliverable (delivers to command: /usr/bin/dspam-retrain-forward.pl)
Jun 10 20:19:08 test postfix/qmgr[13952]: 12812BE6: removed
Jun 10 20:19:11 test postfix/smtpd[13975]: NOQUEUE: reject: RCPT from localhost[::1]: 550 5.1.1 <s...@example.org.org>: Recipient address rejected: User unknown; from=<patr...@example.org> to=<s...@exmaple.org> proto=ESMTP helo=<test.puzzled.xs4all.nl>
Jun 10 20:19:11 test postfix/smtpd[13975]: disconnect from localhost[::1]


/etc/postfix/master.cf:

10.0.0.184:smtp      inet  n       -       n       -       -       smtpd
   -o content_filter=lmtp:unix:/var/run/dspam/dspam.sock

127.0.0.1:smtp       inet  n       -       n       -       -       smtpd
   -o smtpd_client_restrictions=permit_mynetworks,reject

[::1]:smtp           inet  n       -       n       -       -       smtpd
   -o smtpd_client_restrictions=permit_mynetworks,reject

dspam-retrain        unix  -       n       n       -       -      pipe
  flags=XRu user=dspam argv=/usr/bin/dspam-retrain-forward.pl
  --debug=no
  --client
  --user ${sender}
  --class=${nexthop}
  --source=error
  --full=yes
  --headers-only=no
  --bodies-only=yes
  --first-only=no
  --skip-first=no
  --bin-dir=/usr/bin

127.0.0.1:10026 inet    n       -       n       -       -       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=127.0.0.0/8,[::1]/128
   -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128

[::1]:10026     inet    n       -       n       -       -       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=127.0.0.0/8,[::1]/128
   -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128


/etc/postfix/transport:

s...@example.org        dpsam-retrain:spam
h...@example.org                dspam-retrain:innocent


postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
canonical_classes = envelope_recipient
canonical_maps = proxy:ldap:/etc/postfix/ldap-canonical.cf
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = $myhostname, localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = accept
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 10.0.0.0/24, 127.0.0.0/8, [::1]/128
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = $smtpd_milters
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
show_user_unknown_table_name = no
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client zen.spamhaus.org smtpd_data_restrictions = reject_multi_recipient_bounce, reject_unauth_pipelining
smtpd_helo_restrictions = permit_mynetworks,    permit_sasl_authenticated
smtpd_milters = unix:/var/run/opendkim/opendkim.sock
smtpd_recipient_restrictions = reject_unverified_recipient, reject_unknown_recipient_domain, permit_mynetworks, permit_tls_clientcerts, reject_unauth_destination
smtpd_sasl_authenticated_header = yes
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unknown_sender_domain, reject_non_fqdn_sender
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
unverified_recipient_reject_reason = Recipient address verification failed
virtual_alias_maps = hash:/etc/postfix/virtual proxy:ldap:/etc/postfix/ldap-aliases.cf proxy:ldap:/etc/postfix/ldap-groups.cf
virtual_mailbox_domains = proxy:ldap:/etc/postfix/ldap-domains.cf
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap-users.cf
virtual_transport = lmtp:127.0.0.1:2003

Thanks!

Regards,
Patrick

Reply via email to