ALi Ramzan wrote:

>I have a postfix and using gmail as a relay 
>without authentication,the problem is this postfix is just using for 
> sending email its send 1000s of email in a  one day.

OK, so you are sending thousands of messages a day, and you are 
sending them all through gmail. That's pretty well guaranteed to get 
you blacklisted.

I assume from the message quantities, this is either a commercial 
mail system, or you are hosting a popular mailing list. Unless your 
upstream ISP provides a mail relay, then you really should be sending 
the mail yourself, not using some third party as a relay.

At work I run a mail server handling thousands of mails a day for 
users. We don't find blacklisting to be a problem as long as we 
behave ourselves and keep an eye on what our users are doing. We did 
have a case where a customer got affected by something, and their 
systems were sending messages as fast as ours could take them - that 
got us temporarily blacklisted, but not for long (especially since I 
stopped the queue and put all theirs on hold, and then deleted all 
the spam).

>I need your help i want to restrict the postfix send a 20 emails in 
>a 1min  and stop , i have tried my setting but its not

OK, policyd can **not** do that. It can rate limit, but it will not 
pass n messages and then stop.
If you set the rate to (say) 10/min) then it will allow up to 10 
messages in a short space of time - in the same second if the systems 
will handle it. An 11th message will "trip" the system by going over 
quota, but after a short time the counter will reduce and more 
messages will be allowed through.
The way the counter works is along the lines of :
If counter is below limit :
   permit message
   add one to counter
else
   reduce counter
   new value = old value - (old value * (t/T))

where t = delay since last attempt, T = time peeriod set in quota. So 
if you got the quota counter up to 11, and sent a new message after 6 
seconds, then the counter would be reduced by 11 * ( 6/60), or 1.1. 
So the new value would be 9.9 and a new message could then be 
permitted.

What this means is that if you just try sending messages rapidly, 
your average rate will be held to the 10/min set, but the 
instantaneous rate will vary a bit.

>i have also use a policy daemon but i dont how to use it if you have 
>any idea about this please help me out.

I believe you have already been told this twice :

You need to configure a policy to handle the traffic.
You configure which traffic "goes through" that policy using the policy rules.
Then you configure the quota module for that policy - you configure 
the rate, the time period that rate applies over, and whether you are 
applying a quota to the whole system, by sender address, by SASL 
account, or something else.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to