[Dspam-devel] About how to properly obtain a signature from LIBDSPAM 3.10.x
Brought to you by:
paulcockings,
sbajic
From: Helio L. Jr <hel...@gm...> - 2014-08-22 14:19:42
|
Hi folks, in the documentation I have found the example04: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CTX = dspam_create (USERNAME, NULL, dspam_home, DSM_CLASSIFY,//DSM_PROCESS DSF_SIGNATURE| DSF_NOISE); ( ... some more code ...) if (CTX->signature == NULL) { printf ("No signature provided\n"); } else { /* Copy to a safe place */ SIG.data = malloc (CTX->signature->length); if (SIG.data != NULL) memcpy (SIG.data, CTX->signature->data, CTX->signature->length); } SIG. length = CTX->signature->length; ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- but when I try to print out what the signature is (as pure text, a char array): ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- printf("Signature returned by dspam= %s",CTX->signature); ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- it prints unrecognisable characters and the strlen(CTX->signature) returns 0 How can I get the signature from DSPAM, using LIBDSPAM? Helio Luchtenberg Junior. |