[Foss-cafe] mail filtering setup protocol

Fred Smith fps at dividedsky.net
Wed May 19 19:45:53 CDT 2004


On Wed, 2004-05-19 at 20:15, Daniel Cassidy wrote:
> Uhh, I think you totally missed the point. Which is, it is in theory
> possible to modify IMAP to allow the client to specify filter rules
> which will be implemented by the server, and that perhaps IMAP should be
> modified in such a way, and if not, perhaps a companion protocol/service
> should exist to do such a job.

As someone who runs a fairly heavily trafficed IMAP/SMTP/POP3 server,
IMAP is *not* the place to put filtering and sorting rules. Your IMAP
server, in order to filter effectively, would need to either constantly
be watching for file changes in the mailbox of every user on the system,
or would need to scan your entire mailbox every time you connected to
look for messages that may need filtering. Instead, filtering should be
done within, or shortly after the inital SMTP conversation. Doing it
within the SMTP conversation is possible but difficult, as the SMTP
conversation needs to be over quickly;  SMTP servers are busy creatures
and will give up if they have to wait too long. Doing it shortly
afterwards doesn't allow you to reject mail as part of your filtering
process;  a goal more and more desirable as one looks at the current
state of junk mail filtering.

None of the 3 possible places are 'good', but I feel that inside the
SMTP engine is the least bad place. Unfortunately, there are also no
solutions that do both filtering and sorting before accepting a message
in the SMTP conversation;  the closest is messagewall, which does
filtering but leaves the sorting up to something like procmail. So,
moving on, the next least bad place for sorting and filtering is shortly
after the SMTP conversation, using a tool like procmail.

Now that we've established that procmail (or something like it) is the
tool for the job (and *not* the IMAP server..  ugh), we can get back to
the question which is, 'how do I make this nice enough that Joe user can
get it to work'.  Webmin has a module to edit procmail rules, but it's
not built into the mail client so you can't build a rule based on a
message. It's better than nothing, however.  Maybe someone could build a
system that integrates with KMail or evolution , writes a procmail rule
and syncs it up with a procmail file over sftp/ftp?  Alternately, we can
set up yet another daemon to do nothing but handle procmail changes,
which seems a bit weird to me.  The third (and probably best) solution
is to get filtering built into a project like messagewall or
exim/postfix/qmail so that spam filtering and sorting can take place
using the same interface. 

> Pupeno, my personal opinion is that you should ignore the whinings of
> purists and go away and modify the IMAP protocol to your heart's
> content, create a proof-of-concept for your idea, and then if it works
> hopefully it will become popular and, as a result, a standard.

Filtering in IMAP is a bad idea.  put it in another protocol if you
want, or just write a handy procmailrc editing tool that integrates with
the mail client.


-- 
Fred Smith <fps at dividedsky.net>
Divided Sky Internet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://ofb.biz/pipermail/foss-cafe_ofb.biz/attachments/20040519/9fb9106f/attachment.sig>


More information about the Foss-cafe mailing list