Mac OS X Server v10.5: Mail Server and ClamAV may not start with Security Update 005-2009 installed

After installing the Security Update 005-2009 in Mac OS X Server v10.5, Mail Server and ClamAV may not start up.

These messages may appear the system.log:

org.clamav.freshclam6111 com.apple.console Notice ERROR: Incorrect argument format for option --checks (-c) 
com.apple.launchd[1] com.apple.console Warning (org.clamav.freshclam6112) Exited with exit code: 1 
com.apple.launchd[1] com.apple.console Warning (org.clamav.freshclam) Throttling respawn: Will start in 10 seconds
This article has been archived and is no longer updated by Apple.

Note: It is not necessary to stop the Mail Server before completing the following tasks.

  1. Open Server Admin.
  2. Choose Mail-> Settings->Filters.
  3. At the bottom of the window look for "Update the virus database __ times per day." Make note of the number of times the database is updated.
  4. If "Update the virus database __ times per day" is enabled, leave it on.
  5. Open Terminal.
  6. Execute the following command:
    sudo nano /System/Library/LaunchDaemons/org.clamav.freshclam.plist
    (The following steps can be performed in any text editor that will save plain text, or in Property List Editor, but you must be logged in as root to edit the org.clamav.freshclam.plist in a graphical application. You can also copy the file to the desktop, edit it, and copy it back to the original location.)
     
  7. Enter your admin password when prompted.
  8. Locate the following text:
        <key>ProgramArguments</key>
               <array>
                       <string>freshclam</string>
                       <string>-d</string>
                       <string>-c #n</string>
               </array>
    
    Note: "#n" denotes a numeric value that will match the value noted in Server Admin->Mail->Settings->Filters' "Update the virus database __ times per day".
     
  9. On the line that states "<string>-c #n</string>", remove the space between the "c" and the number sign (#) following it.
  10. Edit the #n numeric value. This value determines how many time a day ClamAV will run freshclam to update its virus definition database. This can be any number from 1 (once per day) to 50 (every 29 minutes).
  11. Save the changes (press Control-O).
  12. Press Control-X to quit nano.
  13. Execute the following two commands to unload and reload the org.clamav.freshclam.plist:
        sudo launchctl unload /System/Library/LaunchDaemons/org.clamav.freshclam.plist
        sudo launchctl load /System/Library/LaunchDaemons/org.clamav.freshclam.plist
    

ClamAV should now update normally.

Once the /System/Library/LaunchDaemon/org.clamav.freshclam.plist has been modified, you should not use the Server Admin->Mail->Setting->Filters' "Update the virus database [x] times per day" to change the update frequency. Changes made in Server Admin will cause the org.clamav.freshclam.plist to be rewritten and in some cases may cause the space that was removed to reappear.

Important: Information about products not manufactured by Apple is provided for information purposes only and does not constitute Apple’s recommendation or endorsement. Please contact the vendor for additional information.
Published Date: