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.

Can I convert an Account level filter to a User level filter?

Discussion in 'E-mail Discussions' started by Bosque Bill, Feb 8, 2015.

  1. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I've been creating Account level filters, but now realize I would be better served to move to User level filtering.

    Is there a way to convert my current Account level filter to User level? This would save much time as I have lots of filters that would otherwise have to be manually and laboriously recreated.

    I'm using cPanel Version 11.48.0 (build 9), if that makes a difference.

    Thanks.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The user level filters are stored in the directory associated with the email account. For example, if you create "123@domain.com", then the user level filter is stored in the following files:

    Code:
    /home/$username/etc/$domain.com/123/filter
    /home/$username/etc/$domain.com/123/filter.yaml
    
    The exception to this is the default email address of the account, which is the account username. That filter is stored in:

    Code:
    /home/$username/etc/filter
    /home/$username/etc/filter.yaml
    The "Account Level Filtering" values are stored per domain name in:

    Code:
    /etc/vfilters/$domain
    There are no options that allow you to automatically convert account level filters to user level filters, but you could use the above information to manually create/move the filter rules.

    Thank you.
     
  3. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for taking the time to answer my question. Your info allowed me to find the files, though I haven't tried to manually convert them yet.

    I did notice an apparent difference in how cPanel is set up on my server (I'm a client reseller, not the sysadmin.) The user level filters were as you describe, but the account level filters were located in:

    Code:
    /home/$username/.cpanel/filter.yml
    There are also filter.cache files, which I assume are to be used only by the system and I don't need to copy/move them.

    Thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You may want to move the filter.cache files out of the way after manually modifying the existing filter files for an account so the .cache files are regenerated.

    Thank you.
     
Loading...

Share This Page