Re: [Courier-imap] Problem with MYSQL_AUXOPTIONS

2006-08-03 Thread Sam Varshavchik

krystian writes:


Hi!
I have problem with MYSQL_AUXOPTIONS. It doesn't work.
This is from mysql log:

" 5 Query   SELECT email, crypt, clear, uid, gid, homedir, maildir, 
quota, name, "" FROM postfix_users WHERE email = 
"[EMAIL PROTECTED]" AND (access='y') "


My authmysql:

" MYSQL_AUXOPTIONS_FIELD 
CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)"



Hope somebody can help me. I'm not sure if problem is with Authlib or 
CourierImap.


Check for superfluous whitespace.  No leading whitespace before 
MYSQL_AUXOPTIONS_FIELD





pgpLiDXEDD5gt.pgp
Description: PGP signature
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap


[Courier-imap] $(server_port) and/or $(server_addr) request

2006-08-03 Thread Mike Cardwell
Hi,

I'm using courier-imap with a mysql backend containing the
configuration. My current users have usernames such as:

[EMAIL PROTECTED]

There are a *large* amount of users on another mail system that I am
trying to migrate in at the moment, but they're used to using
usernames without the "@domain" bit. They're all in fact on the same
domain.

I was hoping to provide a different ip address for these new users and
to allow them to continue using their same login details. I would get
the load balancers to forward imap connections to a different port on
the imap server cluster boxes, and then use the port the connection was
coming in on as part of the MySQL query in the courier config...
Something along the lines of:

SELECT mail_dir.username,
   mail_dir.password_hash,
   mail_dir.password_clear,
   mail_dir.uid,
   mail_dir.gid,
   mail_dir.path,
   '',
   0
  FROM mail_dir
 WHERE local_part = '$(local_part)'
   AND domain = IF( '$(server_port)' == '14301',
'newcustomers.generic.domain'
'$(domain)'
  )
);

I could of course, set a default domain to be the
newcustomers.generic.domain, however I will be migrating accounts from
other mail systems in the near future and there are certain to be
username conflicts.

Basically, what I'm looking for is a $(server_port) functionality. I've
had a brief look at adding this into authmysqllib.c but my c skills are
pretty poor... I'm pretty sure adding the variable would be straight
forward, but I'm not sure where to actually grab the port from...

My other options are to run a separate copy of courier-imap on a
different port, or to email the userbase telling them to start using a
new username. I'd like to avoid these two options despite their
advantages if at all possible.

I think the ability to differentiate between accounts depending on the
server port or ip address connected to, would be a worthwhile feature...

Thanks for your time,

Mike

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap


Re: [Courier-imap] $(server_port) and/or $(server_addr) request

2006-08-03 Thread Brian Candler
On Thu, Aug 03, 2006 at 06:23:36PM +0100, Mike Cardwell wrote:
> There are a *large* amount of users on another mail system that I am
> trying to migrate in at the moment, but they're used to using
> usernames without the "@domain" bit. They're all in fact on the same
> domain.
> 
> I was hoping to provide a different ip address for these new users and
> to allow them to continue using their same login details. I would get
> the load balancers to forward imap connections to a different port on
> the imap server cluster boxes, and then use the port the connection was
> coming in on as part of the MySQL query in the courier config...
...
> I could of course, set a default domain to be the
> newcustomers.generic.domain, however I will be migrating accounts from
> other mail systems in the near future and there are certain to be
> username conflicts.

You can have different default domains depending on the IP address they
connect to, which I think this is what you want. Do this by setting
DEFDOMAIN using the couriertcpd -access and -accesslocal options. See man 1
couriertcpd; you can set these options in the TCPDOPTS setting.

HTH,

Brian.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap


Re: [Courier-imap] $(server_port) and/or $(server_addr) request

2006-08-03 Thread Michael Bowe
- Original Message - 
From: "Brian Candler" <[EMAIL PROTECTED]>


> You can have different default domains depending on the IP address they
> connect to, which I think this is what you want. Do this by setting
> DEFDOMAIN using the couriertcpd -access and -accesslocal options. See man 
> 1
> couriertcpd; you can set these options in the TCPDOPTS setting.


Yes this method works well.

I have an example here
http://www.pipeline.com.au/staff/mbowe/isp/postfix-server.htm#DEFAULT_IMAP_POP3_DOMAIN_PER_HOSTNAME

Michael. 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap


Re: [Courier-imap] Problem with MYSQL_AUXOPTIONS

2006-08-03 Thread krystian




Sam Varshavchik wrote:
krystian writes:
  
  
  Hi!

I have problem with MYSQL_AUXOPTIONS. It doesn't work.

This is from mysql log:


" 5 Query   SELECT email, crypt, clear, uid, gid, homedir, maildir,
quota, name, "" FROM postfix_users WHERE email =
"[EMAIL PROTECTED]" AND (access='y') "


My authmysql:


" MYSQL_AUXOPTIONS_FIELD
CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)"



Hope somebody can help me. I'm not sure if problem is with Authlib or
CourierImap.

  
  
Check for superfluous whitespace.  No leading whitespace before
MYSQL_AUXOPTIONS_FIELD
  
  
  
  

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
  

___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
  

Thanks. It works now.

Regards,
Krystian


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap