#1  
Old 25th October 2012, 23:38
quickfox quickfox is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Angry dovecot MasterUser

Hi guys,

Trying to follow this: http://wiki.dovecot.org/Authentication/MasterUsers

To let me set up a master user so that I can migrate all mail away from ISPConfig for one domain.

I made a new boolean field on the mail_user table called "master_user". I set this to '1' for all desired users.

Here is a snippet from my dovecot.conf & then the 2 sql queries I am using.

Code:
auth_master_user_separator=*                                                                                                                                                    
auth default {                                                                                                                                                                  
  mechanisms = plain login                                                                                                                                                      
                                                                                                                                                                                
  # SQL database <doc/wiki/AuthDatabase.SQL.txt>                                                                                                                                
  passdb sql {                                                                                                                                                                  
    # Path for SQL configuration file                                                                                                                                           
    args = /etc/dovecot/dovecot-sql-master.conf                                                                                                                                 
        master = yes                                                                                                                                                            
        pass = yes                                                                                                                                                              
  }                                                                                                                                                                             
                                                                                                                                                                                
  passdb sql {                                                                                                                                                                  
    args = /etc/dovecot/dovecot-sql.conf                                                                                                                                        
  }
userdb prefetch {                                                                                                                                                             
  }                                                                                                                                                                             
                                                                                                                                                                                
  userdb sql {                                                                                                                                                                  
    args = /etc/dovecot/dovecot-sql.conf                                                                                                                                        
  }
Here is my dovecot-sql-master.conf (without the mysql detail)

Code:
default_pass_scheme = CRYPT                                                                                                                                                     
password_query = SELECT login as user, 'masterPassword' as password FROM mail_user WHERE login = '%u' AND master_user = true
user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
Here is my dovecot-sql.conf

Code:
default_pass_scheme = CRYPT                                                                                                                                                     

password_query = SELECT password FROM mail_user WHERE login = '%u' AND disable%Ls = 'n'
user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
I still can't auth via telnet when I try the following:

1 login user@mydomain.com*master@mydomain.com masterPassword

Can anyone tell me what I am doing incorrectly?
Reply With Quote
Sponsored Links
  #2  
Old 25th October 2012, 23:50
quickfox quickfox is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After posting this, I see one problem - which is ofc my sql-master password query is returning, user & password.

I've updated this....testing.
Reply With Quote
  #3  
Old 25th October 2012, 23:55
quickfox quickfox is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's my updated dovecot-sql-master.conf:

Code:
password_query = SELECT 'masterPassword' as password FROM mail_user WHERE login = '%u' AND master_user = true
Although this still doesn't work.

I can auth just fine as a user I know the password for:

1 login username@mydomain.com passWord
Reply With Quote
  #4  
Old 26th October 2012, 08:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
Default

ISPConfig uses standard maildir format like most other Linux mail servers, so you can just copy over the maildirs to your new server without the need of a master user.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 28th October 2012, 21:13
quickfox quickfox is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi till,

Sorry - been away for a few days. Thanks for the reply!

We are moving to a non maildir setup though - so it would be great to use imapsync.

Can you offer any tips here?

Thx,

quick
Reply With Quote
  #6  
Old 29th October 2012, 08:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
 
Default

Have you considered to set the same password for all users of that domain temporarily in the ispconfig mysql database for the migration?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3 Single server issues on POP3/IMAP/ MyDNS vk1003 Installation/Configuration 7 17th July 2012 15:25
ISPConfig3 won't start after update Cracklefish Installation/Configuration 15 28th February 2012 14:11
MySQL Error Nolan Installation/Configuration 12 16th February 2011 02:15
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 16:59
Postfix can't received email from exterior astra2000 Server Operation 5 17th October 2009 23:26


All times are GMT +2. The time now is 04:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.