Skip to main content


Showing posts from August, 2021

How to change default system email for root@hostname for Postfix in CentOS 7?

By default, any system email is generated by system is sent to root@hostname or system-user@hostname . So critical server errors, log errors, corn jobs alerts etc. all are sent to this default email address. Most likely you want to receive all the emails from different daemons and system components not to the user ‘root ’ but in another user that has access to emails.  To change it to different appropriate email id, we can do this by two ways.  Step 1: To do this, open /etc/aliases with your favourite editor and navigate to the end of the file. You will find something like this: # vi /etc/aliases root: To add multiple email ids, we can simply separate them by comma. root:, Run the aliases command, to compile aliases file. # newaliases # service postfix restart Step 2: We can simply create .forward file to the folder root and add email address there. # vi /root/.forward serveradmin@awsmo

How to install unrar with Clamav for MailScanner?

The unrar command is used to extract, list or test archive files only .ClamAV will need unrar, it can be installed from rpmforge repository , so: # cd /usr/local/src/ # wget # rpm -ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm # yum update -y # yum install unrar # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag Note: RPMForge is now RepoForge & might be outdated. There is no updates since very long time. After installing unrar, Disabled rpmforge repo:  # sed -i 's/enabled = 1/enabled = 0/g' /etc/yum.repos.d/rpmforge.repo # yum update -y Viruses are commonly spread as attachments to email messages. Install the following packages for Amavis to extract and scan archive files in email messages such as .7z, .cab, .doc, .exe, .iso, .jar, and .rar files. # yum install arj bzip2 cpio file gzip nomarch spax unrar p7zip unzip zip lrzsz lzip lz4 lzop FreshClam Setup:  freshclam will update the virus signatur

How to Secure Postfix/Dovecot on CWP Email Server on CentOS 7?

At first I would like thank to CWP team for their great effort at $11.99. It has corporate mail features better than Cpanel and others. BTW It's my personal opinion. CWP team has changes many options on Postfix and Dovecot Configuration. It is very important to secure Postfix & Dovecot for Production server that will never expose your internal office or user home network. I did some little research and studies a lot to learn Postfix & Dovecot configuration. Lets Explain my scenario:  I have a VPS and it has two IPs. Both IP has valid PTR records . You must configure a valid FQDN for your IPs. My Details are below:  My Primary Domain:  Server FQDN :  ---  (IP for Shared Hosting) Sub-Domain   :  ---  (IP for sending Outgoing Email) Now build your Mail Server with the following options that mentioned in below snapshot You can follow the link to Build your own CWP Mail Server How to Bu