You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Daniel Chojecki <da...@gmail.com> on 2008/06/24 10:14:56 UTC

sql config problem - need advice

Hello,

we use latest versions of postfix and spamassasin on slackware machines.
Our postfix acts as smtp gateway - no local users. We want to set up
white/blacklists per username. Spammassasin keeps white/black lists in sql.
$GLOBAL definitions are working OK.

Testing scenario:
user1@domain1 is on blacklist for user2@domain2

When i send email from user1@domain1 to user2@domain2 - email is blacklisted
When i send email from user1@domain1 to user2@domain2 and to user3@domain3
(both are in "To:" field), email is delivered to user2@domain2 and
user3@domain3.

Here is user_scores_sql_custom_query:

SELECT preference, value FROM userprefs where username='$GLOBAL' or
username=_MAILBOX_

We also tried with:

SELECT preference, value FROM userprefs where username='$GLOBAL' or
username=_USERNAME_

Any idea ?

Best Regards,
Daniel Chojecki

Re: sql config problem - need advice

Posted by Benny Pedersen <me...@junc.org>.
On Tue, June 24, 2008 10:14, Daniel Chojecki wrote:

> Any idea ?

problem is in mta not in spamassassin, mta sends to more then one to
spamassassin, and scores with one in mind

change this in mta so it just sends always to one recipient at a time, no
matter how many you send to, that fixes the problem you see


-- 
Benny Pedersen
Need more webspace ? http://www.servage.net/?coupon=cust37098

Re: sql config problem - need advice

Posted by mouss <mo...@netoyen.net>.
Daniel Chojecki wrote:
>> blahblah_destination_recipient_limit = 1
>>
>> where blahblah is the transport that is used to pass mail to SA.
>>     
>
> in master.cf i have:
>
> smtp      inet  n       -       n       -       -       smtpd
>         -o content_filter=spamfilter:dummy
>
> and
>
> spamfilter unix - n n - - pipe
>          user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} -- ${recipi
> ent}
>   


you know this is fragile, don't you? Matt's recommendation to use 
amavisd-new is probably your best option.
> in main.cf:
>
> default_destination_recipient_limit = 1
> default_extra_recipient_limit = 1000
> default_recipient_limit = 20000
> lmtp_destination_recipient_limit = $default_destination_recipient_limit
> local_destination_recipient_limit = 1
> qmgr_message_recipient_limit = 20000
> relay_destination_recipient_limit = $default_destination_recipient_limit
> smtp_destination_recipient_limit = 1
> smtpd_recipient_limit = 1000
> virtual_destination_recipient_limit = $default_destination_recipient_limit
>
>   

Please subscribe to the postfix mailing list, and follow the directions in
    http://www.postfix.org/DEBUG_README.html#mail
when asking for help. In particular if you don't show relevant logs, 
don't be surprised if nobody replies to your post.

don't forget to say which postfix version you use:
$ postconf mail_version

you'll probably need to show your master.cf  (in addition to 'postconf 
-n' output).
> and still is not working as expected.
>
> Any idea ?
>   












Re: sql config problem - need advice

Posted by Daniel Chojecki <da...@gmail.com>.
> blahblah_destination_recipient_limit = 1
>
> where blahblah is the transport that is used to pass mail to SA.

in master.cf i have:

smtp      inet  n       -       n       -       -       smtpd
        -o content_filter=spamfilter:dummy

and

spamfilter unix - n n - - pipe
         user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} -- ${recipi
ent}

in main.cf:

default_destination_recipient_limit = 1
default_extra_recipient_limit = 1000
default_recipient_limit = 20000
lmtp_destination_recipient_limit = $default_destination_recipient_limit
local_destination_recipient_limit = 1
qmgr_message_recipient_limit = 20000
relay_destination_recipient_limit = $default_destination_recipient_limit
smtp_destination_recipient_limit = 1
smtpd_recipient_limit = 1000
virtual_destination_recipient_limit = $default_destination_recipient_limit

and still is not working as expected.

Any idea ?

-- 
Best Regards,
Daniel Chojecki

Re: sql config problem - need advice

Posted by mouss <mo...@netoyen.net>.
Daniel Chojecki wrote:
> Hello,
>
> we use latest versions of postfix and spamassasin on slackware machines.
> Our postfix acts as smtp gateway - no local users. We want to set up
> white/blacklists per username. Spammassasin keeps white/black lists in sql.
> $GLOBAL definitions are working OK.
>
> Testing scenario:
> user1@domain1 is on blacklist for user2@domain2
>
> When i send email from user1@domain1 to user2@domain2 - email is blacklisted
> When i send email from user1@domain1 to user2@domain2 and to user3@domain3
> (both are in "To:" field), email is delivered to user2@domain2 and
> user3@domain3.
>
> Here is user_scores_sql_custom_query:
>
> SELECT preference, value FROM userprefs where username='$GLOBAL' or
> username=_MAILBOX_
>
> We also tried with:
>
> SELECT preference, value FROM userprefs where username='$GLOBAL' or
> username=_USERNAME_
>
> Any idea ?
>   

use amavisd-new.

otherwise, set
blahblah_destination_recipient_limit = 1

where blahblah is the transport that is used to pass mail to SA.