[Exim] Bug in 4.30, maildirsize, and quota, causing infinite…

Pàgina inicial
Delete this message
Reply to this message
Autor: Avleen Vig
Data:  
A: exim-users
Assumpte: [Exim] Bug in 4.30, maildirsize, and quota, causing infinite loops
So I upgraded to 4.30 today to take advantage of the maildirsize
feature.
Uh oh. I've found a weird bug which trips some times, but not all the
time.

Here's the transport's quota part of my config:
  quota = ${lookup mysql{select users.quota from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.domain_id = domains.domain_id}{${value}M}}
  quota_is_inclusive = false
  #quota_size_regex = ,S=(\d+):
  quota_warn_threshold = 75%
  maildir_use_size_file = true
  quota_warn_message = "To: $local_part@$domain\n\
    Subject: Mailbox quota warning\n\n\
    This message was automatically generated by the mail delivery software.\n\n\
    You are now using over 75% of your allocated mail storage quota.\n\n\
    If your mailbox fills completely, further incoming messages will be automatically\n\
    returned to their senders.\n\n\
    Please take note of this and remove unwanted mail from your mailbox.\n"



For a new account I created, I found that maildirsize was created as it
should be.
However, for two existing accounts (and for no-known reason), the file
isn't created on mail delivery if quota size = 0.
And if quota size = 0, and maildirsize != exist, a warning message is
generated and mailed to the user as given by quota_warn_message.

This in turn triggers another message, which triggers another, and
around we go.


Debug logs +transport show this around the delivery:

33244 MYSQL query: select users.quota from users,domains where localpart = 'mike' and domain = 'legolas.com' and users.domain_id = domains.domain_id
33244 MYSQL new connection: host=localhost port=0 socket=/tmp/mysql.sock database=vexim user=vexim
33244 lookup yielded: 0
...
33244 lookup yielded: /usr/local/mail/legolas.com/mike/Maildir
33244 appendfile: mode=600 notify_comsat=0 quota=0 warning=75
33244 directory=/usr/local/mail/legolas.com/mike/Maildir format=maildir
33244 message_prefix=null
33244 message_suffix=null
33244 maildir_use_size_file=yes
33244 QUOTA maildirsize checks on directory /usr/local/mail/legolas.com/mike/Maildir
33244 QUOTA unable to open maildirsize or file not is valid: /usr/local/mail/legolas.com/mike/Maildir
33244 QUOTA maildirquota file set (I think) checkpath=/usr/local/mail/legolas.com/mike/Maildir quota_string=0S
33244 QUOTA recalculation needed: checkpath=/usr/local/mail/legolas.com/mike/Maildir quota=0 size=0 message_size=0 rc=0
33244 QUOTA from maildirsize: checkpath=/usr/local/mail/legolas.com/mike/Maildir quota=0 size=0 message_size=594
33244 QUOTA maildirsize checked on checkpath=/usr/local/mail/legolas.com/mike/Maildir quota=0 saved_size=0 message_size=594
33244 delivering in maildir format in /usr/local/mail/legolas.com/mike/Maildir
33244 writing to file tmp/1071753357.H450130P33244.pear.silverwraith.com
33244 added header line(s):
33244 X-Spam-Flag: YES
33244 ---
33244 writing data block fd=10 size=676 timeout=0
33244 quota = 0 threshold = 0 old size = 0 message size = 676
33244 renaming temporary file
33244 renamed tmp/1071753357.H450130P33244.pear.silverwraith.com as new/1071753357.H450130P33244.pear.silverwraith.com
33244 appendfile yields 0 with errno=0 more_errno=0
33243 journalling /usr/local/mail/legolas.com/mike/Maildir:mike@???
33244 search_tidyup called
33244 close MYSQL connection: localhost:(/tmp/mysql.sock)/vexim/vexim
33243 Warning message requested by transport


Does anyone have any suggestions?

--
Avleen Vig
Systems Administrator
Doing virtual domain hosting with Exim?
  Check out Virtual Exim: http://silverwraith.com/vexim
    (Click the banner, support development..)