Mail Filter doesn't delete mails

Discussion in 'Installation/Configuration' started by lupuscorridor, May 19, 2010.

  1. lupuscorridor

    lupuscorridor New Member

    Hi,

    I am using debian linux with ISP Config 3 and i created a catch-all-E-Mail-Adress. Now I want, that all mails to one recopient-adress schould be deleted.
    For excamle. The Catch-All-Adress is @abcd.de. All mails to [email protected] shoud be deleted.
    Thats why I created a Mail-Filter-Entry:

    To Is [email protected]
    Delete

    The Costum-Rules after safing these filter ar:
    ### BEGIN FILTER_ID:8\nif (/^To:xyz@abcd\\.de$/:h)\n{\nexception {\nto /dev/null\n}\n}\n### END FILTER_ID:8\n

    But the mails I send to [email protected] are still in my mailbox.

    What can I do to fix these Problem? How can I delete mails to these adress automaticly?

    Thanks for Helping!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which ISPConfig version do you use?
     
  3. lupuscorridor

    lupuscorridor New Member

    It ist 3.0.1.4. It was Installed with the Perfect Server instruction.
    Seems I shoud update it to the 3.0.2.1. I will try that first!
     
    Last edited: May 19, 2010
  4. lupuscorridor

    lupuscorridor New Member

    Ok, now it is 3.0.2.1 but still the same problem. But now the costum-Rules looks like:
    ### BEGIN FILTER_ID:9
    if (/^To:xyz@abcd\.de$/:h)
    {
    exception {
    to /dev/null
    }
    }
    ### END FILTER_ID:9
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The filter rule looks fine. Have you tried to move the email to another folder instead of deleting it?
     
  6. lupuscorridor

    lupuscorridor New Member

    Now I tested that. I said "move to test". The folder "test" didn't exist before. Now the folder is here (automaticly created) but no e-mail in it. The E-mail still in the normal Inbox.

    The Costum Rules now is:
    ### BEGIN FILTER_ID:9

    `test -e "$DEFAULT/.test" && exit 1 || exit 0`
    if ( $RETURNCODE != 1 )
    {
    `maildirmake -f "test" $DEFAULT`
    `chmod -R 0700 "$DEFAULT/.test"`
    `echo "INBOX.test" >> $DEFAULT/courierimapsubscribed`
    }
    if (/^To:xyz@abcd\.de$/:h)
    {
    exception {
    ID9EndFolder = "$DEFAULT/.test/"
    to $ID9EndFolder
    }
    }
    ### END FILTER_ID:9
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please use for your rule "Contains" instead of "Is" in the filter settings.
     
  8. lupuscorridor

    lupuscorridor New Member

    Great! That worked. Move and delete works fine now. Thanks allot!
     

Share This Page