about message_size_limit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

about message_size_limit

Manuel Mely-2
Hi,

I have about 2k mail users on my LAN, i need to grant permissions to
some users to send attachtments of more size(maybe 3MB) than my
message_size_limit permits (1MB). I have also information related to the
mail service of my users on a mysql database(1).

To solve this, about two months ago, i delevoped a script to check
message size limits by user. Is a little script that checks the "size"
attribute of an ESMTP message session and compares this value against a
field on other mysql database(2) (different database). This works fine,
but i realized that if i enable message_size_limit, the script doesn't
work because the size value is defined on the global parameter, that's
understood. If i don't use it, the script works.
For that, i have this workaround:

On the 2nd database, this one only have the users that i want to permit
to send more size attchatments. The 1st database have information about
my 2k users.
So with this, my workaround consists in have a size field on the 1st
database and set 3MB for the "special" users and all rest with 1MB.
I thought that with message_size_limit on 1MB and my script checking
only for 3MB users works, but it doesn't. Is there other way to apply in
order to don't populate all my database?

Thanks in advance!

Reply | Threaded
Open this post in threaded view
|

Re: about message_size_limit

Wietse Venema
Manuel Mely:
> Hi,
>
> I have about 2k mail users on my LAN, i need to grant permissions to
> some users to send attachtments of more size(maybe 3MB) than my
> message_size_limit permits (1MB). I have also information related to the
> mail service of my users on a mysql database(1).

You may look into this: http://www.policyd.org/

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: about message_size_limit

Manuel Mely-2
Wietse Venema wrote:

> Manuel Mely:
>  
>> Hi,
>>
>> I have about 2k mail users on my LAN, i need to grant permissions to
>> some users to send attachtments of more size(maybe 3MB) than my
>> message_size_limit permits (1MB). I have also information related to the
>> mail service of my users on a mysql database(1).
>>    
>
> You may look into this: http://www.policyd.org/
>
> Wietse
>  

I had seen this project, but is not so useful for me. I wrote my own
script for my purposes. :)
Reply | Threaded
Open this post in threaded view
|

Re: about message_size_limit

Zhang Huangbin
In reply to this post by Wietse Venema
Wietse Venema wrote:

> Manuel Mely:
>  
>> Hi,
>>
>> I have about 2k mail users on my LAN, i need to grant permissions to
>> some users to send attachtments of more size(maybe 3MB) than my
>> message_size_limit permits (1MB). I have also information related to the
>> mail service of my users on a mysql database(1).
>>    
>
> You may look into this: http://www.policyd.org/
>
> Wietse
>  

It seems policyd doesn't work always. Some mail client doesn't sent mail
size info to postfix, so the policyd failed.

 > I had seen this project, but is not so useful for me. I wrote my own
 > script for my purposes. :)

Hi, Manuel.

Will you share this script? or could you sent me a copy?

Thanks very much.

--
Best Regards.

Zhang Huangbin

- iRedMail: Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x:
  http://iRedMail.googlecode.com/

Reply | Threaded
Open this post in threaded view
|

Re: about message_size_limit

Magnus Bäck
On Saturday, July 12, 2008 at 12:01 CEST,
     Zhang Huangbin <[hidden email]> wrote:

> Wietse Venema wrote:
>
> > You may look into this: http://www.policyd.org/
>
> It seems policyd doesn't work always. Some mail client doesn't sent
> mail size info to postfix, so the policyd failed.

That's not a fault of policyd's. Postfix sends the actual message size
to policy servers called from smtpd_end_of_data_restrictions. If policyd
is called from there the sender-dependent message size limit it will
work for all messages.

[...]

--
Magnus Bäck
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: about message_size_limit

Zhang Huangbin
Magnus Bäck wrote:

> On Saturday, July 12, 2008 at 12:01 CEST,
>      Zhang Huangbin <[hidden email]> wrote:
>
>  
>> Wietse Venema wrote:
>>
>>    
>>> You may look into this: http://www.policyd.org/
>>>      
>> It seems policyd doesn't work always. Some mail client doesn't sent
>> mail size info to postfix, so the policyd failed.
>>    
>
> That's not a fault of policyd's. Postfix sends the actual message size
> to policy servers called from smtpd_end_of_data_restrictions. If policyd
> is called from there the sender-dependent message size limit it will
> work for all messages.

Hi, Magnus.

Could you tell me how i can setup this feature? Any link?

Thanks very much.

Sorry if this is OT. :(

--
Best Regards.

Zhang Huangbin

- iRedMail: Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x:
  http://iRedMail.googlecode.com/

Reply | Threaded
Open this post in threaded view
|

Re: about message_size_limit

Magnus Bäck
On Saturday, July 12, 2008 at 13:48 CEST,
     Zhang Huangbin <[hidden email]> wrote:

> Magnus Bäck wrote:
>
> > That's not a fault of policyd's. Postfix sends the actual message
> > size to policy servers called from smtpd_end_of_data_restrictions.
> > If policyd is called from there the sender-dependent message size
> > limit it will work for all messages.
>
> Could you tell me how i can setup this feature? Any link?

General policy server information:
http://www.postfix.org/SMTPD_POLICY_README.html

Calling the policy server from smtpd_end_of_data_restrictions is no
different from calling it from e.g. smtpd_recipient_restrictions.
As for specific policyd help I have none to give, I don't use that
software. The project web site and mailing list archives can provide
more information.

--
Magnus Bäck
[hidden email]