$mydomain = "mail.xxx.com";
@local_domains_maps = ( [".$mydomain","iredmail.org"] );
the same result is obtained for both the internal and external mail.
$mydomain = "mail.xxx.com";
@local_domains_maps = ( [".$mydomain","iredmail.org"] );
the same result is obtained for both the internal and external mail.
Don't use 'iredmail.org' for testing...
Amavisd inserts mail header when:
- domain name is listed in @local_domains_maps.
- spam score is higher than $sa_tag_level_deflt
Don't use 'iredmail.org' for testing...
Amavisd inserts mail header when:
- domain name is listed in @local_domains_maps.
- spam score is higher than $sa_tag_level_deflt
OKKKKKKKKKKKKK
Works, but in a multidomain configuration I must add all domain manually ?
Works, but in a multidomain configuration I must add all domain manually ?
YES.
I know - old thread, but:
Is there any way to get around that? I mean what's the idea behind having iRedAdmin or postfixAdmin for adding new domains, if I still need to edit config files and restart services?
Are there any other files I need to update when I add new domains?
Ok, so after googling a little bit, seems like I found a solution for this problem.
There is a possibility to make amavis check the database for the list of local domains.
This works by adding $sql_select_policy and @lookup_sql_dsn with the DB connection info.
Possibly this would be a good change for 0.6.0.
The following changes have been done by myself:
@local_domains_maps commented out, select added.
Please be aware, that my current query assumes all of my domains beeing local. It would be an option to extend the SQL schema to have a real "local" flag per domain.
#@local_domains_maps = ( [".$mydomain","mail.mydomain.de"] ); # list of all local domains
$sql_select_policy = 'SELECT "Y" AS local FROM domain WHERE CONCAT("@", domain) IN (%k)';
Second required change was to add DSN information for DB to amavis
@lookup_sql_dsn = ( ['DBI:mysql:database=vmail;host=127.0.0.1;port=3306', 'vmail', 'your password comes here'] );
# @lookup_sql_dsn =
# ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
# ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
# ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
Hopefully this helps others.
This was very critical to myself, as I have other ppl having access to postfixAdmin but not to the physical machine.
This way they are able to add new domains with spam filtering activated.
Regards,
Phil
Already implemented this in LDAP, with 'amavisLocal=True'.
@ White :
THANK YOU,
this is an improvement I was looking for too (and banging my head bcoz customers were getting SPAM emails on hosted virtual domains).
It seems It's working (headers in emails now have X-SPAM flags), I just need to let Spamassassin learn new spam tags as time goes by (and hopefully block the sh-t out) ...
Already implemented this in LDAP, with 'amavisLocal=True'.
Hi!
Is this feature available in MySQL?
Regards.
ZhangHuangbin wrote:Already implemented this in LDAP, with 'amavisLocal=True'.
Hi!
Is this feature available in MySQL?
No, sorry.