47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
define(`TITLE', `Children Protection for Postfix-based EMail-Server')
|
||
define(`DATE', `2013-06-27')
|
||
define(`CONTENT', `
|
||
This small tool implements a whitelist on a Postfix mail-server. It prevents certain recipient addresses (your kids ones) from receiving mail from any not whitelisted address. Any mail from not whitelisted senders is redirected to a delegate (a parent).
|
||
|
||
Code is here <a href="http://files.a385e-5.de/files/ChildProt-0.9.tar.gz">http://files.a385e-5.de/files/ChildProt-0.9.tar.gz</a>
|
||
|
||
Configure it by adding this line into the <em>master.cf</em> of the Postfix installation:
|
||
<pre>childprot unix - n n - 25 spawn user=mail argv=/opt/sbin/ChildProt</pre>
|
||
and this to the <em>main.cf</em>:
|
||
<pre class="brush: text; gutter: false">smtpd_recipient_restrictions =
|
||
[...]
|
||
check_policy_service unix:private/childprot
|
||
[...]</pre>
|
||
The restricted recipients and the whitelists are stored in an SQLite3 database:
|
||
<pre class="brush: sql; gutter: false">CREATE TABLE child_address_t (
|
||
child INTEGER REFERENCES child_t(id),
|
||
address TEXT
|
||
);
|
||
|
||
CREATE TABLE child_t (
|
||
id INTEGER PRIMARY KEY,
|
||
name TEXT,
|
||
delegate TEXT
|
||
);
|
||
|
||
CREATE TABLE whitelist_t (
|
||
child INTEGER REFERENCES child_t(id),
|
||
address TEXT
|
||
);
|
||
|
||
CREATE VIEW child_v AS
|
||
SELECT c.id as id,
|
||
c.delegate as delegate,
|
||
ca.address as address
|
||
FROM child_t c,
|
||
child_address_t ca
|
||
WHERE c.id = ca.child;</pre>
|
||
Restricted persons together with their delegates are added to the table <em>child_t</em>, multiple addresses can be assigned to those persons in <em>child_address_t</em>. Whitelists per person are maintained in <em>whitelist_t</em>.
|
||
|
||
The tool is querying the view <em>child_v</em>.
|
||
|
||
|
||
|
||
|
||
')
|