I have implemented antivirus scanner using milter API.
The messages are tested well. However there is a problem - the system can not add special header!
The error message is
Processing errors occurred during delivery:
Recipient address: ...@....
Reason: Error in sieve filter: Too many addheaders specified
Is it possible somehow to increase the number of allowed addheaders?
PS about version
Oracle Communications Messaging Server 7u5-28.21(18.104.22.168.0) 64bit (built Apr 8 2013)
libimta.so 7u5-28.21 64bit (built 08:49:56, Apr 8 2013)
Using /opt/sun/comms/messaging64/config/imta.cnf (compiled)
SunOS sf240 5.10 Generic_148888-03 sun4u sparc SUNW,Sun-Fire-V240
How many headers do you have? A config snippet would be relevant, I think.
On my setup I see I have a couple addheaders, so more than one is possbible; I don't know of a limit though:
spamfilter2_string_action=data:,require ["addheader"];addtag "[PROBABLE VIRUS DETECTED: $U]";addheader "X-Virus-Status: $U";addheader "X-Virus-Scanned: clamd 0.97.8 at ucs.domain.com";
spamfilter2_null_action=data:,require ["addheader"];addheader "X-Virus-Status: Clean";addheader "X-Virus-Scanned: clamd 0.97.8 at ucs.domain.com";
And I think the tags and headers in my tests were only applied to infected messages, while the checked-clean ones remained unchanged. I am not sure if it is by design or my misconfiguration, we did not pursue this further.
This is a simple problem to solve: All you need to do is specify a larger value for the max_addheaders MTA option in your option.dat file. The default value for
this option is 10, which is why you're running into the limit.
FWIW, I'm going to consider changing things so that system-level sieves are not subjected to this limit. It's really intended to prevent misbehavior in user-level