Tech tips & other words

Tag: Mac OS X Server (Page 1 of 3)

Clear Mac OS DNS cache via command line

The method for clearing or flushing the local cache in Mac OS has changed over the years. Here are all the Mac OS versions on one page that details how to clear Mac OS DNS cache via command line.

TLDR; Add this alias to your .zshrc file:

alias flushdns="sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;say 'cache flushed' -v Tessa -r 229"

Then issue this command:

source ~/.zshrc

And now you can run this command and get nice audio confirmation:

flushdns

Clear your DNS cache on macOS Tahoe 26, macOS Sequoia 15, macOS Sonoma 14, macOS Ventura 13, macOS Monterey 12, macOS Big Sur 11, macOS 10.15 Catalina, macOS 10.14 Mojave, macOS 10.13 High Sierra, macOS 10.12 Sierra, OS X 10.11 El Capitan, OS X 10.10 Yosemite, OS X 10.9 Mavericks, OS X 10.8 Mountain Lion, OS X 10.7 Lion, OS X 10.6 Snow Leopard, and OS X 10.5 Leopard using the following Terminal commands:

Continue reading

Fix SpamAssassin Error on Mavericks Server 3

Every once in awhile Apple’s shitty Server 3 throws errors that prevent SpamAssassin from processing new spam. The error shows up when I run spam trainer. The error it throws looks like:

ERROR: Bayes dump returned an error, please re-run with -D for more information
bayes: cannot open bayes databases /Library/Server/Mail/Data/scanner/amavis/.spamassassin/bayes_* R/O: tie failed: Permission denied

Fix it by issuing these commands from Terminal:

sudo chown -R amavisd:amavisd /Library/Server/Mail/Data/scanner/amavis/.spamassassin/
sudo chmod u+rw /Library/Server/Mail/Data/scanner/amavis/.spamassassin/bayes_seen
sudo chmod u+rw /Library/Server/Mail/Data/scanner/amavis/.spamassassin/bayes_toks

Adding SSL certificate to Mavericks Server 3 on Mac OS X 10.9

I wanted to add a cheap SSL certificate to my Mac OS X Mavericks 10.9.1 server. I purchased a Comodo PositiveSSL certificate for $9 from Namecheap.com.

After generating the signed certificate request using the Server.app tool, I followed their directions and finally got the certificate. But after installing it, Server.app and Keychain both reported that “this certificate was signed by an unknown authority.”

What gives?

Well, simply put, Mac OS X doesn’t recognize PositiveSSL as a certificate authority. So I needed to import their root certificate. Here’s how.

In Keychain.app, search for your certificate based on the hostname that it’s assigned. Double click that cert, and scroll down to find the PositiveSSLCA2.crt. Click the link, which will download the cert. Then double click the downloaded .crt file and add it to your system keychain. Voila. All is well. Adding SSL certificate to Mavericks Server Is a piece of cake!

Test whether outbound port is open on Mac OS X 10.9, 10.8, 10.7

Wondering if a certain outbound port on your Mac is open or closed? Here’s a way to determine outbound open ports on Mac OS using netcat via the command line in terminal. We’ll use  using a free service from portquiz.net.

From the terminal, enter:

nc -v portquiz.net 443

where 443 is the port number you want to test.

Control-c will kill net cat after you get the info you want.

Easy-peasy. You can now determine outbound open ports on Mac OS.

Create a Dropbox clone on Mac OS X Mavericks using OwnCloud

My company uses Dropbox extensively for sharing project files. It truly is an enhancement to our workflow. But, we don’t like the privacy concerns of hosting our contracts and other confidential information in their cloud, nor do we like the cost. We like everything else.

OwnCloud is an open source alternative to Dropbox, and provides the same features.

I decided to install it on our Mac mini server to give it a trial run. Here’s how I did it:

Continue reading

« Older posts