During the mail server setup, I am facing to edit/add the line in between the specified tag containing lines in dovcot (pop3 server). It’s just because of that default configuration files having more than 1000 line and 97% of lines are instructions.
So I would like to remove all the lines begin with the word “#” to get a clean, configuration lines.
# sed -e '/#/d' /tmp/dovecot.conf
#mv /etc/dovecot.conf /etc/dovecot.conf-bk
# cp /tmp/dovecot.conf /etc/dovecot.conf
-sh-3.2# service dovecot restart
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]
Note : Ensure that you have a backup copy before doing this