Configuration: Postfix + Policyd v2. Outbound only gateway. Multiple domains, 
multiple users.

Goal: Set outbound quotas for user@domain, with different quota levels for 
specific users @ specific domains.tld.
high_quota = 5000 recipients over 12 hours. Apply to specific users, then stop 
processing additional quota rules.
med_quota = 1000 recipients over 12 hours. Apply to specific users, then stop 
processing additional quota rules.
default_quota = 400 recipients over 12 hours. Applies to all other users.


Is this how I would do it?

Table policies
id, name, priority, description, disabled
(1, high_quota, 100, high_quota, 0)
(2, med_quota, 200, med_quota, 0)
(3, default_quota, 300, default_quota, 0)

Table policy_groups
id, name, disabled, comment
(11, high_quota_users, 0, users of high_quota)
(12, med_quota_users, 0, users of med_quota)

Table policy_group_members
id, policygroupid, member, disabled, comment
(1, 11, [email protected], 0, user of high_quota)
(2, 11, [email protected], 0, user of high_quota)
(3, 11, [email protected], 0, user of high_quota)
(4, 12, [email protected], 0, user of med_quota)
(5, 12, [email protected], 0, user of med_quota)

Table policy_members
id, policyid, source, destination, comment, disabled
(33, 1, %high_quota_users, ?what_goes_here?, apply to high_quota users, 0)
(34, 2, %med_quota_users, ?what_goes_here?, apply to med_quota users, 0)

Table quotas
id, policyid, name, track, period, verdict, data, comment, disabled
(41, 1, high user quota, Sender:user@domain, 43200, hold, nul, for high_quota, 
0)
(42, 2, med user quota, Sender:user@domain, 43200, hold, nul, for med_quota, 0)
(43, 3, default user quota, Sender:user@domain, 43200, hold, nul, for 
default_quota, 0)

Table quotas_limits
ID, QuotasID, Type, CounterLimit, Comment, Disabled 
(1, 41, MessageCount, 5000, linked to high user quota, 0)
(2, 42, MessageCount, 1000, linked to med user quota, 0)
(3, 43, MessageCount, 400, linked to default user quota, 0)


Thanks

_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to