dovecot Directory Layout =fs

Discussion in 'ISPConfig 3 Priority Support' started by spazio, Sep 2, 2021.

  1. spazio

    spazio Member HowtoForge Supporter

    Hi all
    Anybody had some succès with dovecot
    mail_location = maildir:~/Maildir:LAYOUT=fs
    On ispconfig3?

    I was only able to find a post on the subject but it's doesn't look like it was a succès...
    https://www.howtoforge.com/community/threads/where-to-set-layout-fs-in-ispconfig.86327/

    Looks like he changed the user_query in /etc/dovecot/dovecot-sql.conf
    Code:
    user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)),':LAYOUT=fs' as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '1'
    And He didn't follow up if he was able to make it work at the end.
    But there is also a password_query that he didn't change. Does it need to be changed also???
    Jessy pointed out that there was a mistake in his code and after correcting it, I tried it as follow in /etc/dovecot/dovecot-sql.conf
    Code:
    user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format),':LAYOUT=fs')as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '1'
    with partial succes
    Code:
    server1 root # doveadm user [email protected]@test.com
    field   value
    uid     5000
    gid     5000
    home    /var/vmail/test.com/test
    mail    maildir:/var/vmail/test.com/test/Maildir:LAYOUT=fs
    quota_rule      *:storage=104857600B
    sieve   /var/vmail/test.com/test/.sieve
    servier1 root #
    Even if it report as LAYOUT=fs the folders are created as follow:

    Code:
    drwx------  5 vmail vmail 4096 Sep  2 17:23 .test3
    drwx------  5 vmail vmail 4096 Sep  2 17:23 .test3.test4
    BTW: it's a new server and a new email box and there was a reboot after the dovecot-sql.conf was modified
    Any procedure or code example, comments on the matter would be very appreciated.

    Many thanks

    Spazio
     
    Last edited: Sep 3, 2021

Share This Page