Notifications to over-quota accounts
Hello! I'm trying to allow a system email address to send notifications to over-quota accounts. Is there a way to do it?
Thanks in advance!
Hello! I'm trying to allow a system email address to send notifications to over-quota accounts. Is there a way to do it?
Thanks in advance!
Hi,
The only way to deliver mails to accounts that are over quota that I can think of is using the lda.
There is an example in the manual (https://doc.dovecot.org/configuration_manual/quota/#example-configuration) that shows how to do that.
Mit freundlichen Grüßen
Markus Bach
IT-Systemadministration
PEGASUS GmbH Gesellschaft für soziale/gesundheitliche Innovation IT-Systemleistungen Brunowstr. 52 13507 Berlin
Hotline: +49 (30) 31 98 31 200 E-Mail: support@pegasusgmbh.de Web: https://www.pegasusgmbh.de
Sitz der Gesellschaft: PEGASUS GmbH Gesellschaft für soziale/gesundheitliche Innovation Potsdamer Str. 98 10785 Berlin
Geschäftsführer: Friedrich Kiesinger Registergericht: Amtsgericht Berlin Charlottenburg Registernummer: HRB 69935 B
Hinweise im Umgang mit personenbezogenen Daten: https://www.pegasusgmbh.de/datenschutz
On 3/15/24 12:58, N V wrote:
Hello! I'm trying to allow a system email address to send notifications to over-quota accounts. Is there a way to do it?
Thanks in advance!
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Hi,
I'm sending warnings to accounts when their quota gets up to 80% and again on 95%.
Relevant parts from "doveconf -n":
... service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { user = mailstore } user = mailstore }
plugin { ... quota = count:User quota quota_rule2 = Trash:storage=+100M quota_status_nouser = DUNNO quota_status_overquota = 552 5.2.2 Mailbox is full quota_status_success = DUNNO quota_vsizes = yes quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u ... }
Bash script:
...
#!/bin/sh
PERCENT=$1
USER=$2
DATE=date
MSGID_P1=date '+%Y%m%d%H%M%S'
MSGID_P2=hostname
MSGID=$MSGID_P1@$MSGID_P2
logger -p mail.info -t dovecot "$PERCENT% Quota-warning sent to $USER"
cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER -o "plugin/quota=count:User quota:noenforcing"
From: <POSTMASTER@MYDomain.com>
To: <$USER>
Subject: $PERCENT% Mail quota warning
Message-ID: <$MSGID>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Date: $DATE
Your text.... ...
Best Urban
Am 15.03.24 um 12:58 schrieb N V:
Hello! I'm trying to allow a system email address to send notifications to over-quota accounts. Is there a way to do it?
Thanks in advance!
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (3)
-
Markus Bach
-
N V
-
Urban Loesch