On 1/4/2015 10:40 PM, J.J. Day wrote:
Hi Kevin,

Thanks for the link. It's a starting point. As far as the two functions are concerned, I was just hoping to short cut the process of finding them.

Actually, I am a pretty good programmer in half a dozen languages - it's just that I have never used Perl. Since the problem isn't an overlooked parameter setting, it looks like I will have to add Perl to the library unless the mimedefang people can provide an existing hook.
Happy to help. However, if you can program, then I think you are tackling to much at once.

My approach would be:

Stage 1: get SpamAssassin working with MD (look at one of the default milter examples for Windows)
Stage 2: get SA working with MD with an sa_object

At the top of your filter:

if ($Features{"SpamAssassin"}) {
    #$SALocalTestsOnly = 1;  # I do NOT want network tests
    $SALocalTestsOnly = 0;  # I DO want network tests

    #REMOVED PER DFS BUT NOT REALLY SURE WHY ;-)
    #spam_assassin_init()->compile_now(1) if defined(spam_assassin_init());

    #Switched to $sa_object as returned by SA per DFS
    $sa_object = spam_assassin_init() if defined(spam_assassin_init());
}


Stage 3: then add the few extra lines to switch to a different user hard coded to a specific user Stage 4: Add logic for the username that that you need with good use of the md_syslog function for logging

Programming for MD requires a bit of ground work so read the mimedefang filter example and the mimedefang-filter man page

Also, if you are going to discuss programming in MD on the MD list, you really need to post the error you get along with things like your filter. You didn't give us much to go on but as mentioned, this is the wrong list anyway, just lots of crossover with SA and MD.

Good luck!

Regards,
KAM

Reply via email to