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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mike Tubby
Dátum:  
Címzett: exim-users
Tárgy: [exim] Sourcing Exim Filter from MySQL/MariaDB table?
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?


Mike