Skip to main content

Posts

Install SSL for webmin at Ubuntu 14.04LTS

Webmin has its own webserver called miniserv and default to port 10000. To install a valid SSL, following these steps: 1) Create a file called miniserv.pem by combining the server cert and the key in a single file. A simple concat will do. 2) Copy the CA bundle file to the webmin directory (or you can skip it if it has been installed somewhere) 3) Modify the miniserv.conf file: extracas=/etc/webmin/[CA bundle file name] keyfile=/etc/webmin/miniserv.pem 4) Restart webmin Service stop webmin Service start webmin

Email extract script for mbox

Problem: To extract e-mail address of the incoming mail. Analysis: 1. The e-mail address are stored in .mbox format in macOS. The .mbox for Mac is essentially an archive (can be opened and what is useful in this exercise is the file called filename .mbox). It is a .txt file. 2. Email have standard header info which contains the sender information. e.g. an e-mail header would look something like this: (information masked for privacy) From sender@example.com Fri Dec 16 00:11:30 2016 Delivered-To: recipient@domain.com Received: by IP address with SMTP id hm4csp533342wjb;         Fri, 16 Dec 2016 00:11:30 -0800 (PST) X-Received: by 10.157.51.53 with SMTP id f50mr1243482otc.34.1481875890678;         Fri, 16 Dec 2016 00:11:30 -0800 (PST) Return-Path: Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com. [IP address])         by mx.google.com with ESMTPS id r12...

Ubuntu 16.04 and ISPConfig 3.1 - stopping ClamAV

ClamAV requires quite a bit of resources to run in the background and this usually slows down the mail delivery. In the ISPConfig 3 (Under Perfect Server setup), clamAV is run within Amavis. Therefore, typical removal of clamAV commands will not remove it. When RAM is really low, Linux kills amavis and this will cause mail not being delivered. Therefore, if we run amavis to manage anti-virus and spam, consider a minimum of 2G or 4G RAM VM/Cloud servers. The steps to disable clamav and amavisd are: (1) edit postfix conf - note amavis uses a special port 10024 and 10026. Therefore, if you are not using these ports, consider closing them in your firewall settings. nano /etc/postfix/main.cf # content_filter = amavis:[127.0.0.1]:10024 # receive_override_options = no_address_mappings (2) Under ISPConfig 3.1, comment additional 2 lines nano /etc/postfix/tag_as_foreign.re # /^/ FILTER amavis:[127.0.0.1]:10024 nano /etc/postfix/tag_as_originating.re # /^/ FILTER amavi...

Change hostname Debian Linux

To permanently change the hostname of a Debian Linux machine, perform these steps: 1) nano /etc/hostname 2) nano /etc/hosts 3) /etc/init.d/hostname.sh start If the server has other things that requires update, such as mail server, be sure to edit the config files as well. For example, if there is Postfix, edit the following: /etc/mailname /etc/postfix/main.cf Then execute: /etc/init.d/postfix restart Update: Under Ubuntu Linux 16.04LTS with Aliyun (Alibaba Cloud), use: hostnamectl set-hostname "your FQDN" service hostname restart is not necessary in this case.

MacBook 3rd Party SSD Trim Enable - macOS Sierra

Before Yosemite, I was using a 3rd party app called Trim Enabler to turn on the TRIM command for SSD installed as an upgrade to HDD-based Mac. This is useful to prolong the life of older Macbooks. Yosemite new security model will no longer load the driver. The developer has released a new tool called Disk Sensei (https://www.cindori.org/safely-enable-trim-on-yosemite-and-el-capitan/). The new tool has more bells and whistles and doubled the price (US$19.99). Ouch! With the new version of Mac OS, a new, built-in solution is available. It's free. Under Mac OS X 10.10.4 or above, perform the following steps: 1) Launch Terminal 2) sudo trimforce enable 3) Confirm "yes" two times - Macbook will then reboot It is verified OS X El Capitan works with this function. 2016.10.07 - It is verified also that macOS Sierra final also works!

WordPress 4.5 White Screen of Death

After activating a child theme (that seemed to be incorrectly developed), it first generated an error screen and then the entire site (front-end and back-end) shows white screen. WordPress community has referred this to White Screen of Death. The quick fix to this issue: 1) FTP/SSH to the wp-content/themes directly. 2) Rename the folder of the themes you last selected causing the White Screen of Death 3) Re-login to WordPress site wp-admin 4) Go to Appearance menu and re-activate the last working theme

Improve responsiveness of BlackBerry Priv running Android Marshmallow

I am using a BlackBerry Priv, updated to the latest Android version (6.0.1). It has started to run slower and sometimes lagged. Here is a quick tip to improve the responsiveness. 1) Turn on Developer Options Settings -> About Phone -> Scroll to bottom and tap the Build Number several times. Eventually you will see "You are now a developer!" 2) Settings -> Developer Options Scroll down and turn off the following options (or set them to 0.5x) - Window animation scale - Transition animation scale - Animator duration scale This works on different Android phones: Xiaomi Note (International), Meizu m1 note (International), Xiaomi RedNote 4