Question about old Amavis thread
Dino Edwards
dino.edwards at mydirectmail.net
Fri Oct 7 19:13:03 CEST 2016
Not sure if you meant to e-mail me or Thomas but here’s my answer:
In order to assign file rules to users, you need to first have policies. Then you assign file rules to those policies and then you assign the policies to users.
In order for all that to work, you need to have a users and policy sql tables and then you configure a DSN in amavis to run queries against the users and policy tables. In particular the users table has a column called “banned_rulesnames” and in there you would put the name of the file rule you created. The users table has “policy_id” column and you set that to the id of the policy that contains the file rule.
The sql table definitions and schema for amavis can be found here:
https://amavis.org/README.sql-mysql.txt
the DSN to connect to the database I use is below. This goes in your amavis config file:
@lookup_sql_dsn = (
['DBI:mysql:database=amavis;host=127.0.0.1;port=3306',
'database_user',
'database_password']);
The SQL query I use for the users/policy tables I use is below. This also goes in your amavis config file:
$sql_select_policy = 'SELECT *, users.id FROM users,policy'.
' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))';
' ORDER BY users.priority DESC';
Hope that helps. Let me know if you need anything else.
Dino
--
[hermes_logo3]
Hermes Secure Email Gateway
Hermes Secure Email Gateway combines Open Source technologies such as Postfix, Apache SpamAssassin, ClamAV, Amavisd-new, MySQL and CipherMail under one unified web based Web GUI for easy administration and management of your incoming and ougoing email for your organization. Anti-spam, anti-virus and anti-malware protection, encrypted S/MIME, encrypted PDF and SMTP TLS support, built-in email archiving, end-user self-service web gui.
Download the free open-source appliance at:
http://www.deeztek.com/hermes-secure-email-gateway/
From: amavis-users [mailto:amavis-users-bounces+dino.edwards=mydirectmail.net at amavis.org] On Behalf Of Rodrigo de Campos
Sent: Friday, October 07, 2016 11:10 AM
To: thomas.spuhler at btspuhler.com
Cc: amavis-users at amavis.org
Subject: Question about old Amavis thread
Hi Thomas (and Amavis mailing list),
We don't know each other, however, in the company where I'm currently working we're facing issues with Amavis and I thought that perhaps you could help us.
I'm talking about this: https://lists.amavis.org/pipermail/amavis-users/2016-March/004082.html
You mention "Here's the whole config I use for a rule named "Default" since I like to assign file rules to amavis rules which in turn I assign to particular users"
Please, how do you do to assign those rules to some particular users?
PS: I'm sending a copy to the Amavis mailing list, too. If somebody else knows the answer, I would be very thankful for helping out.
Thanks a lot!
--
Rodrigo de Campos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20161007/173b5b03/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 1921 bytes
Desc: image003.jpg
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20161007/173b5b03/attachment.jpg>
More information about the amavis-users
mailing list