{"id":1202,"date":"2014-01-06T15:16:42","date_gmt":"2014-01-06T09:46:42","guid":{"rendered":"http:\/\/carmatec.com\/?p=1202"},"modified":"2014-01-06T15:16:42","modified_gmt":"2014-01-06T09:46:42","slug":"how-to-discard-spam-emails-in-exim","status":"publish","type":"post","link":"https:\/\/www.carmatec.com\/blog\/how-to-discard-spam-emails-in-exim\/","title":{"rendered":"HOW TO: Discard spam emails in Exim"},"content":{"rendered":"

We can discard spam emails like citibank, paypal, hsbc etc from and to our server both incoming and outgoing emails.<\/p>\n

 <\/p>\n

Login to your cpanel server.<\/p>\n

Main => Service Configuration => Exim Configuration Manager<\/p>\n

Under Filter Section
\n\/etc\/cpanel_exim_system_filter_custom .By default this will be \/etc\/cpanel_exim_system_filter but this filter will be gone once you do a exim upgrade. So it is better to use a custom name.<\/p>\n

Exim filters based on Subject:
\n========================
\nif<\/p>\n

$header_subject: contains \u201cviagra\u201d<\/p>\n

then<\/p>\n

seen finish<\/p>\n

endif
\n========================
\nif<\/p>\n

$header_subject: contains \u201c***SPAM***\u201d<\/p>\n

then<\/p>\n

seen finish<\/p>\n

endif
\n========================
\nExim Filter Based on to Address<\/p>\n

if (<\/p>\n

$received_protocol is \u201clocal\u201d or<\/p>\n

$received_protocol is \u201cesmtpa\u201d<\/p>\n

) and (<\/p>\n

$header_from contains \u201c@ebay.co.uk\u201d)<\/p>\n

then<\/p>\n

seen finish<\/p>\n

endif<\/p>\n

========================<\/p>\n

if (<\/p>\n

$received_protocol is \u201clocal\u201d or<\/p>\n

$received_protocol is \u201cesmtpa\u201d<\/p>\n

) and (<\/p>\n

$header_from contains \u201c@paypal.com\u201d)<\/p>\n

then<\/p>\n

seen finish<\/p>\n

endif<\/p>\n

========================<\/p>\n","protected":false},"excerpt":{"rendered":"

We can discard spam emails like citibank, paypal, hsbc etc from and to our server both incoming and outgoing emails.   Login to your cpanel server. Main => Service Configuration => Exim Configuration Manager Under Filter Section \/etc\/cpanel_exim_system_filter_custom .By default this will be \/etc\/cpanel_exim_system_filter but this filter will be gone once you do a exim […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1202","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/posts\/1202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/comments?post=1202"}],"version-history":[{"count":0,"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/posts\/1202\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/media?parent=1202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/categories?post=1202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.carmatec.com\/wp-json\/wp\/v2\/tags?post=1202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}