Results 1 to 4 of 4

Thread: Email filtering

  1. #1
    Join Date
    Nov 2008
    Location
    S.H.I.E.L.D. 6-1-6
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Email filtering

    I currently have a hosting account at a serverhost that uses roundcube. I defined some filters to place emails in certain folders - but apparently they are only run when I open roundcube, as I can see my account unfiltered if I open from IMAP or SMTP.

    Is there an external mail client or something that I can run on a separate server to filter the email into the correct folders?
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Email filtering

    I use Thunderbird to do my filtering for me.

    Not sure if you'd want to do a push/pull or something to the current mail server or just connect a client to it and pull the mail from there via imap.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Nov 2008
    Location
    S.H.I.E.L.D. 6-1-6
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Email filtering

    Quote Originally Posted by CharlesA View Post
    I use Thunderbird to do my filtering for me.

    Not sure if you'd want to do a push/pull or something to the current mail server or just connect a client to it and pull the mail from there via imap.
    I have too many random clients that I connect using - and I dont keep my computer on 24/7
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Email filtering

    Install procmail on the server. Then you can place "recipes" into a .procmailrc file that will sort your mail automatically upon delivery. For instance, let's suppose you want anything with a subject that includes the word "Frozen" put in the "frozen" folder. In ~/.procmailrc, you'd create this recipe:
    Code:
    :0
    * ^Subject:.*frozen
    frozen
    Comparisons use extended regular expressions and are case-insensitive by default. Read "man procmailrc" and particularly "man procmailex" for details.

    Sorting into folders is only one of many things you can do with procmail. For instance, I wrote a script to handle non-delivery notices for some listservers I host:
    Code:
    # filter nondelivery notices
    :0
    * ^To:.*owner-*
    * ^Subject:.*deliver|^Subject:.*failure|^Subject:.*returned|^Subject:.*ndn
    | /home/scanner/ndn-handler
    That pipes message to the non-delivery handler that are sent to "owner-something" and include one of the trigger keywords in the Subject line. You can also have procmail examine the entire body of a message as well.

    Procmail has sometimes been called the "Swiss army knife" for mail administrators with good reason. It's installed by default on RedHat-flavored machines, but not on Ubuntu.
    Last edited by SeijiSensei; April 22nd, 2014 at 01:55 AM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

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