1

Possible Duplicate:
Is there a way to filter mails in remote IMAP account?

I want to setup an system on my server to filter my emails in folders and so on. The server is not an email relay, I want to handle it like an email client via IMAP. The reason is that I have multiple email clients (smartphone, etc.), and therefore I want to avoid to setup filter rules on each device.

My Plan is: I want to setup an email client which works on the console and able to connect via IMAP.

plucked
  • 317
  • 1
  • 2
  • 8
  • Okay, I choosed the wrong keywords during the internet search, and server fault shows me now the right thread here: http://serverfault.com/questions/45081/is-there-a-way-to-filter-mails-in-remote-imap-account – plucked Mar 22 '12 at 12:17
  • 1
    I would think that ImapFilter recommend in the accept answer at your link is not what you want. This is a tool than can do filtering on remote servers in absence of filtering capabilities on the IMAP server. Sieve or procmail will filter the mails as they arrive at the server, both work great. – Sven Mar 22 '12 at 12:21
  • Maybe I misrepresent my question. The IMAPFilter does excaclty what I wanted. Filter my Emails on a server, so I can get a filtering outside of my devices (e.g. for spam, ect.) – plucked Mar 22 '12 at 16:22

2 Answers2

3

I would advise you to set up and configure an MDA (Message Delivery Agent) that supports the Sieve mail filtering protocol; this MDA will then filter your mail before it even enters your IMAP server.

NOTE that mail reception and IMAP are unrelated; you can sort it when it is already delivered to your mail store, but this is decidedly sub-optimal.

I use and highly recommend Dovecot 2.x with the Pigeonhole Sieve plug=in.

adaptr
  • 16,479
  • 21
  • 33
3

Set up an IMAP server (e.g. Dovecot) that uses Sieve to filter the mails. You then can connect with whatever you want (including console based clients on the server directly) to your IMAP account.

The classical alternative to Sieve is procmail.

Sven
  • 97,248
  • 13
  • 177
  • 225