problems with virtual_mailbox_limit_maps not counting properly

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

problems with virtual_mailbox_limit_maps not counting properly

Jordi Moles
hi,

i've got a mail server on a FreeBSD 6.2 running postfix-2.5.1_2,1 and
the proper vda_patch installed via "WITH_VDA=yes" option on postfix
installation.

After that, i added these lines in the main.cf

##vda patch
virtual_maildir_extended = yes
virtual_mailbox_limit_inbox = no
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "Mailbox full."
virtual_overquota_bounce = yes

and the content of mysql-virtual_mailbox_limit_maps.cf is

user = *****
password = *****
dbname = *****
table = ******
select_field = MAX * 1024 * 1024
where_field = ALIAS
hosts = 192.16****
additional_conditions = and ACTIVE = '1'


where MAX is a filed in the database with the max space for the mailbox,
in MB, so... when we multiply twice "select_field" by 1024, we should
get the data in bytes, as vda_patch requires.

The thing is..... when "virtual_mailbox_limit_inbox" is set to "yes",
everything works fine, it trully limits the amount of information
accepted in /cur and /new paths according to what is set in the MAX field.

but.... and here's the big problem.... when
"virtual_mailbox_limit_inbox" is set to "no", it just doesn't work. For
example, the whole mailbox is empty, and MAX is set to 100, but it will
reject every mail.

Has anyone faced this problem?

is there anything else that i have to bear in mind to use            
"virtual_mailbox_limit_inbox = no"

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: problems with virtual_mailbox_limit_maps not counting properly

Wietse Venema
Jordi Moles Blanco:
> hi,
>
> i've got a mail server on a FreeBSD 6.2 running postfix-2.5.1_2,1 and
> the proper vda_patch installed via "WITH_VDA=yes" option on postfix
> installation.

This is the wrong mailing list. The VDA patch not supported here.

        Wietse

> After that, i added these lines in the main.cf
>
> ##vda patch
> virtual_maildir_extended = yes
> virtual_mailbox_limit_inbox = no
> virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
> virtual_mailbox_limit_override = yes
> virtual_maildir_limit_message = "Mailbox full."
> virtual_overquota_bounce = yes
>
> and the content of mysql-virtual_mailbox_limit_maps.cf is
>
> user = *****
> password = *****
> dbname = *****
> table = ******
> select_field = MAX * 1024 * 1024
> where_field = ALIAS
> hosts = 192.16****
> additional_conditions = and ACTIVE = '1'
>
>
> where MAX is a filed in the database with the max space for the mailbox,
> in MB, so... when we multiply twice "select_field" by 1024, we should
> get the data in bytes, as vda_patch requires.
>
> The thing is..... when "virtual_mailbox_limit_inbox" is set to "yes",
> everything works fine, it trully limits the amount of information
> accepted in /cur and /new paths according to what is set in the MAX field.
>
> but.... and here's the big problem.... when
> "virtual_mailbox_limit_inbox" is set to "no", it just doesn't work. For
> example, the whole mailbox is empty, and MAX is set to 100, but it will
> reject every mail.
>
> Has anyone faced this problem?
>
> is there anything else that i have to bear in mind to use            
> "virtual_mailbox_limit_inbox = no"
>
> Thanks.
>
>
>

Reply | Threaded
Open this post in threaded view
|

postfix and mysql quotas (was Re: problems with virtual_mailbox_limit_maps...)

Santiago Romero-2
Wietse Venema wrote:
> This is the wrong mailing list. The VDA patch not supported here.
>  

 I have an small question about quotas and postfix-mysql ...

 Does "virtual" support mysql quotas "out of the box"? (without the VDA
patch)?

 If I need "per-user" or "per-domain" quotas, maybe I must then use
another MDA (like dovecot) instead of virtual?

 Thanks :-)


PS: I'm migrating a lot for servers from qmail+vpopmail+mysql+qmailadmin
to postfix+dovecot+mysql+postfixadmin and I'm impressed with postfix ...
congratulations and thanks a lot for such a powerful MTA :-)

--
Santiago Romero


Reply | Threaded
Open this post in threaded view
|

Re: postfix and mysql quotas (was Re: problems with virtual_mailbox_limit_maps...)

Wietse Venema
Santiago Romero:
> Wietse Venema wrote:
> > This is the wrong mailing list. The VDA patch not supported here.
> >  
>
>  I have an small question about quotas and postfix-mysql ...
>
>  Does "virtual" support mysql quotas "out of the box"? (without the VDA
> patch)?

The UNIX KERNEL implements:

- file system quotas (man quota)
- per-file size limit (man setrlimit)

These are not re-implemented in Postfix itself.

>  If I need "per-user" or "per-domain" quotas, maybe I must then use
> another MDA (like dovecot) instead of virtual?

Indeed. virtual(8) is a minimal delivery agent without quotas,
mail filters, etc.

        Wietse

>
>
> PS: I'm migrating a lot for servers from qmail+vpopmail+mysql+qmailadmin
> to postfix+dovecot+mysql+postfixadmin and I'm impressed with postfix ...
> congratulations and thanks a lot for such a powerful MTA :-)
>
> --
> Santiago Romero
>
>
>
>