On Sun, 06 Jun 2010 14:54:14 -0600 Ben <bugrepor...@vescentphotonics.com> wrote:
> > > there is no "=" between "--user" and "bugreporter" and probably you want to > > add an "/" infront of the dspam command. The whole line should be: > > cat emailmessage | /usr/bin/dspam --source=error --class=innocent --user > > bugreporter > > Wow. Opps. Thanks! That totally was my problem. Didn't see that --user > was different format than --source and --class. So that fixed my main > problem. > > > > I also tried: > > > > > > dspam-retrain unix - n n - 10 pipe > > > flags=Ru user=dspam argv=/usr/local/bin/dspam-retrain $nexthop $sender > > > $recipient > > > > > > where /usr/local/bin/dspam-retrain is from > > > http://dspamwiki.expass.de/DspamRetrainScript > > > > > That script is not able to cope with spam@ or h...@. If you want that > > script to work then change the script or change the sender to > > spam-....@.... or ham-...@.... Just alone h...@... or s...@.... will not be > > processed correctly with the above script. > > Can you explain that a little more why this won't work. I have a > transport defined for postfix: > > s...@spam.com dspam-retrain:spam > h...@ham.com dspam-retrain:innocent > Because the source code from that old web page is telling me that it can not work: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= if ($recip =~ /^(spam|ham)-(\w+)@/) { # username is part of the recipient $user = $2; } elsif ($sender =~ /^(\w+)@/) { # username is in the sender $user = $1; } else { print "Can't determine user\n"; exit 75; # EX_TEMPFAIL } =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= See that first line? The regex that checks for "spam-.....@" or for "ham-....@". So regardless what you have in your transport... it is not going to work. The Perl script will prevent you from getting it to work with the recipient just having (ham|spam)@... So if you use that Perl script the recipient will not match the regex and will not be used as user. The sender will be then used. The script will however always use just the local part. In my case that would horrible since I use the full email address as the username. So for me the script would not be good enough. > I believe that this causes spam or ham to be delivered to dspam-retrain > Right. > with the first argument spam or innocent which is then passed to the > --class arugment of dspam. > Correct. > I had to edit my dovecot-antispam to get the from correctly (now that I > know I can get success via the command line -- thanks again) and the > script runs without errors, so I think it is right (anything to check -- > my test bed doesn't get spam yet). Also, is it important to run that > script to scrub the headers, or can (should?) I just pipe the email > directly into dspam as I posted earlier (with the --user= mistake)? > I don't understand what header you want to scrub? For retraining DSPAM just needs a DSPAM signature. That's it. > Thanks again! > > Ben > -- Kind Regards from Switzerland, Stevan Bajić ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Dspam-user mailing list Dspam-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-user