I encountered a problem with anomy would attempt to filter
out worms and virii from emails. The error on the logs were:
Jan 21 10:01:40 mail postfix/pipe: 11E4FA9A012:
to=<firstname.lastname@example.org>, orig_to=<email@example.com>, relay=maildrop,
delay=0, status=deferred (temporary failure. Command output: Can't use
an undefined value as a symbol reference at
/usr/local/anomy/bin/Anomy/Sanitizer.pm line 1038. maildrop: error
writing to filter. /usr/local/bin/maildrop: Unable to filter message. )
the error is not very descriptive, but after playing around I was able to
replicate the error when running the command below (NOT as root)
cat virusmsg | ./bin/sanitizer.pl anomy.conf..
Can't use an undefined value as a symbol reference at
/usr/local/anomy/bin/Anomy/Sanitizer.pm line 1038.
most likely a permissions problem..
As it turns out.. that was the issue.
anomy did not have permissions to save the attachment to the
A quick fix was to first "chmod 777 /var/quarantine", send the virus
through the mail server,
then observe the owner of the quarantined file (in my case postfix).
Then change the ownership
of the directory to that user, and finally clean up permissions for the
directory (chmod 750??).