0

I want to log a hash value of all emails handled by my mail-server. I found in amavis README.customize.gz the following line:

The substitution text for the following simple macros is built-in:
[...]
- to be used in forming a notification mail body or log entry:
[...]
b  message digest of a mail body: digest calculated by MD5 algorithm,
   encoded as hex digits, high nybble first;

I am not familiar with perl and I am also new to amavis. I can not find out how I can enable this option in which file do I have to make which entry?

Ulli
  • 97
  • 2
  • 9

1 Answers1

3

In amavisd.conf there is a line up at the top of the file $log_templ= you will want to add %b to that, it will include the MD5 hash of the email in the log. You will probably want to read the README.customize a bit more, because you will be redefining how amavisd logs.

This is one I've found, it's not impossible to understand, you'd just need to add the %b somewhere near the end. You may also want to set $log_level = 0;

$log_templ = ' [? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], # <%o> -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c, SA TESTS: %T';

NickW
  • 10,263
  • 1
  • 20
  • 27