Your project looks interesting, I would like to help. I can write C and Python on Linux to implement your requirements.
I gave a look to your provided code as well as the stegdetect program. I'm no jpeg or image processing specialist, but I think your project doesn't require that skill. It looks like all you need is calling stegdetect with the proper parameters and handle the results.
While building stegdetect on my Debian Linux threw a number of warnings, in the end the executable seems usable. The github repo does not provide a user guide but I found a man page elsewhere. Invoking stegdetect looks easy, but the sensitivity parameter value may be tricky to define, in order to get acceptable false negatives/positives response. Can you provide the exact call command for stegdetect?
Next, you have a requirement to trigger the process on receiving a mail message. I really don't know if this can be done on remote mail servers, but your provided code got around this by polling the server. Is this a final solution, or you want real triggering on every received message?
And last, there's the user notification. I've seen notification schemes based on demons or background processes the user needs to install; this is highly functional but maybe too complex. Would a notify-send suffice for your project?
If you want to comment further on your project drop me a line thru Chat. I could maybe adjust my bid depending of the work scope. Thanks anyway.