Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting rid of the spam folder

Discussion in 'E-mail Discussions' started by Lucas, Nov 2, 2016.

Tags:
  1. Lucas

    Lucas Well-Known Member

    Joined:
    Feb 22, 2003
    Messages:
    132
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Around the world
    cPanel Access Level:
    Root Administrator
    Right now I'm running MailScanner with ClamAV and have disabled SpamAssassin as well as the spam folder in tweak settings and exim configuration and all the email accounts still have the spam folder automatically created or recreated if you delete it. Any ideas on where should I look to get rid of this?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. Lucas

    Lucas Well-Known Member

    Joined:
    Feb 22, 2003
    Messages:
    132
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Around the world
    cPanel Access Level:
    Root Administrator
    Not really. I do not mind the Archive and Junk folders being automatically created, since this will work automatically with most email clients such as Thunderbird and Mac Mail client. The problem is that in our server we have this new "spam" folder. Not Junk, not Archive, but "spam" and cannot be removed. I just checked both of these threads you have mentioned and they discuss Junk and Archive.

    Hope that makes sense.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The spam folder isn't listed in those threads, but it's included as part of the folders that are created automatically per the following entry in /etc/dovecot/dovecot.conf:

    Code:
      mailbox spam {
        special_use = \Junk
        auto = create
      }
    Thank you.
     
  5. Lucas

    Lucas Well-Known Member

    Joined:
    Feb 22, 2003
    Messages:
    132
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Around the world
    cPanel Access Level:
    Root Administrator
    I see. Is there a way to make that "spam" folder just take the place of "Junk" which is the actual folder already created that works with most regular email clients? From that code it seems like that's what the idea is, but it does not seem to be working that way, if I am understanding correctly.
     
  6. Lucas

    Lucas Well-Known Member

    Joined:
    Feb 22, 2003
    Messages:
    132
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Around the world
    cPanel Access Level:
    Root Administrator
    Ok after checking the dovecot config I see you guys have both Junk and spam by default. I guess I am going back to support that suggestion to let us unsubscribe it by default.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,515
    Likes Received:
    33
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    As a work around, for now, you should be able to modify the template file as described here Configure Dovecot - Documentation - cPanel Documentation

    If you remove the configuration block from the main.local template, and rebuild the dovecot configuration, the result should not have the undesired "spam" special folder.
     
    Lucas likes this.
  8. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
    Did this work for you, Lucas? My web host updated their cPanel a few months ago and now I have "Junk" and "spam" folders for every email account on my server. It's frustrating to me because they don't seem to care that these two folders are confusing. They claim that there's nothing they can do about it, but that seems incredibly sloppy. I'm trying figure out if this is either apathy on their part or poor software on cPanel's part.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could provide your hosting provider a link to this thread to show them the instructions for disabling the SPAM folder auto-creation via the modification of the Dovecot configuration file.

    Thank you.
     
  10. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
    Michael, would what you're suggesting get rid of the "spam" folder and leave the "Junk" folder? Can you suggest what configuration they have to change to do that?
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Yes, you'd follow the instructions under "Add Dovecot Options" at:

    Configure Dovecot - Documentation - cPanel Documentation

    For example:

    Code:
    cp /var/cpanel/templates/dovecot2.2/main.default  /var/cpanel/templates/dovecot2.2/main.local
    vi /var/cpanel/templates/dovecot2.2/main.local
    When editing /var/cpanel/templates/dovecot2.2/main.local, remove the following entry:

    Code:
      mailbox spam {
        special_use = \Junk
        auto = create
      }
    Then, save the changes and run the following commands:

    Code:
    /usr/local/cpanel/scripts/builddovecotconf
    /scripts/restartsrv_dovecot
    Thank you.
     
  12. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
    Thank you for your reply!

    Does that "special_use" attribute default to \spam? Is that why I'm getting the "spam" folder? If so, was there a change recently to cPanel making that happen? This is the reason I've heard for why I have that folder now when I hadn't for years.
     
  13. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
    I discussed this with my web host and they're concerned that making the configuration changes would negatively impact their customers. I'm assuming that making those changes would not delete the "spam" folder from each of the email account but just make it not auto create. Is that the correct assumption?
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, that is correct. However, it is a global setting, so I can see why a shared hosting provider may not want to change it.

    Thanks!
     
  15. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
    Oh, I understand that. However, as a system administrator myself, I would see it as my duty to eliminate a suboptimal configuration for my users, especially one they were unhappy with. I can't imagine any user or server admin anywhere who would want two spam folders with two different names.

    The big confusion I have about all of this is that this folder or configuration was supposedly part of a cPanel update. Was there in fact an update that pushed this spam folder into place despite the fact there was already a Junk folder? ...or is this a local configuration thing? This seems a weird thing for cPanel to do across the board.
     
  16. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @dirkniblick,

    The primary reason for this change was to allow for maximum compatibility with email clients. Some email applications, such as non-English versions of Outlook 2013, relay on this automatic mapping. Otherwise, users lose the ability to move or delete messages. There's some more information from Dovecot, including a link to RFC 6154 at:

    MailboxSettings - Dovecot Wiki

    I encourage you to vote and add feedback to the following feature request if you'd like to see a change in the default behavior:

    Unsubscribe from default folders

    Thank you.
     
  17. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
    @cPanelMichael, I looked at that wiki page, but it doesn't show where the "spam" folder is called out. I see "Junk", but not "spam". Where'a the "spam" folder configured to auto create?

    And I completely agree with the mapping of folders to purpose, but why map two of them for the same thing? When I setup my account on my iPhone, it sets up those folders, but I can't unsubscribe from a "spam" folder in iOS. Sometimes I look at my mailbox and I see two "Junk" folders and other times I see "Junk" and "spam". Even my mail app is confused by this. And the real problem for me is iOS doesn't give me the option to unsubscribe from folders. It's the mere existence of the spam folder which is the problem and I don't believe that feature request (from a year ago) will address that.
     
  18. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @dirkniblick,

    The Dovecot document doesn't match the exact Dovecot configuration file used on cPanel, but it's useful if you want to have a better understanding of how Dovecot configuration options such as "special_use" or "auto" work. Here are the specific entries in /var/cpanel/templates/dovecot2.2/main.default that results in the automatic creation of the spam and junk folders:

    Code:
      mailbox Junk {
        special_use = \Junk
        auto = create
      }
    
      mailbox spam {
        special_use = \Junk
        auto = create
      }
    I do understand your point about the confusion caused due to the existence of both the Junk and Spam folders. We actually have an internal case open (CPANEL-5993) to address an issue where the SpamAssassin Spam Box folder is not consistent with the Junk special-use folder in dovecot.conf. This wouldn't solve the specific issue you are referencing, but it's another reason the feature you are seeking would add value. I recommend opening a feature request with the specific changes you'd like to see via:

    Submit A Feature Request

    The following document explains how feature requests work, and why it's the best method of requesting a change in functionality:

    How to use and what to expect from the cPanel features site | Guides

    Than you.
     
  19. dirkniblick

    dirkniblick Member

    Joined:
    Nov 15, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Omaha
    cPanel Access Level:
    Website Owner
  20. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    There's no update to report on this case at this time. It's a case that's monitored, but no determination has been made on if or when a change to the existing behavior will occur.

    Thank you.
     
Loading...

Share This Page