Postfix – subject, from and to log

This is a little trick for Postfix, it lets you log the subject, from and to of all the emails postfix sends (or which pass through it if you run it as a relay). It comes in handy when you need to debug an email issue and need to confirm your mailserver has sent the message.

First create the file /etc/postfix/header_checks and insert this into it:

/^subject:/      WARN
/^to:/           WARN
/^from:/         WARN
/^Subject:/      WARN
/^To:/           WARN
/^From:/         WARN
(more…)

Read More

Notepad++ on Linux

Notepad++ is one of the popular code editors and the fact that most of the users run Windows, it is available for Windows only. Some Linux users have surely missed it. Good news is that Notepad++ is now (unofficially) available as a Snap package for Linux user. Though this Notepad++ Linux application is not natively developed for Linux platform and actually runs on Wine, it’s now a command (or click) away for you.

(more…)

Read More

Enable innodb_file_per_table

innodb_file_per_table is by default ON Mysql 5.6.6 and onwards. There is plenty of stuff on Google about pros & cons ofinnodb_file_per_table.

This post details how to enable innodb_file_per_table on an existing database. Because innodb_file_per_table affects new tables only, created after innodb_file_per_table is enabled, we need to recreate old databases to force innodb_file_per_table on old tables and reclaim some disk space.

Backup First

Create a dir to take backups:

cd ~
mkdir backup
cd backup

(more…)

Read More

Method to install Grub Customizer [Ubuntu/Elementary]

I fresh install of win10 and elementary OS, want customizer. My PC is booting into elementary by default instead of into win10. I use both, but I want o boot into win10 by default. This is method to install Grub Customizer in Loki (maybe in other Ubuntu/Debian Linux OS).

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
grub-customizer

(more…)

Read More

How to Keep Alive SSH Sessions

Many NAT firewalls time out idle sessions after a certain period of time to keep their trunks clean. Sometimes the interval between session drops is 24 hours, but on many commodity firewalls, connections are killed after as little as 300 seconds. To avoid having your SSH sessions become unresponsive after e.g. 5 minutes, do the following:
(more…)

Read More