[Dovecot] Bounce messages
Steffen Kaiser
skdovecot at smail.inf.fh-brs.de
Thu Mar 6 08:27:35 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 6 Mar 2014, Thanh Long DANG wrote:
> I just set up my mail server using postfix / dovecot / mysql and it
> works well. I just have a problem : I'm a trying to have a overquota
> notification and the server sends nothing (mail server rejects incoming
> mail).
What do you mean with "the server sends nothing" Which server should send
what? And should the mail _not_ reject incoming mail, if the user is over
quota?
If you mean: /usr/local/bin/quota-warning.sh is executed, but postfix does
not deliver the warning, because the user is overquota; then you need to
make the script deliver the message in alternate ways:
a) use Dovecot deliver directly with quota disabled
b) spool the message into Maildir directly
> Could you tell me if there is a problem with dovecot or postfix configuration?
postfix+quota config usually contain a quota-status section, like
described here (German, but the code snippets are significant):
http://sys4.de/de/blog/2013/04/05/dovecot-quota-mit-postfix-abfragen/
> My conf :
>
> # 2.1.7: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.32-26-pve x86_64 Debian 7.2 simfs
> auth_mechanisms = plain login
> debug_log_path = /var/log/dovecot-debug.log
> dict {
> quotadict = mysql:/etc/dovecot/dovecot-dict-sql.conf
> }
> disable_plaintext_auth = no
> info_log_path = /var/log/dovecot-info.log
> log_path = /var/log/dovecot.log
> mail_location = maildir:/home/vmail/%d/%n:INDEX=/home/vmail/%d/%n/indexes
> namespace inbox {
> inbox = yes
> location =
> mailbox Drafts {
> special_use = \Drafts
> }
> mailbox Junk {
> special_use = \Junk
> }
> mailbox Sent {
> special_use = \Sent
> }
> mailbox "Sent Messages" {
> special_use = \Sent
> }
> mailbox Trash {
> special_use = \Trash
> }
> prefix =
> }
> passdb {
> args = /etc/dovecot/dovecot-mysql.conf.ext
> driver = sql
> }
> plugin {
> quota = maildir:User quota
> quota_exceeded_message = Storage quota for this account has been exceeded, please try again later.
> quota_rule = *:storage=1G
> quota_rule2 = Trash:storage=+30%%
> quota_rule3 = Sent:storage=+30%%
> quota_warning = storage=90%% quota-warning 90 %u
> quota_warning2 = storage=75%% quota-warning 75 %u
> sieve = ~/.dovecot.sieve
> sieve_dir = ~/sieve
> }
> postmaster_address = postmaster at multidist.eu
> protocols = " imap lmtp pop3"
> quota_full_tempfail = yes
> rejection_subject = Rejet: %s
> service auth {
> unix_listener /var/spool/postfix/private/auth {
> mode = 0666
> }
> }
> service dict {
> unix_listener dict {
> mode = 0777
> }
> }
> service lmtp {
> unix_listener /var/spool/postfix/private/dovecot-lmtp {
> group = postfix
> mode = 0666
> user = postfix
> }
> }
> service quota-warning {
> executable = script /usr/local/bin/quota-warning.sh
> unix_listener quota-warning {
> mode = 0777
> }
> }
> ssl_cert = </etc/dovecot/dovecot.pem
> ssl_key = </etc/dovecot/private/dovecot.pem
> userdb {
> args = /etc/dovecot/dovecot-mysql.conf.ext
> driver = sql
> }
> verbose_proctitle = yes
> protocol lmtp {
> mail_plugins = " quota"
> }
> protocol lda {
> info_log_path = /var/log/dovecot-lda.log
> log_path = /var/log/dovecot-lda-errors.log
> mail_plugins = " quota"
> }
> protocol imap {
> mail_max_userip_connections = 10
> mail_plugins = quota imap_quota
> }
> protocol pop3 {
> mail_plugins = quota
> pop3_uidl_format = %08Xu%08Xv
> }
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUxgxeHD1/YhP6VMHAQIDrAf/QDjhBzLodZDvQbuwZXwubJIf5y14IqVR
rG6LEBMZtxUP8QmtYBK3dZayfG56+POWDg5fgMmqdqYpQgBStTaWhrKLEy1LSZ8E
VLr8dArvRx4HsJrgr2ygHAJOQtoSM3YgoEjI8m0fRmdvzjaSZ+srbkZB911l5Gfi
nWQm/8tsjaASAcGzbZ1OnltXxQef1K4qhrgZrxrOWW7xCWCAElNddY1lfekeahY6
NfiTfKvkTyLfzzEi22RQTAMviUVraHJ69FyTpMWro5qiZIke5FWXlGP/XeK45xTh
0wcs/CK/OzxHu8lAVNoZWqTZUXRXCTaq0oll3N1QqaK8kIsnB8k/NQ==
=QRsH
-----END PGP SIGNATURE-----
More information about the dovecot
mailing list