Leonardo Rodrigues Magalhães wrote: > Hello Guys, > > i have a postfix box with amavis. ALL messages passes through > amavis, there's no exception for content_filter setting on postfix. > > i would like to have a full email report, which, intentionally, > would give me for each message: > > 1) sender > 2) recipient or recipients in case of CCs > 3) subject > 4) message size > 5) name and mime-type of attachments, if present >
The default Passed/Blocked template ($log_templ) includes your 1, 2, and 4. You can customize $log_templ to include additional fields. The default will look like: ...(28512-01) Passed CLEAN, [10.0.0.1] [10.0.0.1] <[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]>, Message-ID: <[EMAIL PROTECTED]>, mail_id: HaFyQiWxVGg, Hits: -2.78, size: 2047, queued_as: BC2B13664F3, 4055 ms But by including the subject header field in $log_templ, you can turn your Passed/Blocked line into : ...(28512-01) Passed CLEAN, [10.0.0.1] [10.0.0.1] <[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]>, Message-ID: <[EMAIL PROTECTED]>, mail_id: HaFyQiWxVGg, Hits: -2.78, size: 2047, queued_as: BC2B13664F3, Subject: "A SUB TEST", 4055 ms So, we have covered your 1 - 4, but not 5. I don't know that the mime info can be included in log_templ, but it is available in the log just before the Passed/Blocked line. Basically, you can match the amavis process ID of your Passed/Blocked line with the level 2 output pNNN lines: ... (28512-01) p001 1/1/1 Content-Type: text/plain, size: 2749 B, name: Note that these process IDs are reused, so you have to limit your search. See the amavis.conf-sample log file for an example of $log_templ. MrC > > i have tried getting this from postfix logs, but i couldnt. i can > have some header/body checks with WARNING and logs somethings, but my > tries were completly wasted on trying to get all that information together. > > Question is .... > > i know amavisd have all this informations, some of them even easier > than postfix, like name and mime-type of attachments, which can be seen > on logs with log_level=2. > > would it be possible to have all these informations parsed from > amavisd logs and presented in a easy way ? It can be a comma-delimited > or tab-delimited text, no problem. I can convert it to HTML, the raw > information would be enough. > > no problem if some log_level tweaking would be needed to acchieve > this goal. > > Thanks. > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ AMaViS-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
