IspConfig 3 Dovecot mdbox alternate storage

Discussion in 'ISPConfig 3 Priority Support' started by Anandakrishnan, Aug 22, 2016.

  1. Anandakrishnan

    Anandakrishnan New Member

    I have installed IspConfig 3 on Ubuntu 16.04.1 VPS and chosen Mdbox as Maildir Format. My question is how can I add 'alternate storage' parameter that describes here http://wiki2.dovecot.org/MailboxFormat/dbox#Alternate_storage, so I can move message stores older than x days to alternate storage (I am planing to mount Amazon S3 using s3fs as Alternate store) executing altmove command through a cron job. I tried to insert '/var/vmail/[domain]/[localpart]:alt=/var/vmail-altstore/[domain]/[localpart]' it in MailDir path, but it says 'Invalid maildir path'. Is there any other way I can do it?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess this is not possible without changes in the ISPConfig code.
     
  3. Anandakrishnan

    Anandakrishnan New Member

    :( ... In fact I have achieved it by adding
    "mail_location = mdbox:/var/vmail/%d/%n/mdbox:ALT=/var/vmail-altstore/%d/%n/mdbox" to dovecot.conf and modifying dovecot-sql.conf line# 124 and 125 as
    • password_query = SELECT email as user, password, maildir as userdb_home, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '1'
    • user_query = SELECT email as user, maildir as home, 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'

    Although it works, it is not straight forward. Things may go wrong when I update ISPConfig without taking manual backups of modified files (or do you suggest any safer way?). It would be nice and great to have this feature in ISPConfig.
     
    Last edited: Aug 22, 2016
    till likes this.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can store a copy of the dovecot config file template in /usr/local/ispconfig/server/conf-custom/install/ where you include your changes to make them update safe. The template can be found in the install/tpl/ folder of the ispconfig tar.gz file.
     
    Anandakrishnan likes this.
  5. Anandakrishnan

    Anandakrishnan New Member

    :) Thank you. I'll give it a try.

    I'll update the changes as well...
     

Share This Page