Email Filter

Create SMTP Filter for Email accounts in Exim

You can create  Exim filter on per account base. So that the emails on that account will be filtered or Exim. 

You may need good knowledge on Exim filter to create an smtp level filters.  Creating wrong filters may affect your exim mail server. 

We recommend to  use filter on Round Cuber Webmail .  Please read more about from  Round cube filters

Location of Account Filter:

/var/eenos/userdata/USER/mail/accountfilter/DOMAIN/EMAIL_NAME , where

Example Create an Email SMTP Filter in Eenos

We are  going to  create and  smtp filter for the email account  myemail@foo.com whch is owned by the Eenos user fun. So the data is as follows,

Location of Account filter  :   /var/eenos/userdata/fun/mail/accountfilter/foo.com/myemail

Now create the  Filter as follows: 

mkdir -pv /var/eenos/userdata/fun/mail/accountfilter/foo.com
touch /var/eenos/userdata/fun/mail/accountfilter/foo.com/myemail
chown -R eenos:eenos /var/eenos/userdata/fun/mail/accountfilter

Now add the following  example exim filter code to block all email from a domain  blockthis.com

# Exim filter
if
    $header_from: contains "@blockthis.com"
then
    testprint "Messages from this domain is blocked." 
    seen finish
endif

Remember all Exim filters need to start with the following line

# Exim filter

 

 

 

 

 


Revision #1
Created 17 October 2023 16:51:53 by Eenos Official Editor
Updated 17 October 2023 17:04:37 by Eenos Official Editor