Faruque Ahmed : MCP, MCSA, MCSE, MCTS, MCIT, CCNA, OCA, OCP, GCP
--
# vi /etc/postfix/main.cf
alias_database = hash:/etc/postfix/aliasesalias_maps = hash:/etc/postfix/aliasestransport_maps = hash:/etc/postfix/transportvirtual_maps = hash:/etc/postfix/virtualvirtual_alias_maps = hash:/etc/postfix/virtualvirtual_alias_domains = hash:/etc/postfix/virtualheader_checks = pcre:/etc/postfix/header_checks# header_checks = regexp:/etc/postfix/header_checksmime_header_checks = pcre:/etc/postfix/block_attachments# mime_header_checks = regexp:/etc/postfix/block_attachmentsbody_checks = pcre:/etc/postfix/body_checks# body_checks = regexp:/etc/postfix/body_checkssender_bcc_maps = hash:/etc/postfix/sender_bccrecipient_bcc_maps = hash:/etc/postfix/recipient_bcc
Where:
rhs stands for right-hand side, i.e, the domain name.
reject_rhsbl_helo makes Postfix reject email when the client HELO or EHLO hostname is blacklisted.
reject_rhsbl_reverse_client: reject the email when the unverified reverse client hostname is blacklisted. Postfix will fetch the client hostname from PTR record. If the hostname is blacklisted, reject the email.
reject_rhsbl_sender makes Postfix reject email when the MAIL FROM domain is blacklisted.
reject_rbl_client: This is an IP-based blacklist. When the client IP address is blacklisted, reject the email.
#############################################################################################
-- -------- karnaF------RBL BEST------------OLD
reject_rbl_client list.dsbl.org,
#############################
systemctl enable postfix
systemctl restart postfix
-------------------------------------------
# vi /etc/postfix/header_checks
/^Subject:/ WARN
/^Received:/ IGNORE
/^X-Originating-IP:/ IGNORE
/^x-cr-[a-z]*:/ IGNORE
/^Thread-Index:/ IGNORE
/etc/postfix/header_checks
cat /etc/postfix/header_checks
/^Received:/ IGNORE /^User-Agent:/ IGNORE /^X-Mailer:/ IGNORE/^X-Originating-IP:/ IGNORE /^x-cr-[a-z]*:/ IGNORE /^Thread-Index:/ IGNORE/Payment status/ REDIRECT junk.mail@worldcm.net
# vi /etc/postfix/body_checks
### allow pflogsumm reports through postfix (body_checks file) ###
/^ {6,11}[[:digit:]]{1,6}[ km]/ OK# Requires PCRE version 3.~^[[:alnum:]+/]{60,}$~ OK/^[A-Za-z0-9+\/=]{4,76}$/ OK/^ {4}blocked using/ OK# vi /etc/postfix/aliases
all: :include:/etc/postfix/all
sales: sales,babul,mosharraf,apon
# vi /etc/postfix/virtual
kalam@worldcm.net kalam@gsuite.worldcm.net
# vi /etc/postfix/access
####------ -Cloud--------------####
gmail.com OKgoogle.com OKhotmail.com OKyahoo.com OKaol.com OKoutlook.com OKlive.com OKmicrosoft.com OKaccesstel.net OK178.238.235.73 OK173.249.38.32 OK5.189.129.215 OK--