[Maia-users] Mysql syntax to join mailaddr.id on both wblist.sid and wblist.rid

Ben Dugdale ben at apachecounty.net
Fri Apr 27 15:44:10 PDT 2007


Hi,

I'm trying to apply my users Maia Mailguard whitelist settings on the 
gateway Postfix servers in order to bypass greylisting and RBL checks 
for whitelisted mail.

The problem I'm having is that with my feeble understanding of mysql, I 
don't know how to select on both the mailaddr.email associated with 
wblist.sid and the mailaddr.email associated with wblist.rid.

Help?


mysql> describe wblist; describe mailaddr;
+-------+------------------+------+-----+---------+-------+
| Field | Type             | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| rid   | int(10) unsigned |      | PRI | 0       |       |
| sid   | int(10) unsigned |      | PRI | 0       |       |
| wb    | char(1)          |      |     |         |       |
+-------+------------------+------+-----+---------+-------+
3 rows in set (0.03 sec)

describe mailaddr;
+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| id       | int(10) unsigned |      | PRI | NULL    | auto_increment |
| priority | int(11)          |      |     | 7       |                |
| email    | varchar(255)     |      | UNI |         |                |
+----------+------------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)

Thanks!



More information about the Maia-users mailing list