On Tuesday 04 February 2003 12:37, Rick Erlandson wrote:
> I am using Postfix + Courier-imap + MySQL + Sqwebmail.. Postfix and
> Courier are doing exactly what I need (they look up the domain from mysql),
> and sqwebmail just has that one issue.. So does sqwebmail only look at
> that env variable if you are using vpopmail, or can I set it anyway?
Yes, it's only a vpopmail thing. The auth module for vpopmail looks for it in
a round-a-bout sort of way.
Does Postfix have IP-alias capability?
Here's the problem with your setup:
-----------------------------------
Users typically are logged in using a 'user@domain' string.
You're wanting to automate the retrieval of the 'domain' part.
We can do this a number of ways:
1.) grab the IP address of the current domain that sqwebmail has been called
from using the CGI environment variable 'SERVER_ADDR'.
We then either map this IP to a domain name using a file (vpopmail method)
or reverse look-up the IP using DNS. The reverse DNS lookup method is NOT
prefered, as not every valid domain name has a reverse look-up, and it
isn't very flexible.
2.) parse the domain name from the calling URL. For example, if we call sqwebmail
with the following URL:
http://www.yourdomain.com/cgi-bin/sqwebmail
Then we would have to cut off everything before the 'www.' part and
everything after the third '/' character before we could generate
'[EMAIL PROTECTED]'.
The problem with this approach is this: What about domains like
"mail.yourdomain.com"? How do we know what should be removed from the URL and
what should be kept? We can't.
SO. With that in mind, does Postfix provide a way to specify IP to domain look-ups?
And if so, how do I look them up from code?
I think the easiest way to implement all of this would be to create a new file in
the /usr/local/share/sqwebmail directory called 'ipauthmap' that contains IP:Domain
pairs, one per line, like the example below:
100.100.100.100:domain1.com
200.200.200.200:domain2.com
etc...
That way sqwebmail can specify it's own IP-aliases.
If people like me want to integrate this with vpopmail, they either improve the auth
module, or write a cron script to automatically build the ipauthmap file from
vpopmail's
IP-alias table.
This may take me a while to code. I'm still reading over the sqwebmail code.
>
>
> -----Original Message-----
> From: Jesse Guardiani [mailto:[EMAIL PROTECTED]]
> Sent: February 4, 2003 9:02 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [sqwebmail] sqwebmail login id and virtuals
>
>
> Are you using vpopmail? If so, you may be able to get away with setting
> the VPOPMAIL_DOMAIN environment variable from apache on a domain by domain
> basis inside the <virtualhost> tags.
>
> It's a bit more to maintain than automatic IP-alias mapping, but it works
> (I think).
>
> Just until I figure out how I want to handle this.
--
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v) 423-559-5145 (f)
http://www.wingnet.net
We are actively looking for companies that do a lot of long
distance faxing and want to cut their long distance bill by
up to 50%. Contact [EMAIL PROTECTED] for more info.