-
Notifications
You must be signed in to change notification settings - Fork 11
How to use Anti spam Engine in eRisemail
Uplusware edited this page Nov 22, 2017
·
7 revisions
- eRisemail system offers a feature with which user can extend or append the Anti-spam engines.
- Engine is based on C or C++, as the dynamic librarys, a .so file, on Linux.
- Implement the features which you desire based on the framework codes(the code is in antispam directory).
- Compile to generate the engine - a .so file.
- For the security consideration, please stop the eRisemail service.
- Append a record of engine to eRisemail Filter List,
/etc/erisemail/mfilter.xml
- Start the eRisemail service
- This XML file storages all eRisemail Filter engines
- All the engines that are listed will be invoked in any new MTA session (SMTP session) .
- The invoked order follows the order listed in the XML file. libso refers to the path of the engine.
- action means how to handle the spammail:
- TAG will only toggle this mail as a spam, but still recieves and storages the mail.
- DROP will discard spam mail directly .
- param means the paramter for the filter
- Brief
- Initiate the mfilter, invoked by MTA in a new session beginning
- Parameter
- Parameter for this filter
- Return:
- Return a filter's handler
- Brief
- Get the local email domain name
- Parameter
- The handler of the exist filter
- Return
- None
- Brief
- Get the client site's IP in a MTA session
- Parameter
- The handler of the exist filter
- A pointer of the buffer which storage the ip * The length of buffer
- Return
- None
- Brief
- Get the client site's domai nname in a MTA session
- Parameter
- The handler of the exist filter
- A pointer of the buffer which storage the domain name
- The length of buffer
- Return
- None
- Brief
- Get the address of "MAIL FROM"
- Parameter
- The handler of the exist filter
- A pointer of the buffer which storage the address of "MAIL FROM"
- The length of buffer
- Return
- None
- Brief
- Get the address of "RCPT TO"
- Parameter
- The handler of the exist filter
- A pointer of the buffer which storage the address of "RCPT TO"
- The length of buffer
- Return
- None
- Brief
- Get each line of mail body
- Parameter
- The handler of the exist filter
- A pointer of the buffer which storage the mail body
- The length of buffer
- Return
- None
- Brief:
- check the eml file
- Parameter:
- The handler of the exist filter
- A zero teminated string to the eml file path
- The length of path string
- Return:
- None
- Brief
- Get the result of filter
- Parameter
- The handler of the exist filter
- The flag whether the mail is a spam mail. -1 is a general mail, other value is spam mail
- Return
- None
- Brief
- Destory the filter
- Parameter
- The handler of the exist filter
- Return
- None