Custom Commands

http://www.trustfm.net/ebooks/DedicatedServer.php

Minimum eight characters, at least one uppercase letter, one lowercase letter and one number:

"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"

Password Restrictions

Minimum eight characters, at least one uppercase letter, one lowercase letter and one number:

Regular expressions passwords must match:              "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"

Minimum eight characters, at least one letter and one number:

"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"

Minimum eight characters, at least one letter, one number and one special character:

"^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"

Minimum 8 and maximum 10 characters, at least one uppercase letter, one lowercase letter, one number and one special character:

"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}"

 Auto reply

 /etc/usermin/forward/autoreply.pl /home/jashwanth/autoreply.txt u1

Admin in Users and Groups

perl /usr/local/pflogsumm/pflogsumm.pl -u 5 -h 5 -d today /var/log/maillog

Mail-Q

mailq|grep ^[A-F0-9]|cut -c 42-80|sort |uniq -c|sort -n|tail

Mail BOX size

du -h --max-depth=1 /home

du -h --max-depth=1 /home | grep G

Antivirus whitelist

File to edit:    /etc/amavisd/whitelist

Command to run after saving:    systemctl restart amavisd.service

OR

Mail reports Today

perl /usr/sbin/pflogsumm -d today /var/log/maillog

OR

perl /usr/local/pflogsumm/pflogsumm.pl -d today /var/log/maillog

Top 5 sender/receiver 

perl /usr/sbin/pflogsumm -u 5 -h 5 -d today /var/log/maillog

File to edit:   /etc/postfix/access  

Command to run after saving:  /usr/sbin/postmap /etc/postfix/access

Mail Forward

File to edit:   /etc/postfix/virtual  

Command to run after saving:  /usr/sbin/postmap /etc/postfix/virtual

User Mail quota

repquota -as

Find Top 10 IP Addresses Accessing Your Apache Web Server

# awk '{ print $1}' access.log.2016-05-08 | sort | uniq -c | sort -nr | head -n 10

Eror LOG

egrep -r '(error|fatal|panic):' /var/log

Mail ERROR

egrep -r '(NOQUEUE|reject|deferred):' /var/log/maillog

SMTP - tracking spammer

grep -i "sasl_username" /var/log/maillog |awk {'print $9'}|sort|uniq -c|sort -n

Restricted Senders Mail - Only sent mail Locally 

File to edit:   /etc/postfix/restricted_senders

 Command to run after saving:  /usr/sbin/postmap /etc/postfix/restricted_senders

Restricted-mail-Groups/ID 

File to edit:   /etc/postfix/restricted-mail-groups

 Command to run after saving:  /usr/sbin/postmap /etc/postfix/restricted-mail-groups

Restricted-Allow-Mail IDs - 

File to edit:   /etc/postfix/allowed-users

 Command to run after saving:  /usr/sbin/postmap /etc/postfix/allowed-users

Users on the LAN

Mail/Domain------Allow/Deny

Auto Mail Forwarding(USERMIN)

“” Thanks for your email. We are closed till July 21, 2015 on occasion of Eid-ul-Fitar and will resume on July 22, 2015. We will get back thereafter .Thanks for your patience.””

Hi,

I will be on leave until 02nd June 2015. Apologies for any inconvenience caused. Kindly communicate with the below responsible.

The responsible are :  Mr. Mohsin (General Manager)

Thank you for your email. I will be out of office from 14 April 2016 to 23 April 2016. During my absence, I will have limited access to mailing system.

If you are sending any urgent email, please copy the same to our Senior Manager Mr. Sk. Md. Tarikul Islam ACA at < smtarik@hodavasi.com > and/or our Mr. Oaliullah at oali@hodavasi.com for necessary action. I will respond to your mail once I return back to office on 24 April 2016, if not earlier.

Thank you & regards.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

TCP Wrappers