OK, now you have a reconfigure postfix mail agent. Let's setup it to send and receive mails just for your domain, and realm where your server will send mail, and receive it.

mydomain = setenforce.com I will receive/send mails for this domain
mydestination = $myhostname, $mydomain, localhost

After this you should setup your mail server so looks like you are sending mail from your domain:

myorigin = $mydomain

We will setup some filters in header and body part. First, you will need to define that files, of course, you don't need to remember this , just look at man header_checks

header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks
mime_header_checks = pcre:/etc/postfix/mime_header_checks

Look for selinux for new files. After this, you should make this files. Now is time to add some rules to our setup. All Subject with Email lottery will be reject with bye,bye spam. So you need to change /etc/postfix/header_checks

/^Subject:.*Email lottery/ REJECT bye,bye spam!

Mail attachments with the extensions .doc .xls and .ppt are rejected with the message. Now you will change /etc/postfix/body_checks

/^content-(type|disposition):.*name[[:space:]]*=.*\.(doc|xls|ppt)/ REJECT This is not allowed! There is space after /

Mail whose body text contains the phrase "Bad Credit Can Cost You" should be rejected withthe response "no credit spam permitted." Change /etc/postfix/body_checks

/^(|[^>].*)Bad Credit Can Cost You/ REJECT no credit spam permitted

You want to senders introduce you on good way so use:


You want to do same for others: