spamfilter -> move to folder

Discussion in 'General' started by pbrille, Nov 24, 2009.

  1. pbrille

    pbrille New Member


    My ISPconfig 3 / Ubuntu Server already acts as a Mailserver. With the help of spamassassin it's possible for the client to detect which mail might be spam.

    I'm wondering if this is possible:
    The Mailserver puts the spam-marked mails into a special folder within the imap account so the mailclient doesn't need to do it.

    This leads to my next question:
    How can I arrange that every newly created mailbox automatically creates specific folders like "spam, sent, drafts, etc" within the imap inbox folder.

    Thx a lot!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Set the spamfilter to rewrite the subject of the email to e.g. **SPAM*** and then use the filters in the mail account settings to move the emails to a maildir of your choice.

    You will have to change the sourcecode of the email plugin in the server part.
  3. pbrille

    pbrille New Member

    I'm not sure if you got it right. I want the spams to be move server side, not by the mailclient.
    Rewriting the email plugin sourcecode? Am I the first one who is wishing such a feature? Is there any documentation regarding this?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I had understand your question and what I described above moves the emails on the server side and not the client.

    All available info is in the developer forum.
  5. pbrille

    pbrille New Member

    Maybe I did not get it. On the one hand you're saying that it needs to be setup in the mailbox settings, on the other hand you're saying that the mail mailplugin needs to be modified.

    I looked at "Email - Global Filters - Content Filter" but I have no idea how to do this accordingly.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You asked 2 different questions and I gave you 2 answers.

    The first one answers the question about Filtering of spam and the second one answers your question about createing new maildirs automatically on account creation.

    Add a new filter that filters for ***SPAM*** in the ubject tab and select to move them to the spam filter. Adding these filters works similarily like doing it in any email client like thunderbird.
  7. pbrille

    pbrille New Member

    I see, I'm sorry I did not get that.
    Regarding Spamfilter:
    I set it up the following way:
    Filter: Header Filter
    RegExp: ***SPAM***
    Data: <<empty>>
    Action: Filter

    But how does ispconfig know which folder it has to move in?
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to enter the foldername in the data field. E.g. "Junk"

Share This Page