|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Simone Felici (s.felici
alpikom.it)
Date: Mon Jul 02 2007 - 09:59:35 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
mouss ha scritto:
> Simone Felici wrote:
>> Hi!
>>
>> I'm setting up postfix as frontend into an existing back-end mail system.
>> Until here, thank's this community, all tests are gone well.
>> Now I need to check the quota of the mails on the back-end. There is
>> an existing program on this back-end system. It's listening on a port.
>> Manually I need only to telnet to a port of this server and execute a
>> command 'check-quota mail
example.com'. The answer could be:
>>
>> AVAILABLE
>> FULL
>> UNKNOWN
>>
>> So with this I can see if the mail is over quota or not.
>> Now, I've read the 'virtual_mailbox_limit_maps' should do the trick
>> (maybe).
>>
>> Is there a way to set up this variable pointing to a bash script that
>> do this query via telnet?
>
> no. a variable is a variable.
>>
>> How postfix need the output to understood this mail is over-quota?
>
> you need a policy service that is called by
> smtpd_recipient_restrictions. this policy server will then contact your
> frontend to see if the recipient is over-quota. you need some perl
> knowledge if you want to start from the distributed policy server
> example. and forget about the shell here...
>
>
Hi again,
I've write a script in perl that can query the backend and the output of the script is the using quota.
Now, the 'virtual_mailbox_limit_maps' will point to a sql db where all quota limits for all mailboxes are set. Then, with smtpd_recipient_restrictions
I'll use this option: check_policy_service unix:private/mailquota. 'mailquota' will be set up into a master.cf like this:
mailquota unix - n n - - spawn user=nobody argv=/usr/bin/perl /etc/postfix/mailquota.pl
But how can I pass to /etc/postfix/mailquota.pl the recipient argument?
The syntax to obtain the usage quota is /etc/postfix/mailquota.pl <recipient-email>.
The output is the used quota of the <recipient-email> in bytes.
Thank's a lot, bye
Simon
--
Simone Felici E-Mail: s.felici
alpikom.it
Divisione Tecnica Tel: 0461 030 111
Alpikom S.p.A. Fax: 0461 030 112
v.Fersina, 23 - 38100 Trento URL: http://www.alpikom.it
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]