Search This Blog

Showing posts with label Backup. Show all posts
Showing posts with label Backup. Show all posts

Friday, February 2, 2018

Postfix qmgr process causes heavy overload on RHEL 6

A RHEL 6 Server running some web service not Email service.

This morning found under heavy I/O delay.

Try check it out by:
free -m
vmstat 1
top
  wa  --order by wait I/O

The Postfix qmgr process causes heavy overload, which doesn't make any sense to me.

Have to check the mail queue.
mailq | wc -l

which give me over 40K queued emails.

by reading them, here is same example:
Message  2:
From root@PRODUCTION.localdomain  Thu Feb  2 16:41:01 2018
Return-Path: <root@PRODUCTION.localdomain>
X-Original-To: root
Delivered-To: root@PRODUCTION.localdomain
From: root@PRODUCTION.localdomain (Cron Daemon)
To: root@PRODUCTION.localdomain
Subject: Cron <root@PRODUCTION> /usr/local/check_status.pl
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Date: Thu,  2 Feb 2018 16:41:01 -0400 (EST)
Status: RO

It turn's out that one of the cron job runs every minute did not have a proprietary MAIL to settings.
Before:

MAILTO=root
HOME=/

* * * * *   root /usr/local/check_status.pl

I changed after:

MAILTO=""
HOME=/

* * * * *   root /usr/local/check_status.pl >/dev/null 2>&1

Then purge all old emails both postfix queue and local mail:
$ postfix -d ALL

$ mail
& delete *
& q

Just want make it more clean, I try to remove the postfix package:
# chkconfig
# service postfix status
# service postfix stop
# chkconfig postfix off
# chkconfig

# yum erase postfix
But it also want remove
cronie
cronie-anacron
crontabs

Which I still want it.

The cron require at lease one MTA on system.
Because we had smart host Email internal.
I did install my favorite SSMTP inside of sendmail.

First Backup the /etc/postfix
# cp -r /etc/postfix ~/etc_postfix_backup

# yum install ssmtp
# yum erase postfix

Setup the /etc/ssmtp/ssmtp.conf, did small test.

Everything looks good.

Please notice the server is not serve as an EMail server.

Reference:

Sunday, March 21, 2010

Best Online Backup Solution: mozy.com

Best Online Backup Solution Mozy hold By EMC

Every Database/System/Storage Engineer knows EMC.
And they bought Mozy.com for $76 million.

I would say online storage/ Cloud Storage is the future.
$4.95/month with unlimited space and upload/download coast, there is nothing better than this for my Home Server ( with about 2 TB personal files).

And with EMC's support, I will give it a 5 start from the secure side.

Only thing is there is no Linux client right now.
Hope it coming soon.