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.

Filter emails into inbox folder

Discussion in 'E-mail Discussions' started by ChrisConway, May 12, 2005.

  1. ChrisConway

    ChrisConway Member

    Joined:
    May 12, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Is there a server-side way to filter incoming emails and move them into a separate folder depending on specific conditions?

    For example, if the subject contains "Dilbert" - move it to the Dilbert folder or if the email is from @domain.com move it to the domain folder.

    Thanks,

    Chris
     
  2. ChrisConway

    ChrisConway Member

    Joined:
    May 12, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Does anyone know an answer to this?
     
  3. ccccanada

    ccccanada Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    I am not certain but I think you can set different rules in horde webmail where it would do that.
     
  4. challii

    challii Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    I know he doesnt want this, he wants this done by exim. So It will get filtered and then put into different IMAP folders.
     
  5. ChrisConway

    ChrisConway Member

    Joined:
    May 12, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Yes. I want exim or something to filter them -> I check email from different machines and don't want to remake the rules on every client.
     
  6. dnevins

    dnevins Member

    Joined:
    Jan 31, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I agree completely... I want to be able to set up a filter in cpanel to filter certain emails into various mail foders... does anyone know how to do this? It can't be that hard.

    Thanks,

    Dana
     
  7. ChrisConway

    ChrisConway Member

    Joined:
    May 12, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Dana,

    I managed to do this! It involes playing with /etc/vfilters/. Each domain has its own file, ie mine is ceejaycee.net.

    Here is an example of a line I put in my file:

    Code:
    if $header_subject: contains "The Planet Support Ticket"
    then
       save "/home/ceejayce/mail/ceejaycee.net/chris/Projects/Orbit Support Tickets" 0777
    endif
    
    if $header_subject contains "SPAM"
    then
       save "/home/ceejayce/mail/ceejaycee.net/chris/Trash" 0777
    endif
    If you need to find out some other rules, I think you can google for exim filters or rules - it's been a while since I made a rule. Hope that helps you.

    Chris
     
  8. dnevins

    dnevins Member

    Joined:
    Jan 31, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Nice, that looks like it will work, if not I will post what did work back here.

    Dana
     
  9. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    You are not running maildir !?

    There's no file to write to with maildir, just the folder.
    Then you should add a "/" after the folder.

    But - then this error will show:

    "directory_transport unset in central_filter router"

    Anyone have any idea on this one ?
    I'm trying to find out but it's not funny ...:)
     
  10. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    I found it!

    To filter mail to a Maildir accounts IMAP subfolder (!) you need to
    add this to exim conf under central_filter:

    It say already:
    file_transport = address_file

    Put this below:
    directory_transport = address_file

    This is because you are not writing to a file here, you're writing to a folder.

    You can use the cpanel filter interface as usally.
    Under "destination" write your path to the e-mail accounts "new" folder och
    the e-mailaccounts subfolders "new" folder.

    For example:
    Destination: /home/domain44/mail/domain44.com/support_email/.urgent/new/

    support_email = support_email@domain44.com
    .urgent = IMAP folder

    The "/" in the end is important.

    I will add this to a new thread as a how to - my first :)
     
Loading...

Share This Page