Sorry to bother you as I can normally figure things out but I have been
struggling with postfwd rules for a week and not getting anywhere
I host a number of domains so I want to have different outgoing restrictions
for the different domains.

For example our local surf club domain has 600 members and twice a month
they send a mailer to those members. Normally they send about 50 to a
hundred a day so I want a rule that allows them to send 800 mails on certain
days and 100 on other days. 
So far, I am ashamed to say, I cannot even make one rule that only applies
to there domain. 

So far all I have managed to do is apply a general rule set where users can
send max 20 mails in 5 minutes 50 an hour and 100 mails a day (these 3 rules
which I copied from another post) I have in place and work fine however they
limit all domains and try as I might I can not adjust them to work on a
single domain. These rules are ideal for the majority of our users but as
explained no use what so ever to domains that have large mailing lists and
we have several domains that need to exceed these limits. 

id=R0050; sender=~/.*/; action=rate(sender/20/300/REJECT only 20 messages
allowed in 5 minutes for $$sender)
id=R0060; sender=~/.*/; action=rate(sender/50/600/REJECT only 50 messages
allowed in 60 minutes for $$sender)
id=R0070; sender=~/.*/; action=rate(sender/100/86400/REJECT only 100
messages allowed per day for $$sender)

Additionally I read that postfwd works on a first truth wins basis however
if I do something like this it obeys the second rule.
id=R0011; sender==u...@domain.net; action=rate(sender/20/3600/450 4.7.1
Message delivery request 20 rate limit exceeded)
id=R0012; sender==u...@domain.net; action=rate(sender/1/3600/450 4.7.1
Message delivery request 1 rate limit exceeded)

or if i do this again postfwd obeys rules lower in the order 

id=R0011; sender==u...@domain.net; action=rate(sender/800/8600/450 4.7.1
Message delivery request 800 rate limit  exceeded)
id=R0050; sender=~/.*/; action=rate(sender/20/300/REJECT only 20 messages
allowed in 5 minutes for $$sender)
id=R0060; sender=~/.*/; action=rate(sender/50/600/REJECT only 50 messages
allowed in 60 minutes for $$sender)
id=R0070; sender=~/.*/; action=rate(sender/100/86400/REJECT only 100
messages allowed per day for $$sender)

I must have been to 100+ sites and I see this sort of setup all the time
which I assume means these hosts do not get the rules lower in the file
applied to them however thats not what happens mail still gets rejected as
per the rules at the bottom of the file.
I am so confused now as nothing seems to work as I expected and would really
appreciate some help to nut this out. 
&&TRUSTED_HOSTS {
        client_name~=\.domain1\.com$
        client_name~=\.domain2\.com$
        client_name~=\.domain3\.net$
}        
id=WL_002
        &&TRUSTED_HOSTS
        action=dunno

id=R0050; sender=~/.*/; action=rate(sender/20/300/REJECT only 20 messages
allowed in 5 minutes for $$sender)
id=R0060; sender=~/.*/; action=rate(sender/50/600/REJECT only 50 messages
allowed in 60 minutes for $$sender)
id=R0070; sender=~/.*/; action=rate(sender/100/86400/REJECT only 100
messages allowed per day for $$sender)




--
View this message in context: 
http://postfix.1071664.n5.nabble.com/postfwd-domain-rules-tp89706.html
Sent from the Postfix Users mailing list archive at Nabble.com.

Reply via email to