I think you may be able to do some of this with Bitdefender scanner for unices and kmail combination - have a look at BD's help file. (I use BD, but have never tried to scan mail - gmail does that...