Problem with transport setup

2013-06-10 Thread Patrick Lists

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-retrainunix  -   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 inetn   -   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 inetn   -   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.orgdpsam-retrain:spam
h...@example.orgdspam-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 = 

Re: Problem with transport setup

2013-06-10 Thread Wietse Venema
Patrick Lists:
 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

To fix the User unknown error see this document:

http://www.postfix.org/ADDRESS_CLASS_README.html

Wietse




Re: Problem with transport setup

2013-06-10 Thread Tom Hendrikx
On 10-06-13 21:30, Patrick Lists wrote:
 On 06/10/2013 09:14 PM, Wietse Venema wrote:
 Patrick Lists:
 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

 To fix the User unknown error see this document:

 http://www.postfix.org/ADDRESS_CLASS_README.html
 
 Thank you for your feedback Wietse. The problem (to my untrained eye) is
 not the User unknown error. It's that after the forwarded email was
 submitted to the dspam-retrain transport and processed, postfix attempts
 to deliver it. I would expect it to stop once the forwarded email was
 handed off to the dspam-retrain transport and processed by the script.
 So I don't understand how fixing the User unknown issue would solve
 this problem. I just want the forwarded email to be processed by the
 dspam script and *not* be delivered afterwards. What did I miss?
 

The final delivery attempt is triggered by either the retrain script, or
dspam (after accepting the message from the retrain script). Inherently,
this is actually a dspam question and not a postfix one.

Normally, you'd tell dspam to not deliver the messages passed while
retraining by adding '--deliver=' (i.e. deliver never) to the retrain
command line. I'm missing support for that in the script (as available
in the dspam git repo), but I'm not sure whether there is a valid reason
for that, since I have no experience with the actual script. Re-post
your message to the dspam mailinglist, maybe someone else knows more.

Kind regards,
Tom


Re: Problem with transport setup

2013-06-10 Thread Wietse Venema
Patrick Lists:
 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)

That looks like a sendmail -bv or reject_unverified_recipient
probe to find out if an address is deliverable. Such probes do NOT
deliver mail to /usr/bin/dspam-retrain-forward.pl.

Wietse


Re: Problem with transport setup

2013-06-10 Thread Patrick Lists

On 06/10/2013 09:38 PM, Tom Hendrikx wrote:

Normally, you'd tell dspam to not deliver the messages passed while
retraining by adding '--deliver=' (i.e. deliver never) to the retrain
command line. I'm missing support for that in the script (as available
in the dspam git repo), but I'm not sure whether there is a valid reason
for that, since I have no experience with the actual script. Re-post
your message to the dspam mailinglist, maybe someone else knows more.


Thanks for the suggestion Tom. I'll post to the dspam mailing list.

Regards,
Patrick