sandromello / themis-py Goto Github PK
View Code? Open in Web Editor NEWPostfix milter behavior rate limiter
License: Apache License 2.0
Postfix milter behavior rate limiter
License: Apache License 2.0
Statistics of how many messages a given object sent/receive
import spf into themismilter.py
self.spfStrictRejectFeature should be self.gconf.self.spfStrictRejectFeature
Should not loop through groups if there's any ip address in it
The project must have proper tests to ensure code integrity
Integrate with libdspam: https://pypi.python.org/pypi/pydspam/1.1.9
Redis backend does not support persistence. The config will vanish on a server restart. Should be able to dump the redis data for restoring
mta_hostname and Milter.uniqueID() should be logged into queue ID
Traceback (most recent call last):
File "/usr/sbin/themismilter.py", line 384, in eom
tmetadata.update_features(**self.gconf.as_dict)
File "/usr/lib/python2.7/dist-packages/themis/utils.py", line 16, in as_dict
local_dict = deepcopy(self.dict)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 256, in _deepcopy_dict
for key, value in x.iteritems():
RuntimeError: dictionary changed size during iteration
global_conditions must be specified as '[ [requests, seconds], [...], ...]'
Not as: # [ [seconds, requests], [...], ...]
Need to update docs
themismilter.py and tmscli should have a version command
When creating a new policy, StopHERE attribute isn't properly configured:
tmscli -a --policy exceptions Source myexceptiongroup Destination any JailBy Sender+ JailAction block CountRCPT TRUE JailSpec 1500:3600 Priority 0 StopHERE TRUE
tmscli -g --policy all
{
"exceptions": {
"enable": true,
"jailaction": "block",
"actionheaders": {},
"policy_name": "exceptions",
"onlyheaders": false,
"spf": false,
"blockprobation": 0.5,
"jailspec": [
[
"1500",
"3600"
]
],
"subjectprobation": 0.5,
"jailby": "Sender+",
"ipprobation": 0.5,
"destination": "any",
"replydata": "Limit reached. Blocking for %s second(s)",
"priority": 0.0,
"source": "myexceptiongroup",
"countrcpt": true,
"countsentprobation": 1.0,
"type": "regular",
"stophere": true,
"requestsmon": false
}
}
TODO
A lower priority does not seems to make effect when two policies exists
If a pool policy is executed by a sever, there has to be an option to fallback to common policies. It will permit the creation of generic policies that should be executed by all pools or specific ones.
Should identify when a JailAction is blocking accounts
Integration with time series database (graphite, influxdb, etc).
Redis should be able to store statistics as a time series database.
Groups and Pools must have dependencies. When removing a group or pool that belongs to a policy, must remove the policies associate with the group/pool or return a warning.
Should the system sends a notification if the object reachs certain threshold?
Should be more flexible for blocking accounts:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.