I get 'bad file descriptor' errors with amavisd-new and Razor2
S. Namèche (seb at gaia anet fr) notes:
While using Spamassassin with amavisd-new, Razor2 check is disabled. In debug mode, we have this message :
razor2 check skipped: Bad file descriptor
You have to run "razor-admin -create" as the user who is running the amavisd-new daemon in order to create Razor directory (~/.razor) and to discover Razor servers.
For example :
# su - amavis -c "razor-admin -create"
Mark Hazen (markh at markh com) adds"
This solves the first bundle of errors, but running via "spamd -u amavis -D" the error persists. A deeper investigation of the error reveals the following:
razor2 check skipped: Bad file descriptor Insecure dependency in open while running with -T switch
at /usr/local/lib/perl/5.6.1/Razor2/Client/Config.pm line 414, <GEN2> line 1.
This is a known issue, and there exists a patch. Please see the following page for details, and a link to grab the patch: