Hello,
On Tue, 2007-05-08 at 11:41 +0200, Johannes Berg wrote:
Hi,
transaction. Alternatively, enh_error can be set != 0 if call_dspam returns an error which can happen when dspam returns an error code or isn't present.
Yes, I found this. Which is where my patch came from.
Not sure I understand your question now.
Yes, it works only if I have --user USER as mentioned, without any domain stuff.
So I don't have --user given
No, you don't.
(joe, not joe@whatever). Anyway, I think I have fixed the program with two lines of code being changed (depending on the preferred coding style, this may be 1-3 lines...). I will send you the patch later today if I get some spam to test it out on. Basically it amounts to having the first two arguments after the program name to execl to be "--user" and the equivalent to getenv("USER"). (Mine is two lines because I have done char *user=getenv("USER") at the beginning of call_dspam since most people seem to prefer that style instead of having getenv directly in the call to execl.
Usually dspam is able to either pick out the user from the signature (uid in signature setting for dspam) or from the user it's running under. I guess you're running some virtual user setup?
Hmm, with my dspam patched or unpatched (to ignore the domain in the case of patch) this doesn't work for me. I am definitely NOT using virtual users (I have always had problems with doing that on qmail, sendmail and postfix, so I avoid it if possible).
I am running dspam 3.8.0 which is the first version I have actually installed and used.
The point is that you have to (a) when no files exist: move into spam: create a file <sig> with contents "spam" move out of spam: create a file <sig> with contents "notspam"
You said that you in your previous email.
Heh, I was too lazy to dig it up.
(B and C are indeed done.) A doesn't seem to happen.
Well, no, B and C aren't really done either since we never touch any signature-database on disk.
Ok, well, I am meaning that if a message is available and its signature is your code handles everything properly right now (not for a cron job but for immediate action).
Your code complains about no signatures. I will dig into the code a little later and help out with this if you would like. For now, the code should be patched to allow things in the spam folder to be moved out even if their is no signature or the signature has expired (and no longer points to any cache in dspam). Maybe your code already does this. I haven't had a chance to test it yet.
I think it *should* complain about signatures. If you try training such an old message that dspam no longer knows about it, it'll throw an error, and if you have a message without signature then you can't retrain it. I just delete the message in that case, though I suppose if you use a trash folder you'll have to use that configuration..
johannes
I believe we should fix it, if dspam would allow, to learn it as spam using --corpus or what not if that is still available and the appropriate option. However, this wasn't my complaint.
My complaint is that an email which is in SPAM should move out, even if it gives a warning (if that is possible) so that email can be saved. I am not talking about reclassifying things as spam or not spam. Does that make any sense?
Anyway, I hope the patch I sent a moment ago helps. I took the idea from the acl plugin. I am not sure if it works in a virtual environment or not. However, as I said, I haven't been able to get dspam to recognize the user from the signature. Would you mind sharing your dspam.conf file and compile options so I can see if there is something in my setup which is broken. (My compile options are a bit custom, but the dspam.conf is pretty much the suggested on in doc/ for postfix.)
Trever
"In Heaven an angel is nobody in particular." -- George Bernard Shaw (1856-1950)