Re: [exim] Sourcing Exim Filter from MySQL/MariaDB table?

Pàgina inicial
Delete this message
Reply to this message
Autor: Odhiambo Washington
Data:  
A: Mike Tubby
CC: exim users
Assumpte: Re: [exim] Sourcing Exim Filter from MySQL/MariaDB table?
On Wed, 8 May 2019 at 01:01, Mike Tubby via Exim-users <exim-users@???>
wrote:

> I'm building an Exim/Dovecot/Nginx/Roundcube system to replace our
> ancient public mailserver (Redhat 9, Exim 4.14, Courier-IMAP).
>
> The new system OS is Devuan 3.0 "Beowulf" with MariaDB 10.3 (no systemd
> entanglement ;-) and I've built a database to host users, passwords,
> domains, aliases, vacation messages etc. based on Alex's recopies over
> here:
>
> http://alex.mamchenkov.net/2010/06/24/exim-dovecot-and-mysql/
>
> and have Exim 4.92 compiled from source, clients connecting and
> authenticating, sending and receiving email and Dovecot serving it, etc.
> but have discovered that some of my users have custom Exim filters set
> up in their .forward files, for example:
>
> # Exim filter <= do not remove this line!!!
>
> if $header_to contains "asterisk-users" or
>     $header_cc contains "asterisk-users" or
>     $header_to contains "asterisk-dev" or
>     $header_cc contains "asterisk-dev" or
> then
>     save "$home/Maildir/.Asterisk/"
>     finish
> endif

>
> On the old server everyone with a mailbox has a unix account and hence
> had access to their home directory where they could place a ".forward"
> file with the magic "# Exim filter" first line.
>
> With the new system there are no user logins and all users have virtual
> mailboxes stored in:
>
> /var/spool/mail/<domain>/<local_part>/{cur|new|tmp}
>
> is there a way to implement per-user filtering by having Exim read it
> from a MySQL/MariaDB table at delivery/processing time?
>
>

You can use sieve by adding dovecot-pigeonhole to your setup.
If you give people access to webmail using Roundcube (or SOGo), they can
manage their sieve rules
from the webmail interface. You can start from
https://forum.directadmin.com/showthread.php?t=43332
or just search for "Exim Dovecot sieve" and choose your HOWTO.


--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)