Claudio Prono wrote:
I resend that question to the mailing list, because i need a solution. Sorry. Anyone have an idea of how to do that?


The best way is to run dspam in relay mode (it runs as an LMTP daemon and after filtering, forwards mail back to postfix. same way amavisd-new does, so you can read amavisd-new docs for help). In such a setup, disable rewrite before the filter (see the FILTER README and amavisd-new README.postfix) so that dspam doesn't see the @autoreply.* copy (otherwise, it will not use the users dictionary, but will have its own). there are few wiki pages explaining how to run dspam in relay mode (there's also a relay.txt or gateway.txt or so in the dspam distribution). get friend with Google and "he" will help you (you can also ask on the dspam users list).

running dspam in "delivery mode" with postfixadmin vacation.pl requires a lot of work. see below for few notes.

The situation right now is:

Dspam is called by an smtpd restriction filter, like this in main.cf:

smtpd_recipient_restrictions =
       #check_recipient_access hash:/etc/postfix/vacation,
       check_recipient_access hash:/etc/postfix/dspam_learning,
       permit_mynetworks,
       permit_sasl_authenticated,
       reject_non_fqdn_sender,
       reject_non_fqdn_recipient,
       reject_unknown_recipient_domain,
       reject_unauth_pipelining,
       reject_unauth_destination,
       check_policy_service inet:127.0.0.1:10031 (that is postgrey)
       check_recipient_access hash:/etc/postfix/dspam_users

/etc/postfix/dspam_users

domain.net      FILTER      dspam:

/etc/postfix/dspam_learning

[EMAIL PROTECTED] FILTER spam:
[EMAIL PROTECTED] FILTER nospam:

/etc/postfix/master.cf

dspam    unix   -       n       n       -       10       pipe
flags=u user=nobody argv=/usr/bin/dspam --deliver=innocent --feature=noise,chained --user ${recipient}
spam    unix    -       n       n       -       -       pipe
flags=u user=nobody argv=/usr/bin/dspam --class=spam --source=error --user spam
nospam  unix    -       n       n       -       -       pipe
flags=u user=nobody argv=/usr/bin/dspam --class=innocent --source=error --user spam

Vacation (is vacation.pl contained in postfixadmin) is called by that manner:

in /etc/postfix/transport

autoreply.domain.net                  vacation:

postfixadmin when a vacation is activated, adds an alias to the user like user [EMAIL PROTECTED]@autoreply.domain.net, it matches the transport and triggers the vacation.pl script.


with
.domain.net     FILTER dspam:
it would trigger the FILTER statement. but then
- you need a way to tell dspam that [EMAIL PROTECTED]@autoreply.domain.net is the same as [EMAIL PROTECTED] (so as to use his dictionary). this is certainly feasible via mysql tuning. (sorry, I won't try). - you need to pass mail back to postfix so that vacation.pl gets called. this means that dspam should use the sendmail command for delivery. (alternatively, it could use maildrop or procmail, provided you don't lose the envelope recipient, and maildrop/procmail could then call vacation.pl...).

But it was triggered before dspam, so it reply also to all the spam, with so many "undeliverable mail" errors and similar things... and this is no good. I need to vacation be triggered only after dspam, so it responds to the good mails and not to the bad mails.

Thank u,

Claudio Prono.




Reply via email to