sql_select_policy based on sender AND recipient

Fabian Melters xx4h at xx4h.de
Sat Apr 25 00:41:08 CEST 2015


Hi,

is there any way to select policy based on sender AND recipient with
sql_select_policy?

    'SELECT users.*, policy.*, users.id'.
    ' FROM users LEFT JOIN policy ON users.policy_id=policy.id'.
    ' WHERE users.email IN (%k) ORDER BY users.priority DESC';

will only select a policy based on "recipient" and this way i'll end
up bypassing spam-checks all mails for a specific mail-address/user.

I have a multi-domain mailgate and want to create a default policy
for each domain. This default can be overwritten by a matching
sender/recipient combination. Most of this logic will be realized
with sql queries.

Am i missing something? Is there something i haven't noticed?

Thanks in advance

Fabian 'xx4h' Melters
-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 836 bytes
Beschreibung: Digital signature
URL         : <http://lists.amavis.org/pipermail/amavis-users/attachments/20150425/fcdc271d/attachment.sig>


More information about the amavis-users mailing list