Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

amavisd-release not working after upgrade to 10.9 Mavericks

I just upgraded from 10.8 to 10.9 and the amavisd services suddenly started making most of the messages as containing a virus and quarantining them into the /Library/Server/Mail/data/scanner/quarantine directory. I stopped the services for virus pocessing on the messages which has stopped the quarantine from happening, but I can not get the messages to release back into the mail queue using amavisd-release to reprocess the ones that were already moved.


This is what I get when i run amavisd-release from the terminal...


amavisd-release banned-fX3ORr9nexcG

Can't connect to UNIX socket /var/amavis/amavisd.sock: No such file or directory at /Applications/Server.app/Contents/ServerRoot/usr/bin/amavisd-release line 260.


Any ideas as to how to get it working?

Posted on May 17, 2014 1:00 PM

Reply
20 replies

May 19, 2014 3:40 PM in response to JCinTX

I think you have another amavisd.conf file floating around your server. Maybe even another amavisd launchdaemon. Run these:


sudo find / -f -name amavisd.conf


sudo find / -f -name amavisd.plist


Each command will take a while because its looking through the whole HDD.


Something is telling the server to look in the wrong place for the sock file.

May 20, 2014 2:57 PM in response to TigerKR

Ok, that did take a while to run. I had to drop the -f operator to get it to run without error, so I'm not sure it gets the same result. I think maybe the structure is "-f path /" according to the man file, but I still got an error (see last attempt). Maybe I need to do somehting special notation wise for root directory besides the "/"? Here's what it kicked out...


bash-3.2# sudo find / -f -name amavisd.conf

find: -f: unknown primary or operator

bash-3.2# sudo find / -name amavisd.conf

find: /dev/fd/3: Not a directory

find: /dev/fd/4: Not a directory

/Library/Server/Mail/Config/amavisd/amavisd.conf

/Library/Server/Migrated/private/etc/amavisd.conf

/private/etc/amavisd.conf

/Volumes/Macintosh HD2/Library/Server/Mail/Config/amavisd/amavisd.conf

/Volumes/Macintosh HD2/Library/Server/Migrated/private/etc/amavisd.conf

bash-3.2# sudo find / -name amavisd.plist

find: /dev/fd/3: Not a directory

find: /dev/fd/4: Not a directory

bash-3.2#

bash-3.2# sudo find -f path / -name amavisd.plist

find: path: No such file or directory

find: /dev/fd/3: Not a directory

find: /dev/fd/4: Not a directory

bash-3.2#


To me it looks like I do have a duplicate of amavisd.conf in the one on the /private/etc really should not be there should it? The Volume ...HD2 is my backup drive - so that copy is ok I think. Not sure about the one in Migrated, i think that is a remanent of the OS upgrade.

May 21, 2014 4:55 AM in response to JCinTX

Ack, it should have been:


sudo find / -type f -name amavisd.conf

sudo find / -type f -name org.amavis.amavisd.plist


On my server, I've only got one amavisd.conf (other than my backups):


/Library/Server/Mail/Config/amavisd/amavisd.conf


which has the lines:


$MYHOME = '/Library/Server/Mail/Data/scanner/amavis'; # a convenient default for other settings, -H

$TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T

$unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter


And:


/Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/org.am avis.amavisd.plist


which has the line:


<string>/Library/Server/Mail/Config/amavisd/amavisd.conf</string>


My installation was a fresh install with web and email data migrated and hooked back into fresh settings. So that appears the be the Apple approved setup for 10.9.


I would:


sudo mv \ /Library/Server/Migrated/private/etc/amavisd.conf \ /Library/Server/Migrated/private/etc/amavisd.conf.bak

sudo mv \ /private/etc/amavisd.conf \ /private/etc/amavisd.conf.bak


Then I would make sure:


/Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/org.am avis.amavisd.plist


points to:


<string>/Library/Server/Mail/Config/amavisd/amavisd.conf</string>


If you have any other org.amavis.amavisd.plist files, I'd use "sudo launchctl unload -w" to unload all of them.


Then:


sudo /bin/launchctl unload -w /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/org.a mavis.amavisd.plist

sudo /bin/launchctl load -w /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/org.a mavis.amavisd.plist


And watch your logs.

May 21, 2014 3:37 PM in response to TigerKR

Ok, whew - finally got it working. Thank you TigerKR for your time and help with this!!!


I did like you suggested and renamed all the old file to *.bak and reloaded everything thru launchctl, but it was still stuck with the same error. However, I finially found the bit of code I had to change thanks to you pointing out where your amavisd.sock file was.


I changed line 83 in the /Applications/Server.app/Contents/ServerRoot/usr/bin/amavisd-release file where it had...

$socketname = '/var/amavis/amavisd.sock';


I changed it to match what you had found where your amavisd.sock file was located. So it now reads...

$socketname = '/Library/Server/Mail/Data/scanner/amavis/amavisd.sock';


Then amavisd-release ran, but I got a different error at that point that had...

Invalid quarantine ID: /Library/Server/Mail/data/scanner/quarantine/banned-fX3ORr9nexcG

amavisd-release version 2

Usage: $ amavisd-release mail_file [secret_id [alt_recip1 alt_recip2 ...]]

or to read request lines from stdin: $ amavisd-release -



So I had to copy the banned file from the quarantine folder to the virusmails folder - since that was the path called out in the /Library/Server/Mail/config/amavisd/amavisd.conf file variable on the line that reads ...

$QUARANTINEDIR = '/Library/Server/Mail/Data/scanner/virusmails'; # -Q


Even then amavisd-release still would not work when typing the full pathname. So I changed directories into the /Library/Server/Mail/Data/scanner/virusmails directory and ran the command from there with no path names...and finnaly got it to work.

amavisd-release banned-fX3ORr9nexcG

250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 72EC66806C21

amavisd-release not working after upgrade to 10.9 Mavericks

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.