On 03/22/2017 09:16 PM, Rob McAninch wrote:>> On Mar 22, 2017, at 18:25, Robert Moskowitz <rgm at htt-consult.com> wrote: >> >> >> >>> On 03/22/2017 11:36 AM, chaouche yacine wrote: >>> Robert, >>> >>> What would be the benefit of using sed against making customized files and just copying them ? I'd probably just want to copy a working version of /etc/dovecot/ conf files instead of modifying my existing files with sed scripts (or create new ones with cat). >> new options are left unaltered. I learned this with postfix, to use postconf instead of trying to replace main.cf. >> >> I thought about mv old confs then cat new confs, but again, there are other things set up, and I worked at changing what needed customization, rather than wholesale replacement. > Did you consider putting your customization in a local.conf which should be tried at the end? Could put whatever explanation in there you want. On a system like Debian this would more easily allow the default files to be upgraded without intervention. >I have not seen any reference to a local.conf. Can you point this out to me? I will have to see that it is maintained in Centos. But some of the mods are additions (like plugins) to existing lines. I would have to find out how those are processed. thanks
-- Rob McAninch robmcaninch.com (Sent from my iPhone)> On Mar 22, 2017, at 23:53, Robert Moskowitz <rgm at htt-consult.com> wrote: > > > > On 03/22/2017 09:16 PM, Rob McAninch wrote: >>> On Mar 22, 2017, at 18:25, Robert Moskowitz <rgm at htt-consult.com> wrote: >>> >>> >>> >>>> On 03/22/2017 11:36 AM, chaouche yacine wrote: >>>> Robert, >>>> >>>> What would be the benefit of using sed against making customized files and just copying them ? I'd probably just want to copy a working version of /etc/dovecot/ conf files instead of modifying my existing files with sed scripts (or create new ones with cat). >>> new options are left unaltered. I learned this with postfix, to use postconf instead of trying to replace main.cf. >>> >>> I thought about mv old confs then cat new confs, but again, there are other things set up, and I worked at changing what needed customization, rather than wholesale replacement. >> Did you consider putting your customization in a local.conf which should be tried at the end? Could put whatever explanation in there you want. On a system like Debian this would more easily allow the default files to be upgraded without intervention. >> > I have not seen any reference to a local.conf. Can you point this out to me? I will have to see that it is maintained in Centos. But some of the mods are additions (like plugins) to existing lines. I would have to find out how those are processed.It is mentioned here http://wiki.dovecot.org/ConfigFile Debian Jessie has the last line of dovecot.conf as: !include_try local.conf -- Rob
On 03/23/2017 12:15 AM, Rob McAninch wrote:> > > -- Rob McAninch robmcaninch.com (Sent from my iPhone) >> On Mar 22, 2017, at 23:53, Robert Moskowitz<rgm at htt-consult.com> wrote: >> >> >> >> On 03/22/2017 09:16 PM, Rob McAninch wrote: >>>> On Mar 22, 2017, at 18:25, Robert Moskowitz<rgm at htt-consult.com> wrote: >>>> >>>> >>>> >>>>> On 03/22/2017 11:36 AM, chaouche yacine wrote: >>>>> Robert, >>>>> >>>>> What would be the benefit of using sed against making customized files and just copying them ? I'd probably just want to copy a working version of/etc/dovecot/ conf files instead of modifying my existing files with sed scripts (or create new ones with cat). >>>> new options are left unaltered. I learned this with postfix, to use postconf instead of trying to replace main.cf. >>>> >>>> I thought about mv old confs then cat new confs, but again, there are other things set up, and I worked at changing what needed customization, rather than wholesale replacement. >>> Did you consider putting your customization in a local.conf which should be tried at the end? Could put whatever explanation in there you want. On a system like Debian this would more easily allow the default files to be upgraded without intervention. >>> >> I have not seen any reference to a local.conf. Can you point this out to me? I will have to see that it is maintained in Centos. But some of the mods are additions (like plugins) to existing lines. I would have to find out how those are processed. > It is mentioned here > http://wiki.dovecot.org/ConfigFile > > Debian Jessie has the last line of dovecot.conf as: > > !include_try local.confDid a tail and see the same line in Centos. I will have to think about the best way to use this and if it CAN be used for all the customization. I have some ideas. Starting with a comment of which conf.d file a particular section is customizing. thanks
On 03/22/2017 11:15 PM, Rob McAninch wrote:> > > -- Rob McAninch robmcaninch.com (Sent from my iPhone) >> On Mar 22, 2017, at 23:53, Robert Moskowitz<rgm at htt-consult.com> wrote: >> >> >> >> On 03/22/2017 09:16 PM, Rob McAninch wrote: >>>> On Mar 22, 2017, at 18:25, Robert Moskowitz<rgm at htt-consult.com> wrote: >>>> >>>> >>>> >>>>> On 03/22/2017 11:36 AM, chaouche yacine wrote: >>>>> Robert, >>>>> >>>>> What would be the benefit of using sed against making customized files and just copying them ? I'd probably just want to copy a working version of/etc/dovecot/ conf files instead of modifying my existing files with sed scripts (or create new ones with cat). >>>> new options are left unaltered. I learned this with postfix, to use postconf instead of trying to replace main.cf. >>>> >>>> I thought about mv old confs then cat new confs, but again, there are other things set up, and I worked at changing what needed customization, rather than wholesale replacement. >>> Did you consider putting your customization in a local.conf which should be tried at the end? Could put whatever explanation in there you want. On a system like Debian this would more easily allow the default files to be upgraded without intervention. >>> >> I have not seen any reference to a local.conf. Can you point this out to me? I will have to see that it is maintained in Centos. But some of the mods are additions (like plugins) to existing lines. I would have to find out how those are processed. > It is mentioned here > http://wiki.dovecot.org/ConfigFile > > Debian Jessie has the last line of dovecot.conf as: > > !include_try local.confFinally revamped my approach to a local.conf file. I maintained an organization based on which conf file is 'modified' to assist review against later versions of Dovecot. I had observed in developing this, using a guide written for Centos6 (and no telling really how old), that some things had changed. Of course, I still have to test this out. I have quotas actually handled in postfix and dovecot. I can think of reasons why you do both. And if you see anything here obviously wrong, I appreciate any review. Will save me headaches later. Thanks for the help so far. Here is what I got: cat <<EOF>/etc/dovecot/local.conf || exit 1 # Developed on Dovecot 2.2.10 # dovecot.conf protocols = imap pop3 lmtp sieve dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } # 10-auth.conf !include conf.d/auth-sql.conf.ext # auth-sql.conf.ext userdb { driver = prefetch } # 10-mail.conf mail_location = maildir:/home/vmail/%d/%n first_valid_uid = 101 first_valid_gid = 12 # 10-master.conf service auth { unix_listener auth-userdb { mode = 0666 user = vmail group = mail } unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix } } service dict { unix_listener dict { mode = 0666 user = vmail group = mail } } # 10-ssl.conf ssl_cert = </etc/pki/tls/certs/$your_host_tld.crt ssl_key = </etc/pki/tls/private/$your_host_tld.key # 15-lda.conf postmaster_address = postmaster@$your_domain_tld protocol lda { mail_plugins = quota sieve } lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes # 20-imap.conf imap_client_workarounds = delay-newmail protocol imap { mail_plugins = quota imap_quota trash } # 20-lmtp.conf lmtp_save_to_detail_mailbox = yes protocol lmtp { mail_plugins = sieve } # 20-managesieve.conf service managesieve-login { inet_listener sieve { port = 4190 } service_count = 1 process_min_avail = 0 vsz_limit = 64M } # 20-pop3.conf pop3_client_workarounds = outlook-no-nuls oe-ns-eoh protocol pop3 { mail_plugins = quota } # 90-acl.conf plugin { acl = vfile:/etc/dovecot/global-acls:cache_secs=300 } # 90-quota.conf plugin { quota = dict:user::proxy::sqlquota trash = /etc/dovecot/dovecot-trash.conf.ext } # 90-sieve.conf plugin { sieve_before = /home/sieve/globalfilter.sieve } EOF