-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Sorry to reply to my own message, but I'm trying to get a handle on why the dspam plugin is not behaving nicely.
I've isolated the problem to one line of code, but I'm not really sure why its breaking, any light anyone can shed on this would be really appreciated. I still have yet to determine if 64bit could have anything to do with it (unlikely, since the code looks similar to other dovecot pool allocations) or if the plugin is somehow not compatiable with the CVS version.
I changed the following line of code:
202 list_append(listpool, &siglist)->sig = p_strdup(listpool, signature);
to :
list_append(listpool, &siglist);
siglist->sig = p_strdup(listpool, signature);
#ifdef DEBUG syslog(LOG_INFO, "stored %s into siglist, value is %s ", signature, siglist->sig ); #endif
And I'm seeing the following in my syslog:
Apr 11 14:53:50 uberserver imap: stored 443b702a6341804284693 into siglist, value is <F8><E3>Z Apr 11 14:53:50 uberserver imap: working with signature <F8><E3>Z Apr 11 14:53:50 uberserver imap: in call dspam Apr 11 14:53:50 uberserver imap: /usr/bin/dspam --source=error --stdout
- --class=spam --signature=<F8><E3>Z Apr 11 14:53:50 uberserver dspam[18204]: Unable to determine the destination user Apr 11 14:53:50 uberserver dspam[18204]: DSPAM agent misconfigured: aborting
I don't really see anything wrong in the function that appends to the linked list (list_append) so I'm kinda stuck at this point. Everything should be fairly standard, as I used the configure parameters from the gentoo install and added --without-deliver as I'm using the dovecot LDA as well.
My configure command in case it helps:
./configure --prefix=/usr --host=x86_64-pc-linux-gnu
- --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
- --sysconfdir=/etc --localstatedir=/var/lib --localstatedir=/var
- --disable-debug --enable-ipv6 --without-gssapi --without-ldap --with-mysql
- --with-pam --with-pop3d --without-pgsql --without-vpopmail
- --with-ssl=openssl --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu
- --without-deliver
Thanks again, going to keep digging into this and will report back if i find anything.
Ryan
On Tue, April 11, 2006 12:32 am, Ryan Kolak said:
Hey everyone.. been struggling with building a mailserver and i'm almost done. One of the last pieces is integrating dovecot with dspam so that I'm users can train their spam filters easily (sieve filtering is the last piece left.. that should be interesting.. lol)
Anyway, I think i found an issue with memory allocation, and I'm not sure if its due to changes to the code base or if its a 64 bit memory issue.
When i try to move a message into or out of the spam folder, it fails, and with debugging on, there are strange entries in the syslog.
Added a few more debugging statements, and I get the following showing up:
Apr 11 00:04:41 uberserver imap: found signature 443b336a271581061887518 Apr 11 00:04:41 uberserver imap: working with signature (<E4>Z Apr 11 00:04:41 uberserver imap: in call dspam Apr 11 00:04:41 uberserver imap: /usr/bin/dspam --source=error --stdout
- --class=spam --signature=(<E4>Z Apr 11 00:04:41 uberserver dspam[1361]: Unable to determine the destination user Apr 11 00:04:41 uberserver dspam[1361]: DSPAM agent misconfigured: aborting
The line with the correct signature showing up is simply outputing 'signature' after:
signature = mail_get_first_header(mail, SIGHEADERLINE);
The 'working with signature' that shows the corrupted signature is right before call_dspam is called, and it outputs siglist->sig:
... syslog(LOG_INFO, "working with signature %s ", siglist->sig ); if ((*enh_error = call_dspam (siglist->sig, is_spam))) { ...
This leads me to believe that there's a problem with:
list_append(listpool, &siglist)->sig = p_strdup(listpool, signature);
but I'm really not sure how dovecot deals with allocating pooled memory, as that's what it appears to be doing.
I'm not sure what information might be useful to anyone in helping me look into this and the searches i've been able to do have been unsuccessful.
Thanks in advance,
Ryan
PGP Fingerprint - E15C CC7D 5830 AB8A C2AE 5C5E 80D8 6B63 D40B 015C
PGP Fingerprint - E15C CC7D 5830 AB8A C2AE 5C5E 80D8 6B63 D40B 015C
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEPDLXgNhrY9QLAVwRAqcRAKDJsP33B+bS7wl6NLei/lgdJW24rACeIIKQ 7pgKCSByEz79wYhSF5mxbYo= =QxCm -----END PGP SIGNATURE-----