Carlos,
If you want to impose email size limits, you need to use the
"throttle_recipient" table, not the "throttle table".  Look at the very
bottom of the policyd.conf file.  Plus, there are only restrictions on
numbers of messages, not sizes.

The "throttle" table refers to the origination of the message, and the
_from entry is used to specify the originating IP address of the email,
not an email address.

If you need to limit message sizes in general, you're better off to do
this in postfix, though you'd have to work out a way to filter specific
users to enforce a smaller message size limit than the default (which is
in main.cf in the parameter "message_size_limit").

--Tobias

Carlos Sánchez wrote:
> Hi,  I installed policy, because i need to restrict incomming and
> outgoing mail per user.
>  
> I read policy.conf and README file for my configuration, I probe with
> an account [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>, I insert in
> throttle table a line that [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> can´t send mails larger than 1 mb, also
> configure SENDERTHROTTLE=1 in the policyd.conf and i configure main.conf
>  
> ###### main.conf ########
> smtpd_recipient_restrictions =
>   ..
>     reject_unauth_destination
>     reject_unlisted_recipient
>     check_policy_service inet:127.0.0.1:10031
>   ..
>  
>  
> ###### policyd.conf######
> INSERT INTO
> throttle  (_from,_count_max,_quota_max,_time_limit,_mail_size,_date,_priority)
>  VALUES ('[EMAIL PROTECTED]' <mailto:[EMAIL PROTECTED]>,
>           50,                # maximum messages per time unit
>           10000000,         # size in bytes (10 megs)
>           86400,             # time unit in seconds (1 day)
>           1024000,          # maximum message size (1 meg)
>           UNIX_TIMESTAMP(),  # current time
>           10);               # priority of record
>  
> I attach a file with more than 2mb and dont trigger the policy and the
> mail arrive to the recipient.
>  
> Anybody knows what i am doing bad, or i am not understanding how
> policy works
>  
> thanks for your help
>  

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
policyd-users mailing list
policyd-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/policyd-users

Reply via email to