The attached patch enables dbmail to use a simple procmail-like
mechanism for filtering incoming mail. Rather than always delivering to
INBOX, users can now filter their mail with regular expressions and
direct them to different folders. For example, a pattern like
^List-Id:.*dbmail\.org
can be used to direct all mail from the dbmail lists to a specific
folder.
It should be possible for untrusted users to create these filters, and
it's very fast, so of course it can only do pretty simple matching
(POSIX enhanced regexes) and has no command execution etc. like
procmail.
To make this work, my patch adds the "filter" table. If this table is
not present, everything will work like always, so backward compatibility
shouldn't be an issue.
A method for users to input these regular expressions is not included,
as it will probably be a part of a web interface for user administration
at each site.
--
Jonas Jensen <jbj@knef.dk>
mechanism for filtering incoming mail. Rather than always delivering to
INBOX, users can now filter their mail with regular expressions and
direct them to different folders. For example, a pattern like
^List-Id:.*dbmail\.org
can be used to direct all mail from the dbmail lists to a specific
folder.
It should be possible for untrusted users to create these filters, and
it's very fast, so of course it can only do pretty simple matching
(POSIX enhanced regexes) and has no command execution etc. like
procmail.
To make this work, my patch adds the "filter" table. If this table is
not present, everything will work like always, so backward compatibility
shouldn't be an issue.
A method for users to input these regular expressions is not included,
as it will probably be a part of a web interface for user administration
at each site.
--
Jonas Jensen <jbj@knef.dk>