[Mimedefang] Calling filter_game_over before cleaning up temp directory

Kelly Jones kelly.terry.jones at gmail.com
Wed Oct 29 10:10:41 EDT 2008


I want to define/call the Perl function filter_game_over just before
line ~2557 in mimedefang.c:

if (rm_r(ctx, data->dir) < 0) {

In other words, I want a function that's ALWAYS called when the client
disconnects, regardless of how that disconnect happened or how far the
client got in the SMTP transaction.

Is this an easy hack? Skimming the code, I see MXCommand() is somehow
involved, and mimedefang-multiplexor.c has fixed values for many
commands:

#define NO_CMD      -2
#define OTHER_CMD   -1
#define SCAN_CMD     0
#define RELAYOK_CMD  1
#define SENDEROK_CMD 2
#define RECIPOK_CMD  3
#define NUM_CMDS     (RECIPOK_CMD+1)

I realize that system("/path/to/my/perl/code.pl") might work, since I
could use the files in the current directory to figure out what
mimedefang had done, but that seems ugly.

Thoughts?

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.



More information about the MIMEDefang mailing list