Remove or hide client sender IP from Postfix on SMTP relay

Sometimes we need to hide our IP address for security, if we use Cloudflare we need to create separate email server so our IP site origin will keep hidden.

The following is how to to remove client sender IP (X-Originating-IP) from Postfix generated email header and the only available data is IP from our email server.

Open /etc/postfix/ and find:

cleanup   unix  n       -       n       -       0       cleanup

Add below those line and become:

cleanup   unix  n       -       n       -       0       cleanup
  -o header_checks=pcre:/etc/postfix/header_checks

Edit /etc/postfix/header_checks and add below codes:

/^Received:/ IGNORE

Now restart postfix. Let say on CentOS:

service postfix restart

Check Disk Health Status When Using Hardware RAID

I have several boxes using RAID controller from LSI brands. And of course, sometimes we need to know important information about our disks, let say disk health status.

When using Software RAID then the command is very simple, eg:

smartctl -a /dev/sda

However, when using a hardware RAID, the command is slightly different:

# Physical drive information
MegaCli -PDList -aALL

# Outputting device ID
MegaCli -PDList -aALL | grep "Device Id"

# Smartctl test
smartctl -a -d sat+megaraid,#DeviceID /dev/sd[a-z]

Note: the RAID controller is MegaRAID LSI.