[Exim] (no subject)

Góra strony
Delete this message
Reply to this message
Autor: Torsten Mueller
Data:  
Dla: exim-users
Stare tematy: Re: [Exim] Enforce quotas using Maildirs and MySQL
Nowe tematy: Re: [Exim] about quota
Temat: [Exim] (no subject)
authenticated = *
X-SA-Exim-Connect-IP: 217.228.126.39
X-SA-Exim-Mail-From: torsten@???
Subject: Re: [Exim] Enforce quotas using Maildirs and MySQL
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on ns3.xtremeweb.de
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
    version=2.63
X-Spam-Level:
X-SA-Exim-Version: 4.0 (built Tue,  6 Apr 2004 08:14:19 +0200)
X-SA-Exim-Scanned: Yes (on ns3.xtremeweb.de)


Development - multi.art.studio schrieb:

> hi,
>
> i also fight with quota on courier-imap and postgres, my first failure
> was not to add the string 'QUOTA' to imap-capabilities in couriers
> etc/imapd
>

...
> dis you solve your problem right now? i would be very inmterested in a
> way to enable quotas :)
> many thanks in advance


Possibly my part of a working setup can help.
The only problem with the quota integration is (in my case),
that the rejection of a mail isn't done at SMTP time, as
the quota check is within the transport section. This means,
if a spammer sends the mail, the warning mail from the system
goes into nirwana.
The right way (IMO) would be to check for quota already in an
ACL to reject at an early stage.
I couldn't see a proper way of doing this yet, as i couldn't find
a way, to find the final mailbox(es) at ACL time (possibly there
are alias/forward routers, which deliver to more than 1 mailbox).
Anyway, possibly it's a starting point for you.

Torsten


MYSQL_QUOTA = SELECT MYSQL_QUOTA_FIELD FROM MYSQL_AUTHTABLE WHERE
MYSQL_DOMAINFIELD LIKE '${quote_mysql:$domain}' AND MYSQL_USERNAMEFIELD
LIKE '${quote_mysql:$local_part}' AND MYSQL_ISALIASFIELD='no' AND
MYSQL_PRIMARYMXFIELD='${quote_mysql:MYSQL_NAMEOFTHISSERVER}' AND
typeofacc != 'smtp' AND (12>0)


virtual_delivery:
     driver = appendfile
     file = /var/spool/mail/virtual_mail/${domain}/${local_part}
     delivery_date_add
     envelope_to_add
     return_path_add
     user = exim
     group = exim
     quota = ${lookup mysql {MYSQL_QUOTA}{$value}}
     quota_warn_threshold = 80%
     quota_is_inclusive = false
     quota_warn_message = "\
         To: $local_part@$domain\n\
         Subject: Your mailbox\n\n\
         This message was automatically created\n\
         by mail delivery software.\n\n\
         The size of your mailbox $local_part has exceeded \n\
         a warning threshold of 80 percent\n\
         of your maximum mailbox size, which is ${lookup mysql
{MYSQL_QUOTA}{$value}}B.\n\
         If your mailbox fills completely, further incoming\n\
         messages will be automatically\n\
         returned to their senders.\n\n\
         Please take note of this and remove unwanted mail from your
mailbox.\n\n\n\
         Diese Nachricht wurde automatisch vom Mailserver generiert.\n\n\
         Die Groesse Ihrer Mailbox $local_part hat einen Grenzwert von\n\
         80 Prozent der maximalen Groesse von ${lookup mysql
{MYSQL_QUOTA}{$value}}B\n\
         ueberschritten. Wenn Ihre Mailbox die maximale Groesse\n\
         erreicht hat, werden weitere eintreffende Mails an\n\
         den Absender der Nachricht zurueckgeschickt.\n\
         Bitte beachten Sie dies und entfernen alte Mails vom \n\
         Mailserver\n"
        mode = 0660