Initial Home page

ScrumpyJack 2015-12-23 09:27:33 +00:00
commit 6d16d6ac0f

81
Home.md Normal file

@ -0,0 +1,81 @@
# Welcome to the hermes wiki!
## A few bits of information I found useful
### From src/Utils.cpp
decide whether a triplet should be greylisted or not basically it follows this diagram:
<pre>
+------------------------------------------+
| |yes
| whitelisted?(IP or TO or DOMAIN or HOST) |----> don't greylist
| |
+------------------------------------------+
|
| no
|
v
+----------------------------------+
| |yes
| blacklisted? (IP or FROM) |----> greylist
| |
+----------------------------------+
|
| no
|
v
+----------------------------------+
| |yes
| greylisted? (triplet) |----> greylist
| |
+----------------------------------+
|
| no
|
v
don't greylist
</pre>
### The sqlitedb
Hermes only ever writes to the greylist table. All other tables are for the user to fine tune Hermes's behaviour.
For example, to allow all mail from example.com to pass through Hermes unhindered:
<pre>sudo sqlite3 /var/hermes/greylisting.db
SQLite version 3.9.2 2015-11-02 18:31:45
Enter ".help" for usage hints.
sqlite> .tables
allowed_domains_per_ip blacklisted_tos whitelisted_ips
blacklisted_froms greylist whitelisted_tos
blacklisted_ips whitelisted_domains
blacklisted_todomains whitelisted_hostnames
sqlite> insert into whitelisted_domains values ('example.com');
sqlite> select domain from whitelisted_domains;
example.com
</pre>
### Greylist options explained:
<pre>
# greylisting options.
# initial expiry time.
# when email is first recorded, it will expire after this time (in minutes).
initial_expiry = 240
# initial period of time (in minutes) during which a retry on the spammer's side will FAIL.
initial_blacklist = 5
# once we have whitelisted a triplet, how long it stays whitelisted (in days).
# 36 is a magic number, is the maximum days between a day and the same day next month
whitelist_expiry = 36
</pre>
The above options can be translated as follows:
* Hermes will greylist an email based on IP address of sender, RCPT TO: and MAIL FROM:
* That tripet will be greylisted for 4 hours.
* If the tripet is seen again within 5 minutes of initial connection, it will be greylisted again.
* If the tripet is seen again after 5 minutes of initial connection, it will pass unhindered, and will subsequently pass unhindered for the next 36 days.