Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dovecot / Quota Warn E-Mails

Featured Replies

Hallo,

so, nachdem ich aus der Dovecot Doku nicht schlau geworden bin, probiere ich es mal hier ?

Froxlor läuft bei uns mit Dovecot wunderbar, auch die Quotas funktionieren entsprechend (werden im Webmail/Thunderbird angezeigt, wenn Mailbox voll werden keine Mails mehr angenommen).
Passt. Was nicht funktioniert ist, dass ein User eine Warn E-Mail ab 80% bzw. 95% bekommt.

In /etc/dovecot/conf.d/90-quota.conf habe ich mal die Quotas festgelegt:

plugin {
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
}

service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  user = dovecot
  unix_listener quota-warning {
    user = vmail
  }
}

Das oben genannte Shellscript funktioniert auch per manuellen aufruf, da bekommt der per Paramenter angegebene User eine Mail


Wenn ich richtig liege, müsste man jetzt noch das Quota Backend festlegen, und genau hier stehe ich an.
Dovecot holt sich die Quota ja aus der SQLDB von Froxlor, wie konfiguriere ich das nun richtig?

plugin {
  #quota = dirsize:User quota
  #quota = maildir:User quota
  #quota = dict:User quota::proxy::quota
  #quota = fs:User quota
}

 

Danke!!
Patrick

 

Aus der Config:

Quote

# Quota limits are set using "quota_rule" parameters. To get per-user quota
# limits, you can set/override them by returning "quota_rule" extra field
# from userdb.

Zweiteres machen wir, siehe dovecot-sql.conf.ext:

user_query = "[...] CONCAT('*:storage=', quota,'M') AS quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')"

Also würde ich intuitiv mal auf folgendes tippen:

quota = maildir:User quota

 

  • Author

Danke, hat so funktioniert!

Falls jemand noch Warnungsmails bei Quotaüberschreitung benötigt, hier mein Setup:

 vi /etc/dovecot/conf.d/90-quota.conf

plugin {  quota_warning = storage=95%% quota-warning 95 %u }

service quota-warning
{
  executable = script /usr/local/bin/quota-warning.sh
  user = vmail
  unix_listener quota-warning {
    user = vmail
  }
}

plugin {  quota = maildir:User quota }

Das eigentliche Mail wird über dieses Script versandt (chmod 755):

vi /usr/local/bin/quota-warning.sh

#!/bin/sh
PERCENT=$1
USER=$2
cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing"
From: support@XXXXX
To: $USER
Date: `date +"%a, %d %b %Y %H:%M:%S %z"`
Subject: Ihr Postfach ist fast voll!
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

Ihr Postfach $USER ist aktuell zu $PERCENT% belegt.

Bitte archivieren oder entfernen Sie alte, nicht mehr benötige Nachrichten. Andernfalls
könnte es vorkommen, dass Sie keine neuen Nachrichten mehr empfangen können!
Bei Fragen stehen wir Ihnen unter XXXXX oder unter support@XXXX zur Verfuegung.
Ihr Hosting Team


EOF

 



 

 

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.