OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Check Quota with external program

From: mouss (mlist.onlyfree.fr)
Date: Mon Jul 02 2007 - 05:10:21 CDT


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 mailexample.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...