The latest HG commits seem to have fixed some underlying problems with the 'quota-status' service. Now doing some quick tests I wonder if this can be used with aliases on the Postfix side. Appears the 'check_policy_service' used in the example below will query existing users via Dovecot's Auth Backend: http://sys4.de/en/blog/2013/04/05/dovecot-quota-mit-postfix-abfragen/ http://www.postfix.org/SMTPD_POLICY_README.html This works fine for Dovecot user 'philo' where the mail is rejected upfront before it enters the queue: ==> /var/log/mail.log <=Jul 30 13:41:18 spectre postfix/smtpd[31072]: NOQUEUE: reject: RCPT from host.example.com[1.2.3.4]: 554 5.2.2 <philo at trashheap.net>: Recipient address rejected: Quota exceeded (mailbox for use r is full); from=<user at example.com> to=<philo at trashheap.net> proto=ESMTP helo=<host.example.com> Now user 'gunge' is an alias for 'philo' in Postfix, thus the quota check will not recognize the user, will queue the message and reject it at the MDA stage: ==> /var/log/mail.log <=Jul 30 14:41:02 spectre postfix/lmtp[31460]: 3c4HSD5ZkBzBP: to=<philo at trashheap.net>, orig_to=<gunge at trashheap.net>, relay=spectre.leuxner.net[private/dovecot-lmtp], delay=1.2, delays=1.1/0.01/0/0.13, dsn=4.2.2, status=deferred (host spectre.leuxner.net[private/dovecot-lmtp] said: 452 4.2.2 <philo at trashheap.net> Quota exceeded (mailbox for user is full) (in reply to end of DATA command)) This is probably intended behaviour, just want to make sure that I'm not missing a point here. For now the only fix that comes to my mind to create "quota aware" aliases - is creating 'dummy' users in Dovecot which point to the same mailbox rather than performing aliasing on the Postfix end. Open to suggestions... Regards Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20130730/5847d5fc/attachment.bin>
On Tue, Jul 30, 2013 at 03:20:47PM +0200, Thomas Leuxner wrote:> This is probably intended behaviour, just want to make sure that I'm not > missing a point here. For now the only fix that comes to my mind to create > "quota aware" aliases - is creating 'dummy' users in Dovecot which point to > the same mailbox rather than performing aliasing on the Postfix end. Open > to suggestions...It depends on your user and/or alias database (i.e. how and where they're stored). I use LDAP, and configured Dovecot's userdb lookup to handle both "main" and "alias" addresses, like so: user_filter = (|(mail=%u)(mailAlternateAddress=%u)) (As far as Dovecot is concerned, there's actually no difference between "main" and "alias".) If you store your mailbox and alias information in the same data source (LDAP, SQL, ...), you should be able to do the same.
Apparently Analagous Threads
- Dovecot v2.1.3 (f30437ed63dc) Auth/Login Issues
- Incorrect Responses on deliverable mails with LMTP server
- HG changes affecting received headers
- Dovecot 2.0beta3: mdbox crash on corrupted mail (backtrace included)
- Latest HG 09c114091c88 2.2.12 Assertion Failure