Hello everybody
I just added a new Filtering functionnality to XMail : Mandatory Filtering
Currently, XMail can filter messages based on :
the user
or, if no user filters .tab file exist
the domain [<domain>.tab
or, if no user or domain filters .tab files exist
default filters [defaultfilter.tab]
So if you want to define global filters to apply to ALL messages and want
also to define specific filters (on user or domain) you have to add your
'global' filters in each user/domain/default filters you created to be sure
they will be executed.
It can be a problem if you, as me, have many domains and users !!! (cause of
errors/omission when coping filters defs from files to files) and want
systematic execution of certain filters, as av filters, ...
So, with my patch, you have just to create a new 'mandatory.tab' file in the
<MAILROOT>/filters/ directory, content syntax exactly as current filters
.tab files (see doc), and place in this mandatory.tab file the list of
filters you want Xmail to execute before any other message processing
(before user/domain/default filters and others processes).
Here are the three files modified BASED ON XMail 0.68 :
<<SMAILSvr.cpp>> <<SMAILUtils.cpp>> <<SMAILUtils.h>>
Just recompile xmail (use a copy of original xmail 0.68 source codes),
replace xmail binary (save previous !!!), and run ;-)
CAUTION :
- BASED ONLY ON XMAIL 0.68 !!!
- NOT FULLY DEBUGGED but at this time i had no problems, so test before
final use and fedd-back any problems !!
Perhabs Davide, can you implement this feature in new releases, and
optimize/modify it as well ?
This is just a very small modification !!! 99% of code is from existant code
!!! Thanks to Davide
Francis
SMAILSvr.cpp
SMAILUtils.cpp
SMAILUtils.h