Loading ...
Sorry, an error occurred while loading the content.
 

Re: Postfix - vacation.pl - dspam

Expand Messages
  • Claudio Prono
    I resend that question to the mailing list, because i need a solution. Sorry. Anyone have an idea of how to do that? The situation right now is: Dspam is
    Message 1 of 5 , Aug 1, 2008
      I resend that question to the mailing list, because i need a solution.
      Sorry. Anyone have an idea of how to do that?

      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

      spam@... FILTER spam:
      notspam@... 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 user@...@..., it matches the transport
      and triggers the vacation.pl script.

      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.



      --
      ------------
      Claudio Prono
      Systems Development @ Atpss.net Srl, Divisione Implementazione Sistemi
      Via San Bernardino, 17 - 10137 Torino (TO) - IT
      Tel +39-011.32.72.100 Fax +39-011.32.46.497
      PGP Fingerprint: 75C2 4049 E23D 2FBF A65F 40DB EA5C 11AC C2B0 3647
      Disclaimer: http://atpss.net/disclaimer
      ------------
    • mouss
      ... 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
      Message 2 of 5 , Aug 19, 2008
        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
        >
        > spam@... FILTER spam:
        > notspam@... 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 user@...@..., 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 user@...@...
        is the same as user@... (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.
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.