Fixed – perl: warning: Setting locale failed – OSX Terminals

When you get this error while running some commands in SSH

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Here is the FIX
Adding the following lines to ~/.bash_profile on my your local machine, the warning should go away:
export LC_CTYPE=en_US.UTF-8

export LC_ALL=en_US.UTF-8

Restart Terminal to work with new settings.

Max OSX Server 5.2 Postfix missing SMTP Logs

Solution 1:

Apple have a new log system in Sierra. It is not using the log files or asl.

The logs are in memory or a log db.


log — Access system wide log messages created by os_log, os_trace and other logging systems.


You can read the smtpd log from terminal with this command.

log show –start “2016-10-16”  –end “2016-10-17” –predicate  ‘process == “smtpd”‘ –debug


Solution 2:

It seems that after an upgrade or a new install the log level of smtp is at such a high level, it does not report anything unless there is a serious error with the smtp server.

Try these commands to get smtp logging going again, worked for me with a couple of servers who did not seem to have any smtp logging enabled, but mail worked and outgoing as well:


sudo serveradmin settings mail:postfix:log_level = “debug”

sudo serveradmin settings mail:postfix:mail_events_log_level = “debug”


Courtesy :


MAC OSX Mail Server – Postfix mail queue

The PostFix mail server, part of OSX Server, is a wonderfully flexible and configurable mail transfer agent. There are many ways that your Postfix message queues can become flooded with illegitimate messages.

Postfix on OSX Server can display the mail queue in terminal.

To see mail queue, enter:
# mailq

How to Delete One Email In Any Queue

postsuper -d MESSAGE_ID

How to Delete Email for a Single User In All Queues

Use the following command to delete the messages from your mail queues. Be sure to substitute ‘youruser@yourdomain\.com’ with the email account which is flooded. Be sure to escape the dot as shown in the example:

postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } / youruser@yourdomain\.com/ { print $1 }' | tr -d '*!' | postsuper -d -

If you mail server is really clogged, this can take hours to execute.

How to Delete All Email or Just In Specific Queues

To delete all deferred messages from a single queue:

postsuper -d ALL deferred

To remove all mail from the queue, enter:

# postsuper -d ALL


Mac-nsurlsessiond-taking up all bandwidth

When i noticed the upload bandwidth usage of my iMac is high, first thing i checked torrents 🙂 nothing running. but my activity monitor looked like this

Screen Shot 2016-05-26 at 7.23.55 AM
Activity Monitor-


nsurlsessiond seems to be running all the time and already uploaded 956MB, wow after searching and reading forums found the culprit.  it is my Photo library


In the new Photos app, go to preferences, and you can choose pause for one day. This will stop the transfer for a day, and you can enable when you are sleeping or whatever.

pause for a day
pause for a day

NB: nsurlsessiond is not only iCloud. If you block it with Little Snitch , you won’t be able to browse some websites or submit any forms.

Screen sharing in OS X Yosemite

osx 10.10

After you installed OS X Yosemite ,  you’ve no doubt been busy exploring its various tools and features. but i was looking specifically for my screen sharing app got missing , I use it everyday for remote login,

whew, after spotlight i got the path, here it is /system/Library/Core Services/Application


osx 10.10
yosemite os x


WP Twitter Auto Publish Powered By :