Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music

All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => Mail issue , problem , configuration => Topic started by: golfreeze on กุมภาพันธ์ 04, 2014, 03:52:18 PM

Title: postfix block mail จาก header_check
Post by: golfreeze on กุมภาพันธ์ 04, 2014, 03:52:18 PM
#main.cf

header_checks = regexp:/etc/postfix/header_checks

The syntax in the header_checks file is:
/regex_pattern/ ACTION

See a full list of possible actions here

I’m doing three things in the example.
– If the sender’s email address starts with “spammer”, then REJECT it.
– If an email is sent to bob on my server, forward it bob’s real email address
– If the subject contains “Viagra” then discard it.

#/etc/postfix/header_checks

/^From: "spammer/ REJECT
/^To: bob@here.com/ REDIRECT bob@there.com
/^Subject:.*viagra/ DISCARD

#postmap header_checks