On Tue, 1 Apr 2008 15:42:45 +0200
Alexei Troussov <[EMAIL PROTECTED]> wrote:

> >> Hello,
> 
> >> I'm trying to configure DSPAM as a spam filter on my home FreeBSD 7  
> >> box
> >> already having Postfix and Cyrus IMAP up and running:
> >> --> Postfix                Postfix --> Cyrus IMAP as  
> >> mailbox_transport
> >>       \->LMTP-> DSPAM ->SMTP-^
> > Looks like my configuration, except I use maildrop and Courier.
> > As for postfix-dspam setup I now use it like this:
> >
> > smtpd_recipient_restrictions =
> > ...
> > check_client_access pcre:/usr/local/etc/postfix/dspamd_filter_access,
> > .....
> >
> > $ cat /usr/local/etc/postfix/dspamd_filter_access
> > /./   FILTER lmtp:[127.0.0.1]:24
> >
> >> My problem is that I cannot make DSPAM handle messages properly -
> >> there is no dspam-related headers appearing in my emails. But there
> >> are dspam piping messages in logs (for the second configuration).
> 
> > 1. Use dspam as a daemon:
> > echo 'dspam_enable="YES"' >> /etc/rc.conf.local
> > 2. Enable debugging
> > echo 'dspam_debug="YES"' >> /etc/rc.conf.local
> > 3. Turn on debugging in /usr/local/etc/dspam.conf
> > (Debug / DebugOpt directives -- this assumes you chose DEBUG in  
> > OPTIONS
> > screen)
> >
> > Restart your dspam instance:
> > /usr/local/etc/rc.d/dspam restart
> >
> > Send an email message to your mailserver and take a look in
> > /var/log/dspam/dspam.debug
> >
> > Post the relevant except from your mail log and your dspam.debug.
> 
> 
> OK, now I did:
> 
> #grep dspam /etc/rc.conf
> dspam_enable="YES"
> dspam_debug="YES"
> 
> #cd /usr/local/etc/postfix
> #cat filter_access
> /./ FILTER lmtp:unix:/var/run/dspam.sock
> #postmap /usr/local/etc/postfix/filter_access

You don't need to run postmap over it since you're using it as pcre,
not as db-type file.

> #cat main.conf
>        ...skipped...
> smtpd_recipient_restrictions = permit_sasl_authenticated,
>   permit_mynetworks,
>   reject_unauth_pipelining,
>   reject_non_fqdn_recipient,
>   reject_unknown_recipient_domain,
>   permit_sasl_authenticated,
>   reject_unauth_destination,
>   permit_auth_destination,
>   reject_non_fqdn_hostname,
>   reject_non_fqdn_sender,
>   reject_invalid_hostname,
>   hash:/usr/local/etc/postfix/access,

^^^^^^^^^^^
This doesn't look good, copy/paste problem ? What are you trying to
achieve here ?

>   check_client_access pcre:/usr/local/etc/postfix/filter_access
>        ...skipped...

OK

> #grep -v ^# access
> 192.168.0.0/16  OK
> 127.0.0.1       OK
> 
> #cat master.conf
>        ...skipped...
> smtp      inet  n       -       n       -       -       smtpd
>        ...skipped...
> cyrus     unix  -       n       n       -       -       pipe
>    user=cyrus argv=/usr/local/cyrus/bin/deliver -r ${sender} -m $ 
> {extension} ${user}
>        ...skipped...
> 127.0.0.1:10027 inet  n -       n       -       -        smtpd
>    -o content_filter=
>    -o smtpd_authorized_xforward_hosts=127.0.0.0/8
>    -o smtpd_client_restrictions=
>    -o smtpd_helo_restrictions=
>    -o smtpd_sender_restrictions=
>    -o smtpd_recipient_restrictions=permit_mynetworks,reject
>    -o mynetworks=127.0.0.0/8
>    -o receive_override_options 
> no_unknown_recipient_checks,no_header_body_checks
>        ...skipped...

OK

> 
> #cat ../dspam.conf
>        ...skipped defaults...
> Debug *
> DebugOpt process classify spam fp

OK.

> Opt out
> DeliveryHost        127.0.0.1
> DeliveryPort        10027
> DeliveryIdent       MYDOMAIN.NAME.HERE
> DeliveryProto       SMTP

OK

> Trust root
> Trust mail
> Trust mailnull
> Trust smmsp
> Trust daemon
> Trust dspam # user fo dspam
> Trust nobody
> Preference "showFactors=on"
> Preference "signatureLocation=headers"
> Preference "spamAction=tag"
> Preference "spamSubject=[SPAM]"
> AllowOverride spamAction spamSubject
> Broken case
> Broken lineStripping
> ServerPID              /var/run/dspam.pid
> ServerMode      standard
> ServerPass.Relay1       "secret123"
> ServerParameters        "--deliver=innocent,spam"
> ServerIdent             "MYDOMAIN.NAME.HERE"
> ServerDomainSocketPath  "/var/run/dspam.sock"
> ClientIdent     "[EMAIL PROTECTED]"
> ClientHost      /var/run/dspam.sock
> PgSQLServer     127.0.0.1
> PgSQLPort       5432
> PgSQLUser       dspam
> PgSQLPass       changeme123
> PgSQLDb         dspam
> PgSQLConnectionCache    3
> PgSQLUIDInSignature     on
>        ...skipped defaults...
> #/usr/local/etc/rc.d/dspam restart
> #/usr/local/etc/rc.d/postfix reload
> 
> Now I sent an email to some account '[EMAIL PROTECTED]' and got  
> this in logs:
> #tail -f /var/log/maillog
> Apr  1 15:39:20 erley postfix/smtpd[190]: connect from fg- 
> out-1718.google.com[72.14.220.156]
> Apr  1 15:39:20 erley postfix/smtpd[190]: 7C29950C1: client=fg- 
> out-1718.google.com[72.14.220.156]
> Apr  1 15:39:20 erley postfix/cleanup[193]: 7C29950C1: message-id=<[EMAIL 
> PROTECTED] 
>  >
> Apr  1 15:39:20 erley postfix/qmgr[99814]: 7C29950C1: from=<[EMAIL PROTECTED] 
>  >, size=1923, nrcpt=1 (queue active)
> Apr  1 15:39:20 erley postfix/pipe[195]: 7C29950C1: to=<[EMAIL PROTECTED] 
>  >, relay=cyrus, delay=0.35, delays=0.21/0.03/0/0.12, dsn=2.0.0,  
> status=sent (delivered via cyrus service)
> Apr  1 15:39:20 erley postfix/qmgr[99814]: 7C29950C1: removed
> Apr  1 15:39:50 erley postfix/smtpd[190]: disconnect from fg- 
> out-1718.google.com[72.14.220.156]

Your postfix doesn't pass the email to dspam. Something is taking
precedence over the check_client_access.

> Nothing was logged in /var/log/dspam

 [ .. ]

Indeed, since postfix didn't pass the email to dspam.

So this is actually a postifx question, not a dspam one :)

Please post 'postconf -n' output.


-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"
FreeBSD committer -> [EMAIL PROTECTED], PGP Key ID 057E9F8B493A297B

Attachment: signature.asc
Description: PGP signature

Reply via email to