FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian ISP

 
 
LinkBack Thread Tools
 
Old 09-13-2008, 09:47 AM
 
Default Perdition-mysql-select based on port?

Hi folks,

does anybody happen to know if one can configure the MySQL select
statement Perdition uses to query the database as follows?

We'd like to include the port users connect to our perdtion proxy in the
select (110 or 143) so we can decide wether the login should be
forwarded to the real mail host based on per-user settings.
Our MySQL table has been updated to

+-------------+--------------+------+-----+---------+
| Field | Type | Null | Key | Default |
+-------------+--------------+------+-----+---------+
| user | varchar(128) | NO | PRI | |
| servername | varchar(255) | NO | | |
| port | varchar(8) | YES | | NULL |
| allow_pop3 | int(11) | NO | | 0 |
| allow_imap | int(11) | NO | | 0 |
| allow_pop3s | int(11) | NO | | 0 |
| allow_imaps | int(11) | NO | | 0 |
+-------------+--------------+------+-----+---------+

The select statement we like to use is
SELECT servername,user,port FROM perdition WHERE user='<user>' AND (
allow_pop3=<port> or allow_imap=<port> or allow_pop3=<port> or
allow_imaps=<port>);

<user> is the pop3/imap user as usual and <port> should be 110, 995, 143
and 993 if the user connects by POP3, POP3S, IMAP4 and IMAP4S respectively.

(DB values for allow_pop3 are either 0 or 110, for allow_imap 0 or 143
etc. so we either have a match or not)

Thanks for any hints,
Norbert


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org