Edit Dovecot on cPanel to remove permanent spam and Junk folders

If you are like me, and have several mail accounts to maintain, you might be annoyed at the extra and unuseful 'spam' and 'Junk' folders cPanel forces you to see. Finally did some searching to see how to get rid of these and the solution found on the cPanel forums is straight forward and fast to implement.

cp /var/cpanel/templates/dovecot2.2/main.default  /var/cpanel/templates/dovecot2.2/main.local
vim /var/cpanel/templates/dovecot2.2/main.local

Then, edit the new file /var/cpanel/templates/dovecot2.2/main.local, removing the following entry:

mailbox spam {    
  special_use = \Junk    
  auto = create
}

If you wish to remove the Junk mailbox then remove also this code block:

mailbox spam {
  special_use = \Junk
  auto = create
}

Finally, save the changes and restart Dovecot with these commands:

/usr/local/cpanel/scripts/builddovecotconf
/scripts/restartsrv_dovecot

Read more…

Comments