SA Bugzilla – Bug 5471
The personal whitelist is not used when we send a mail to a whitelited person and another whitelisted on not person
Last modified: 2007-05-25 05:46:56 UTC
If I have on my personal witheList (not in the general white list)the mail of V W X and Y ,and Y send a mail to: me, X and V. In this case the mail is tagged as spam. But if Y send the same mail (only) to me and X it works, the mail is not tagged. The problem look like to appear when I receive a mail from a whiteListed person and the mail have also in cc or to another whiteListed person. Do you have an idea? Thanks Salvo
> The problem look like to appear when I receive a mail from a whiteListed person > and the mail have also in cc or to another whiteListed person. Multiple recipients all handled by the same server, right? > Do you have an idea? Going with my above assumption, it's your milter/amvaisd/mail-scanner/whatever. Refer to the documentation or mailing lists for whatever you're using. Closing as WORKSFORME. Feel free to re-open if my assumption is incorrect.
My description was not correct. I try whit a concrete example 1 case) Karin white list a personal mail (@bluewin.ch) karin send a mail whit the personal mail (isb-sib.ch) to Karin personal mail and me (I'm not in the whitelist) salvo.paesnao@isb-sib.ch I can read this on the log: executing SQL: select preference, value from userpref where username = 'globaluser' or username = '@GLOBAL' order by username asc The mail is taged spam 2 case) Karin white list a personal mail (@bluewin.ch) karin send a mail only to the personal mail (isb-sib.ch) to Karin personal mail I can read this from the log: onfig: Conf::SQL: executing SQL: select preference, value from userpref where username = 'sonesson' or username = '@GLOBAL' order by username asc the mail is not taged SPAM. The only difference I see is that in the first case the sql don't use a username of karin For info header and log: first case: Header: Return-Path: <sonesson@bluewin.ch> Received: from mail.isb-sib.ch ([unix socket]) by mail.isb-sib.ch (Cyrus v2.3.1-Invoca-RPM-2.3.1-2.6) with LMTPA; Fri, 18 May 2007 16:48:42 +0200 X-Sieve: CMU Sieve 2.3 Received: from expasy-ng.isb-sib.ch (expasy-ng.isb-sib.ch [192.33.215.142]) by mail.isb-sib.ch (8.13.1/8.13.1) with ESMTP id l4IEkteL015898 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 18 May 2007 16:46:55 +0200 Received: from mail29.bluewin.ch (mail29.bluewin.ch [195.186.18.70]) by expasy-ng.isb-sib.ch (8.12.10/8.12.8) with ESMTP id l4IEjlDx000805; Fri, 18 May 2007 16:45:48 +0200 Received: from lps2zhh.bluewin.ch (195.186.19.192) by mail29.bluewin.ch (Bluewin 7.3.121) id 4649A36B000DA487; Fri, 18 May 2007 14:45:47 +0000 Received: from lps2zhh (localhost [127.0.0.1]) by lps2zhh.bluewin.ch (Postfix) with ESMTP id 06097690; Fri, 18 May 2007 14:45:48 +0000 (GMT) Message-ID: <33457197.851441179499548021.JavaMail.webmail@lps2zhh.bluewin.ch> Date: Fri, 18 May 2007 14:45:48 +0000 (GMT) From: "sonesson@bluewin.ch" <sonesson@bluewin.ch> Reply-To: sonesson@bluewin.ch To: karin.sonesson@isb-sib.ch Subject: test4 Cc: salvo.paesano@isb-sib.ch MIME-Version: 1.0 Content-Type: text/plain;charset="UTF-8" Content-Transfer-Encoding: 7bit X-FXIT-IP: 129.194.8.73 X-sib-ng-MailScanner-Information: Please contact the ISP for more information X-sib-ng-MailScanner: Found to be clean X-sib-ng-MailScanner-From: sonesson@bluewin.ch X-Spam-Status: No, score=4.2 required=5.5 tests=BAYES_50,TVD_SPACE_RATIO autolearn=no version=3.2.0 X-Spam-Report: * 2.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% * [score: 0.5043] * 2.2 TVD_SPACE_RATIO BODY: TVD_SPACE_RATIO X-Spam-Level: **** X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on mail.isb-sib.ch X-sib-mail-MailScanner-Information: Please contact the ISP for more information X-sib-mail-MailScanner: Found to be clean X-sib-mail-MailScanner-From: sonesson@bluewin.ch LOG: May 18 16:46:55 mail sendmail[15898]: l4IEkteL015898: from=<sonesson@bluewin.ch>, size=1029, class=0, nrcpts=2, msgid=<33457197.851441179499548021.JavaMail.webmail@lps2zhh.bluewin.ch>, proto=ESMTP, daemon=MTA, relay=expasy-ng.isb-sib.ch [192.33.215.142] May 18 16:46:55 mail spamd[11157]: spamd: connection from localhost [127.0.0.1] at port 36337 May 18 16:46:55 mail spamd[11157]: config: Conf::SQL: executing SQL: select preference, value from userpref where username = 'gl obaluser' or username = '@GLOBAL' order by username asc May 18 16:46:55 mail spamd[11157]: config: retrieving prefs for globaluser from SQL server May 18 16:46:55 mail spamd[11157]: info: user has changed May 18 16:46:55 mail spamd[11157]: bayes: using username: globaluser May 18 16:46:55 mail spamd[11157]: bayes: database connection established May 18 16:46:55 mail spamd[11157]: bayes: found bayes db version 3 May 18 16:46:55 mail spamd[11157]: bayes: Using userid: 1 May 18 16:46:55 mail spamd[11157]: config: score set 3 chosen. May 18 16:46:55 mail spamd[11157]: message: line ending changed to CRLF May 18 16:46:55 mail spamd[11157]: message: main message type: text/plain May 18 16:46:55 mail spamd[11157]: spamd: processing message <33457197.851441179499548021.JavaMail.webmail@lps2zhh.bluewin.ch> f or globaluser:104 May 18 16:48:43 mail sendmail[16164]: l4IEkteL015898: to=sonesson,paesano, delay=00:01:48, xdelay=00:00:01, mailer=cyrusv2, pri=151029, relay=localhost, dsn=2.0.0, stat=Sent 2nd case header Return-Path: <sonesson@bluewin.ch> Received: from mail.isb-sib.ch ([unix socket]) by mail.isb-sib.ch (Cyrus v2.3.1-Invoca-RPM-2.3.1-2.6) with LMTPA; Fri, 18 May 2007 17:04:00 +0200 X-Sieve: CMU Sieve 2.3 Received: from expasy-ng.isb-sib.ch (expasy-ng.isb-sib.ch [192.33.215.142]) by mail.isb-sib.ch (8.13.1/8.13.1) with ESMTP id l4IF0j0d017796 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for <Karin.Sonesson@mail.isb-sib.ch>; Fri, 18 May 2007 17:00:45 +0200 Received: from mail29.bluewin.ch (mail29.bluewin.ch [195.186.18.70]) by expasy-ng.isb-sib.ch (8.12.10/8.12.8) with ESMTP id l4IExVDx002138 for <karin.sonesson@isb-sib.ch>; Fri, 18 May 2007 16:59:31 +0200 Received: from lps2zhh.bluewin.ch (195.186.19.192) by mail29.bluewin.ch (Bluewin 7.3.121) id 4649A36B000DB0D8 for karin.sonesson@isb-sib.ch; Fri, 18 May 2007 14:59:31 +0000 Received: from lps2zhh (localhost [127.0.0.1]) by lps2zhh.bluewin.ch (Postfix) with ESMTP id E5ABD5C1 for <karin.sonesson@isb-sib.ch>; Fri, 18 May 2007 14:59:31 +0000 (GMT) Message-ID: <25473520.852991179500371937.JavaMail.webmail@lps2zhh.bluewin.ch> Date: Fri, 18 May 2007 14:59:31 +0000 (GMT) From: "sonesson@bluewin.ch" <sonesson@bluewin.ch> Reply-To: sonesson@bluewin.ch To: karin.sonesson@isb-sib.ch Subject: teset5 MIME-Version: 1.0 Content-Type: text/plain;charset="UTF-8" Content-Transfer-Encoding: 7bit X-FXIT-IP: 129.194.8.73 X-sib-ng-MailScanner-Information: Please contact the ISP for more information X-sib-ng-MailScanner: Found to be clean X-sib-ng-MailScanner-From: sonesson@bluewin.ch X-Spam-Status: No, score=-95.8 required=5.0 tests=BAYES_50,TVD_SPACE_RATIO, USER_IN_WHITELIST autolearn=no version=3.2.0 X-Spam-Report: * -100 USER_IN_WHITELIST From: address is in the user's white-list * 2.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% * [score: 0.5263] * 2.2 TVD_SPACE_RATIO BODY: TVD_SPACE_RATIO X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on mail.isb-sib.ch X-sib-mail-MailScanner-Information: Please contact the ISP for more information X-sib-mail-MailScanner: Found to be clean X-sib-mail-MailScanner-From: sonesson@bluewin.ch LOG: May 18 17:00:45 mail sendmail[17796]: l4IF0j0d017796: from=<sonesson@bluewin.ch>, size=1096, class=0, nrcpts=1, msgid=<25473520.852991179500371937.JavaMail.webmail@lps2zhh.bluewin.ch>, proto=ESMTP, daemon=MTA, relay=expasy-ng.isb-sib.ch [192.33.215.142] May 18 17:00:45 mail spamd[13803]: spamd: identified spam (25.4/5.5) for globaluser:104 in 2.4 seconds, 31342 bytes. May 18 17:00:45 mail spamd[13803]: spamd: result: Y 25 - BAYES_99,DYN_RDNS_AND_INLINE_IMAGE,EXTRA_MPART_TYPE,FH_HOST_EQ_D_D_D_D,FORGED_MUA_OUTLOOK,HTML_IMAGE_ONLY_24,HTML_MESSAGE,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RCVD_IN_XBL,RDNS_DYNAMIC,URIBL_JP_SURBL,URIBL_SBL scantime=2.4,size=31342,user=globaluser,uid=104,required_score=5.5,rhost=localhost,raddr=127.0.0.1,rport=37395,mid=<cea6e01c7995d$5290fb70$6400a8c0@ismbjude2>,bayes=1.000000,autolearn=spam May 18 17:00:45 mail spamd[13803]: config: copying current conf from backup May 18 17:00:45 mail spamd[5786]: prefork: ordered 16152 to accept May 18 17:00:45 mail spamd[5786]: prefork: sysread(8) not ready, wait max 300 secs May 18 17:00:45 mail spamd[5786]: prefork: child 16152: entering state 2 May 18 17:00:45 mail spamd[5786]: prefork: new lowest idle kid: none May 18 17:00:45 mail spamd[16152]: spamd: connection from localhost [127.0.0.1] at port 37400 May 18 17:00:45 mail spamd[16152]: config: Conf::SQL: executing SQL: select preference, value from userpref where username = 'sonesson' or username = '@GLOBAL' order by username asc May 18 17:00:45 mail spamd[16152]: config: retrieving prefs for sonesson from SQL server May 18 17:00:45 mail spamd[16152]: config: failed to parse line, skipping, in "(no file)": use_dcc 1 May 18 17:00:45 mail spamd[16152]: info: user has changed May 18 17:00:45 mail spamd[16152]: bayes: using username: globaluser May 18 17:00:45 mail spamd[16152]: bayes: database connection established May 18 17:00:45 mail spamd[16152]: bayes: found bayes db version 3 May 18 17:00:45 mail spamd[16152]: bayes: Using userid: 1 May 18 17:00:45 mail spamd[16152]: config: score set 3 chosen. May 18 17:00:45 mail spamd[16152]: message: line ending changed to CRLF May 18 17:00:45 mail spamd[16152]: message: main message type: text/plain May 18 17:00:45 mail spamd[16152]: spamd: processing message <25473520.852991179500371937.JavaMail.webmail@lps2zhh.bluewin.ch> for sonesson:104 May 18 17:04:01 mail sendmail[18393]: l4IF0j0d017796: to=sonesson, delay=00:03:16, xdelay=00:00:01, mailer=cyrusv2, pri=121096, relay=localhost, dsn=2.0.0, stat=Sent
Notice in the second message that the Received headers say "for karen.sonnesson@...)" and you don't see that in the first message. What is happening is that when mail arrives that is addressed to more than one address that is local to your system, only one copy is processed until finally multiple copies are delivered, one to each local recipient address. This is more efficient than making multiple copies of the mail first and then fully processing and delivering each copy. But there are tradeoffs. One of the tradeoffs is that it becomes no longer possible to use an individual user's SpamAssassin preferences when there is more than one local user in the recipient list. That's because the SpamAssassin scanning is done before separate copies of the message are made for final delivery. What you are seeing is not the result of anything that SpamAssassin has done. It has to do with the way your MailScanner is set up to call SpamAssassin to use a specific user's preferences when there is only one user to choose, but to call it using a global user ID when there is no one unambiguous user id to use. In your first example, MailScanner has no way to decide whether to use karen.sonnesson's SpamAssassin preferences or to whether use salvo.paesano's prefrences, so it can't choose either one. If you want to always use a user's preferences and don't mind the extra resource costs, you could change to invoking SpamAssassin in procmail scripts. Procmail is part of the delivery and always comes after mail to multiple local people has been split into a copy for each individual. I'm closing this again as "invalid", the category for "not a SpamAssasssin bug".
thanks for the help and sorry...