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 upgrade. So it is better to use a custom name.
Exim filters based on Subject:
========================
if
$header_subject: contains โviagraโ
then
seen finish
endif
========================
if
$header_subject: contains โ***SPAM***โ
then
seen finish
endif
========================
Exim Filter Based on to Address
if (
$received_protocol is โlocalโ or
$received_protocol is โesmtpaโ
) and (
$header_from contains โ@ebay.co.ukโ)
then
seen finish
endif
========================
if (
$received_protocol is โlocalโ or
$received_protocol is โesmtpaโ
) and (
$header_from contains โ@paypal.comโ)
then
seen finish
endif
========================