Re: [vchkpw] running sa-learn from valias

2006-11-07 Thread Tom Collins

On Nov 7, 2006, at 4:51 AM, andrej wrote:
are you sure its not working (adding the mail to spam/ham)? My  
guess is

that the mail is still in the queue and cannot be delivered because
after running your script its stuck because it has no more  
instructions

on what to do with it. That should be easy to test by adding a valid
mailbox (of fiddling with the script return code, but thats behind my
qmail knowledge ;). Let me know if it works.


It might be because your script to add it to the spam/ham database  
doesn't use an exit code that qmail-local understands.


From `man qmail-command`:

   command’s  exit  codes  are  interpreted  as follows: 0 means  
that the
   delivery was successful; 99 means that the  delivery  was   
successful,
   but  that qmail-local should ignore all further delivery  
instructions;
   100 means that the delivery failed permanently (hard error);  
111 means
   that  the  delivery failed but should be tried again in a  
little while

   (soft error).

What do you see in the qmail-send log when a message goes through the  
process?


--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/




Re: [vchkpw] running sa-learn from valias

2006-11-07 Thread andrej
> So I assume I setup the aliases wrong? I tried setting the ownership of the 
> scripts to vpopmail, playing with permissions.
> 
> I see the messages I send to [EMAIL PROTECTED] in the queue. (So, a related 
> qmail question: how do I tell what reason a message is in the queue?)
> 
I guess this question is not really a vpopmail question so you might
consider moving it to the qmail mailinglist.anyway my 2 cents ;)

are you sure its not working (adding the mail to spam/ham)? My guess is
that the mail is still in the queue and cannot be delivered because
after running your script its stuck because it has no more instructions
on what to do with it. That should be easy to test by adding a valid
mailbox (of fiddling with the script return code, but thats behind my
qmail knowledge ;). Let me know if it works.

|/root/bin/learnham
./Maildir/

cheers
andrej




Re: [vchkpw] running sa-learn from valias

2006-11-07 Thread Jake Vickers




Quinn Comendant wrote:

  I'm trying to create an alias that pipes a message to sa-learn. I've created the alias:

[EMAIL PROTECTED]/1 ~]$valias -s strangecode.com | grep spam
[EMAIL PROTECTED] -> |sa-learn --ham --no-sync
[EMAIL PROTECTED] -> |sa-learn --spam --no-sync


That didn't work, so I tried this:

[EMAIL PROTECTED]/1 ~]$valias -s strangecode.com | grep spam
[EMAIL PROTECTED] -> |/root/bin/learnham
[EMAIL PROTECTED] -> |/root/bin/learnspam


And those scripts are something like:

[EMAIL PROTECTED]/1 ~]$cat /root/bin/learnham 
#!/bin/sh
sa-learn --spam --no-sync -D &> /tmp/learnspam.log

And they work fine is fed spam directly...

[EMAIL PROTECTED]/1 ~]$bin/learnspam <
  
...spam here...

  
  EOF

[EMAIL PROTECTED]/1 ~]$head /tmp/learnspam.log
[8532] dbg: logger: adding facilities: all
...
Learned tokens from 1 message(s) (1 message(s) examined)


So I assume I setup the aliases wrong? I tried setting the ownership of the scripts to vpopmail, playing with permissions.

I see the messages I send to [EMAIL PROTECTED] in the queue. (So, a related qmail question: how do I tell what reason a message is in the queue?)

Thanks!
Quinn


  

You would probably find this easier to do with maildrop and mailfilter.




[vchkpw] running sa-learn from valias

2006-11-06 Thread Quinn Comendant
I'm trying to create an alias that pipes a message to sa-learn. I've created 
the alias:

[EMAIL PROTECTED]/1 ~]$valias -s strangecode.com | grep spam
[EMAIL PROTECTED] -> |sa-learn --ham --no-sync
[EMAIL PROTECTED] -> |sa-learn --spam --no-sync


That didn't work, so I tried this:

[EMAIL PROTECTED]/1 ~]$valias -s strangecode.com | grep spam
[EMAIL PROTECTED] -> |/root/bin/learnham
[EMAIL PROTECTED] -> |/root/bin/learnspam


And those scripts are something like:

[EMAIL PROTECTED]/1 ~]$cat /root/bin/learnham 
#!/bin/sh
sa-learn --spam --no-sync -D &> /tmp/learnspam.log

And they work fine is fed spam directly...

[EMAIL PROTECTED]/1 ~]$bin/learnspam < ...spam here...
EOF

[EMAIL PROTECTED]/1 ~]$head /tmp/learnspam.log
[8532] dbg: logger: adding facilities: all
...
Learned tokens from 1 message(s) (1 message(s) examined)


So I assume I setup the aliases wrong? I tried setting the ownership of the 
scripts to vpopmail, playing with permissions.

I see the messages I send to [EMAIL PROTECTED] in the queue. (So, a related 
qmail question: how do I tell what reason a message is in the queue?)

Thanks!
Quinn