Results 1 to 4 of 4

Thread: X-Spam header tag

  1. #1
    Join Date
    Feb 2012
    Posts
    28

    Lightbulb X-Spam header tag

    Hello all,

    I am using an external service which is able to tag spam message header with x-spam, as well as to tag the subject with [spam].
    My goal is to find a way to move these tagged messages to a Junk/Spam folder in the user mailbox.

    1. No all mailboxes have the the Junk folder.
    2. How can I make exim watch the spam tag and move the message to s designated pre-created spam folder?

    No spamassassin installed.

    Thanks in advance..

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,598
    Hello,

    This is how it does Directadmin with user level filters:

    Code:
    if    $h_X-Spam-Status: contains "Yes,"
    then
        if
            $local_part is "userbob"
        then
    
    
            save /home/userbob/Maildir/.INBOX.spam/new/ 660
        else
            if "${if exists{/home/userbob/imap/${domain}/${local_part}}{yes}{no}}" is "yes"
            then
                save /home/userbob/imap/$domain/$local_part/Maildir/.INBOX.spam/new/ 660
            else
                save /home/userbob/Maildir/.INBOX.spam/new/ 660
            endif
    
    
        endif
        finish
    endif
    userbob is a fake username here. So update it to meet your needs and if you manage to write a global rule which would not contain a username then you could place it in /etc/system_filter.exim
    Last edited by zEitEr; 06-16-2015 at 10:23 AM.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  3. #3
    Join Date
    Feb 2012
    Posts
    28
    Thanks for that Alex.
    Will this create the junk folder in case it does not exist?
    Will this apply to all mailboxes in the account?

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,598
    You're welcome. I've posted the way how directadmin does it, so that's up to you to modify it to meet your needs.
    Please feel free to test it and find answers on your questions by yourself.
    If you want me to write the 100% suitable solution for you then contact me privately for a quote.

    System filters placed in /etc/system_filter.exim are applied to all incoming emails for all users on a server.
    For further reading you can use this link: http://www.exim.org/exim-html-curren...ter_files.html
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •