Corruption of index files

2015-01-21 Thread Oliver Welter
Hi All,

after upgrading my mail server (dovecot 1.1.7 -> 2.2.13) I get tons of
messages about corrupted index files in the syslog ("Error: Corrupted
transaction log" and "Warning: fscking index file .. dovecot.index".

I tried flock and even dotlock, but the problems persist.

The system is a VPS with an overlay filesystem which did work flawlessly
with the old dovecot install and is not reporting any errors in the host
machine.

From time to time I get warnings about an exceeded inotify limit for the
dovecot user - might this be a problem? Anybody has an idea what might
be the cause those problems and how to track them down.

Oliver

-- 
Protect your environment -  close windows and adopt a penguin!



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Shared folders - Namespace definition

2015-01-21 Thread Peter Hodur
>
>
>>
> If your home is always prefixed by the same lengthed string, cur the
> user-uuid:
> http://wiki2.dovecot.org/Variables
> "You can take a substring of the variable by giving optional offset
> followed by '.' and width after the '%' character. For example %2u gives
> first two characters of the username. %2.1u gives third character of the
> username. "
>

great! this is exactly what will solve my issue.



>
> You could get somewhere, if you rewrite the login user by user-uuid, then
> %u is the user's uuid.
>
>  Is it possible to for example set some special env variable from
>> checkpassword and than use it in namespace definition like home variable?
>>
>
> Is the checkpassword tool called for the users in a shared namespace???
> This would cost lots of peformance, because you need to call that script
> for each user, the current user gets shares from.
>

What is "lot"? I hope, it will be evaluated one once, when user login and
only once per each shared folder according to dictionary. So for example,
if user have access to two other mailboxes, Dovecot will exec two times
checkpassword as userdb lookup. Right?



>
> But if so, return MAIL:
> http://wiki2.dovecot.org/AuthDatabase/CheckPassword
> "Dovecot Extensions
>
> If you wish to return extra fields for Dovecot, set them in environment
> variables and then list them in EXTRA environment variable. The userdb
> extra fields can be returned by prefixing them with userdb_. For example: "
>

yes, i do it this way, for "sieve_default" for example. I set
userdb_sieve_default env and add its name to userdb_extra. But how can I
later access it on the right side for proper evalueating? When I use home
dir, there is a "%" shortcut.


Trying to get lda to deliver into public sub-sub-folder

2015-01-21 Thread Claudius
Hi,
I have this setup:

recipient_delimiter = +
mail_location = sdbox:~/sdbox
namespace {
  type = public
  prefix = public/
  location = sdbox:/home/vmail/shared/sdbox
  subscriptions = no
}

Postfix delivers via dovecot-lda:
dovecot_shared unix-   n   n   -   -  pipe
  flags=DRhu user=vmail:vmail argv=/usr/bin/env HOME=/home/vmail/shared
/usr/lib/dovecot/dovecot-lda -f ${sender} -m ${user}/${extension}

This works fine, ACL are manually defined and also work great.
If I want to deliver into a subfolder I tell postfix to rewrite it to:
folder+subfolder@dovecot_shared
This is how it looks like:
/home/vmail/shared/sdbox/mailboxes/{user}/{extension}/dbox-Mails

But with this setup I couldn't get it to deliver into a subfolder of
"subfolder/extension".

Is it at all possible? Changing the HOME directory does not work because
of the sdbox folder structure.

I tried to generate a service for each subfolder like that:
-m ${user}/subfolder/${extension}

But when I did not have an extension I got:
save failed to open mailbox {user}/subfolder/: Invalid mailbox name
even though it exists. I think it doesn't like the trailing slash, but I
don't know how to get rid of it.


Hope I explained it well enough :)

Regards,

Claudius