[Dovecot] dovecot-dspam-integration

Trever L. Adams trever.adams at gmail.com
Tue May 8 12:29:03 EEST 2007


On Tue, 2007-05-08 at 10:36 +0200, Johannes Berg wrote:
> Hi,
> 
> > I understand. I have a few questions about your code. You do a case -3:
> > on enh_error, yet there is NO such entry anywhere in the code.
> 
> Heh. Cruft, I guess. The code has changed a lot over time.
> 

Ok, good enough.

> > Additionally, you check for 0 for a good condition, yet there is no
> > possibility of a changed enh_error value for 0 in call_dspam nor in the
> > function that calls it.
> 
> Cruft too then, or just defensive coding maybe...
> 

Actually, if you consider that cruft, then your code is broken as that
is the condition necessary for it to work.

> > I am getting errors when I try to move things
> > into the spam folder (default case error). DSPAM is installed, it is
> > getting run and if I run it by hand with --user someone (without any
> > domain junk) it runs fine. So, where does the 0 case get it's value
> > where it doesn't show up in call_dspam?
> 
> Have you tried printing out the dspam command line and doing exactly
> that command by hand?
> 
> johannes

Yes, it works only if I have --user USER as mentioned, without any
domain stuff. (joe, not joe at 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.

> 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. (B and C are indeed done.) A
doesn't seem to happen. 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.

Trever Adams
--
"If a revolution destroys a systematic government, but the systematic
patterns of thought that produced that government are left intact, then
those patterns will repeat themselves in the succeeding government." --
Robert M. Pirsig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070508/688d72fc/attachment-0001.pgp 


More information about the dovecot mailing list