How about this possible workaround for domain aliases?
Joan
aseques at gmail.com
Tue Jul 9 16:36:06 CEST 2013
Hi,
I'd like if someone could have a look into this solution to workaround the
issue of domain alias.
Currenly I am having issues because in the cases where domainB.com is an
alias of domainA.com I have to populate two lists with blacklist/whitelist
entries which is a error prone job and not very useful.
Since we are using a filter system that is opt-in, we'd prefer to do the
alias mapping on the LDA (which is on another system that we not always
control), and so the preferred option can't be used.
Then I've thought about creating an extra table to map a domain with it's
alias (only one alias per domain)
Changing the white/blacklist query from
# $sql_select_white_black_list =
# 'SELECT wb'.
# ' FROM wblist JOIN mailaddr ON wblist.sid=mailaddr.id'.
# ' WHERE wblist.rid=? AND mailaddr.email IN (%k)'.
# ' ORDER BY mailaddr.priority DESC';
Into:
# $sql_select_white_black_list =
# 'SELECT wb'.
# ' FROM wblist JOIN mailaddr ON wblist.sid=mailaddr.id'.
# ' WHERE (wblist.rid=? OR allist.aid=?) AND mailaddr.email IN (%k)'.
# ' ORDER BY mailaddr.priority DESC';
This would be the new table (allist) with a prepopulated entry where the
rid is the main domain, and the aid is the alias domain.
CREATE TABLE IF NOT EXISTS `allist` (
`rid` int(10) unsigned NOT NULL default '0',
`aid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`rid`,`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `allist` (`rid`, `aid`) VALUES
(106, 145);
What do you think about it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20130709/751c1a49/attachment.html>
More information about the amavis-users
mailing list