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[22435]: 11E4FA9A012:
to=<20745@xyz.molar.is>, orig_to=<20780@xyz.molar.is>, 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..
...blablaba...
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
/var/quarantine directory
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??).
~Rolan