Hi,

I'm using Exim 4.90.1 on an Ubuntu 18.04 machine with dovecot 2.2.33 as
IMAP server.

Currently, I'm also using a plugin in dovecot:

https://wiki.dovecot.org/Plugins/MailboxAlias

to make sure the users with different names for the Sent and Trash
folder ("Verzonden items", "Deleted Messages") see the same name between
different user agents.

However, this plugin solves the alias problem with a symlink in the
Maildir directory, which makes Exim count the mails twice when the
appendfile transport is calculating quota sizes.


I managed to grab part of an exim -d+all delivery when a user was over
quota:

10:50:48 18038 maildir_compute_size: 
path=/var/mail/virtual/cobergh.nl/cynthias.2097/Maildir/.Sent
10:50:48 18038   sum=2466048922 filecount=8701 timestamp=1644486536
[...]
10:50:48 18038 maildir_compute_size: 
path=/var/mail/virtual/cobergh.nl/cynthias.2097/Maildir/.Sent Messages
10:50:48 18038   sum=2466048922 filecount=13088 timestamp=1644486536

and sure enough, one of these directories is a symlink to the other:

root@mx-1:/var/spool/mail/virtual/cobergh.nl/cynthias.2097/Maildir# ls -asF  | 
fgrep .Sent
   4 .Sent/
   0 .Sent Messages@

root@mx-1:/var/spool/mail/virtual/cobergh.nl/cynthias.2097/Maildir# stat .Sent\ 
Messages
  File: .Sent Messages -> .Sent
  Size: 5               Blocks: 0          IO Block: 4096   symbolic link
[...]



I was surprised by the symlink behaviour so I'm reconsidering the use of
the dovecot plugin, but I still wanted to ask whether this behaviour is
considered OK. I've read the appendfile docs and I could find anything
explicit about symlinks.


the transport part of the config:


virtual_delivery:
  driver          = appendfile
  # let op: geen spatie voor de \ want dat wordt ".../Maildir "
  directory       = 
/var/mail/virtual/$domain/${sg{$local_part}{/}{-}}.${extract{user_id}{$address_data}}/Maildir\
                    ${if bool{$acl_m_mailIsSpam}\
                         {${if 
match_domain{$acl_m_connectionDomainname}{+martin_domains}\
                               {}\
                               {/.Junk}\
                           }\
                         }\
                         {${if ! or{ {eq{$address_file}{}} 
{eq{$address_file}{inbox}}}\
                               {/.${sg{$address_file}{/}{-}}}\
                               {}\
                           }\
                         }\
                    }
  directory_mode  = 2750
  mode            = 0640
  user            = ${extract{uid}{$address_data}}
  group           = mail
  maildir_tag     = ",S=$message_size,W=$message_size"
  headers_remove  = 
Lines:Content-Length:Status:X-IMAP:X-IMAPbase:X-Keywords:X-Status:X-UID:X-UIDL
  headers_add     = "Lines: $body_linecount"
  use_crlf
  maildir_format
  create_directory
  delivery_date_add
  envelope_to_add
  return_path_add

  #quota opties
  quota                         = ${extract{quotum}{$address_data}}
  quota_size_regex              = S=(\d+)
  quota_is_inclusive            = false
  maildir_quota_directory_regex = ^(?:cur|new|\.(?!Trash).*)$
  quota_warn_threshold          = 95%
  quota_warn_message            = MSG_QUOTA
  maildir_use_size_file


thanks,
Maarten.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to