Skip to main content

Server-wide per-account email filter?

Comments

8 comments

  • cPanelMichael
    Hello :) You can find information on using a system-wide filter on the following thread: System Level Filtering Thank you.
    0
  • ChrisTNM
    [quote="cPanelMichael, post: 1694002">Hello :) You can find information on using a system-wide filter on the following thread: System Level Filtering Thank you.
    Thanks! This is the direction I needed to get started but it only answers half my question. Let's say I do this: # Spam Subject if $header_subject: contains "{Spam" then # Save to "junk" folder? save "/dev/null" 660 endif
    Instead of nul-routing the email, how can I save it to the folder relevant to the account it's being delivered to? I still want to deliver the email, but in this case I want to deliver it to a specific folder. Is this possible?
    0
  • cPanelMichael
    One way to learn how to write filter rules is to create an account level filter in cPanel similar to what you want to do in a system filter, and then view the rule directly in: /etc/vfilters/$domain.com This will help show you how to write a filter rule. Thank you.
    0
  • ChrisTNM
    Alright, thank you. :)
    0
  • ChrisTNM
    Okay, so if I create a account level filter, then I get something like this: #{Spam?} if $header_subject: contains "{Spam?}" then save "$home/mail/domain.com/user/.Junk/" 660 endif
    How can I get the "domain.com/user" part dynamically so it goes into the correct users folder? This is the part I'm stuck on. Any assistance would really be appreciated. Is this even possible? Is there documentation on this somewhere? Edit: Found this: save "$home/mail/$domain/$local_part/.Junk/" 660
    Source:
    0
  • cPanelMichael
    Found this: save "$home/mail/$domain/$local_part/.Junk/" 660
    Source:
    0
  • ChrisTNM
    Were you able to verify if that rule worked as you intended?

    Actually, no.. it didn't work. It apparently didn't do anything after I enabled the rule from WHM in the exim config. I just tried sending an email with "{Spam?}" in the subject and it went right to my inbox. https://dl.dropboxusercontent.com/u/147879/2015-09-09_1041.png
    0
  • cPanelMichael
    You may want to post to the Exim users mailing list for input from other users about potential alternatives for the filter you require. Thank you.
    0

Please sign in to leave a comment.