#1  
Old 11th May 2009, 20:01
gring gring is offline
Member
 
Join Date: Mar 2009
Posts: 44
Thanks: 2
Thanked 3 Times in 3 Posts
Default dovecot

Hi!

Has anyone managed to run Ispconfig with Dovecot?

Will it work by only modifying /etc/dovecot/dovecot-sql.conf to match Ispconfig's mysql tables, or are there other things to modify? ( like /etc/postfix/master.cf )

Any documentation is welcome.

Thx!
Reply With Quote
Sponsored Links
  #2  
Old 12th May 2009, 18:44
gring gring is offline
Member
 
Join Date: Mar 2009
Posts: 44
Thanks: 2
Thanked 3 Times in 3 Posts
Default

Here is what I figured out:

first, you have to modify /etc/dovecot/dovecot.conf
look for "passdb sql", you should find

Code:
# SQL database <doc/wiki/AuthDatabase.SQL.txt>
  #passdb sql {
  # Path for SQL configuration file
  #args = /etc/dovecot/dovecot-sql.conf
#}
Uncomment it to allow password authentification from the mysql database.

Then, we have to do the same thing for dovecot to get the other fields.
look for "userdb prefetch" and uncomment it.

It means we're gonna check the password and get the other infos in a single sql query, instead of two.

Then, we have to configure the access to the database. Edit /etc/dovecot/dovecot-sql.conf

It is very well documented, and it seems we should add something like:

Code:
driver = mysql
connect = host=localhost dbname=dbispconfig user=ispconfig password=<ispconfig_password>
default_pass_scheme = CRYPT
password_query = SELECT email AS user, password, uid AS userdb_uid, gid AS userdb_gid, homedir AS userdb_home, maildir AS userdb_mail FROM mail_user WHERE email = '%u'
I figured out the ispconfig password from the courier conf file, it should be findable elsewhere.

I haven't tested it yet, and in the courier config file there is a support for quotas.

Last edited by gring; 13th May 2009 at 02:19. Reason: mistake in password query.
Reply With Quote
  #3  
Old 15th May 2009, 17:03
gring gring is offline
Member
 
Join Date: Mar 2009
Posts: 44
Thanks: 2
Thanked 3 Times in 3 Posts
Default

Hi

I've tested the above, and imap consultation works.

Now I've got another problem. Outgoing mail works, but receiving mail doesn't (I tried to send mail to myself, and to other local mailboxes).

I think I misunderstand how Ispconfig configures postfix:

Does Postfix directly writes the incoming mail into the user mailboxes, as it seems in the configuration files, or does it pass the incoming mail to the IMAP / POP 's server LDA, in which case should be configured?

thanks.
Reply With Quote
  #4  
Old 15th May 2009, 20:10
gring gring is offline
Member
 
Join Date: Mar 2009
Posts: 44
Thanks: 2
Thanked 3 Times in 3 Posts
Default

this is what I get in /var/log/mail.log when I try to send a mail to myself:

Code:
May 15 20:03:51 <hostname> postfix/smtpd[1704]: connect from localhost.localdomain[127.0.0.1]
May 15 20:03:51 <hostname> postfix/smtpd[1704]: 66D492320: client=localhost.localdomain[127.0.0.1]
May 15 20:03:51 <hostname> postfix/cleanup[1686]: 66D492320: message-id=<5ae3cf331e9545e7417805635e70edbe@localhost>
May 15 20:03:51 <hostname> postfix/smtpd[1704]: disconnect from localhost.localdomain[127.0.0.1]
May 15 20:03:51 <hostname> postfix/qmgr[3687]: 66D492320: from=<test@test.com>, size=1297, nrcpt=1 (queue active)
May 15 20:03:51 <hostname> amavis[3898]: (03898-07) Passed CLEAN, LOCAL [127.0.0.1] [127.0.0.1] <test@test.com> -> <test@test.com>, Message-ID: <5ae3cf331e9545e7417805635e70edbe@localhost>, mail_id: YJwnNtwps5d6, Hits: 2.987, size: 842, queued_as: 66D492320, 1577 ms
May 15 20:03:51 <hostname> postfix/smtp[1687]: CF9B71EC5: to=<test@test.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=0.02/0.01/0/1.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=03898-07, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 66D492320)
May 15 20:03:51 <hostname> postfix/qmgr[3687]: CF9B71EC5: removed
May 15 20:03:51 <hostname> postfix/pipe[1705]: 66D492320: to=<test@test.com>, relay=maildrop, delay=0.03, delays=0.01/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via maildrop service)
May 15 20:03:51 <hostname> postfix/qmgr[3687]: 66D492320: removed
the line which says "delivered via maildrop service" proves postfix is receiving mail, right?
Reply With Quote
  #5  
Old 15th May 2009, 21:25
Rune Rune is offline
Junior Member
 
Join Date: Apr 2009
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default

I've used dovecot before, but I'm a complete and total ispconfig n00b who has just installed ispconfig and can't even log into it

But these show postfix receiving the mail (I think I'm correct on this, I'm sure someone will point it out soon enough if I'm not)

Code:
May 15 20:03:51 <hostname> postfix/smtpd[1704]: connect from localhost.localdomain[127.0.0.1]
May 15 20:03:51 <hostname> postfix/smtpd[1704]: 66D492320: client=localhost.localdomain[127.0.0.1]
May 15 20:03:51 <hostname> postfix/cleanup[1686]: 66D492320: message-id=<5ae3cf331e9545e7417805635e70edbe@localhost>
May 15 20:03:51 <hostname> postfix/smtpd[1704]: disconnect from localhost.localdomain[127.0.0.1]

At this point it's entered the mail queue and then these lines here:

Code:
May 15 20:03:51 <hostname> postfix/qmgr[3687]: 66D492320: from=<test@test.com>, size=1297, nrcpt=1 (queue active)
May 15 20:03:51 <hostname> amavis[3898]: (03898-07) Passed CLEAN, LOCAL [127.0.0.1] [127.0.0.1] <test@test.com> -> <test@test.com>, Message-ID: <5ae3cf331e9545e7417805635e70edbe@localhost>, mail_id: YJwnNtwps5d6, Hits: 2.987, size: 842, queued_as: 66D492320, 1577 ms
May 15 20:03:51 <hostname> postfix/smtp[1687]: CF9B71EC5: to=<test@test.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=0.02/0.01/0/1.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=03898-07, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 66D492320)
May 15 20:03:51 <hostname> postfix/qmgr[3687]: CF9B71EC5: removed
Show the server's processed it to see if it's a legitimate mail according to the server's restrictions and accepted it,

May 15 20:03:51 <hostname> postfix/pipe[1705]: 66D492320: to=<test@test.com>, relay=maildrop, delay=0.03, delays=0.01/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via maildrop service)
May 15 20:03:51 <hostname> postfix/qmgr[3687]: 66D492320: removed

It's been successfully processed by postfix and handed over to maildrop

So I'd guess that something's either going wrong in maildrop as it's picking the mail up, or maildrop isn't able to transport it to the destination it's meant to end up at

Two things I've had cause those sort of problems with dovecot before are permissions and socket path errors, might be worth checking out

I don't have a dovecot installation any more that I can look at to give you much info on what to check for those, it was on opensuse anyway and that's what I've wiped off to install this debian/ispconfig combo I can't log into

I also don't know enough about debian or ispconfig to know where the paths in dovecot.conf should be pointing, but checking whether the files dovecot.conf refers to actually exist or not should be a good starting point

Hope that helps you at least eliminate some possibilities
Reply With Quote
The Following User Says Thank You to Rune For This Useful Post:
gring (16th May 2009)
  #6  
Old 16th May 2009, 11:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,466
Thanks: 813
Thanked 5,253 Times in 4,119 Posts
Default

Dovecot is not supported by ispconfig 3 and you should not use it if you dont really know what you are doing. So if you are not a long time linux sysadmin and you dont know the ispconfig sources and dont know how everything exactly works then do not use dovecot.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 16th May 2009, 15:48
gring gring is offline
Member
 
Join Date: Mar 2009
Posts: 44
Thanks: 2
Thanked 3 Times in 3 Posts
Default

Hi

Thanks for you help. I'm in migration hell for months now, and it seems I'm finally seing the end of the tunnel

I tried to stick to the installation guide, but never managed to migrate existing mailboxes to Courier, while Dovecot is very well documented and there is a convertion script that works perfectly. Anyway, I'll have to learn how to make it work with ispconfig.

Till, are you saying that because there are reasons I don't know about that make Dovecot unusable with Ispconfig? (I don't need quota support)

Sorry, it must be frustrating to have people asking around about things that you haven't had time to work on, but hey, I just means that Ispconfig is really good.

I wrote the user_query line in case it would turn out to be useful, dovecot-sql should now look like this:

Code:
driver = mysql
connect = host=localhost dbname=dbispconfig user=ispconfig password=<ispconfig_password>
default_pass_scheme = CRYPT
password_query = SELECT email AS user, password, uid AS userdb_uid, gid AS userdb_gid, homedir AS userdb_home, maildir AS userdb_mail FROM mail_user WHERE email = '%u'
user_query = SELECT uid, gid, homedir AS home, maildir AS mail FROM mail_user WHERE email = '%u'
Reply With Quote
  #8  
Old 16th May 2009, 16:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,466
Thanks: 813
Thanked 5,253 Times in 4,119 Posts
Default

Quote:
I tried to stick to the installation guide, but never managed to migrate existing mailboxes to Courier, while Dovecot is very well documented and there is a convertion script that works perfectly. Anyway, I'll have to learn how to make it work with ispconfig.
The mailbox format for courier and dovecot is basically the same in ispconfig 3. As you have to migrate just the mail files, both courier and dovecot will built their own index files when you access the mailboxes automatically then.

Quote:
Till, are you saying that because there are reasons I don't know about that make Dovecot unusable with Ispconfig? (I don't need quota support)
As long as you dont use dovecot deliver as delievery agent then dovecot works fine. In ispconfig 3 you will have to use courier-maildrop as lda as the mail delivery scripts are built in its syntax. courier-maildrop is available independantly from courier imap and pop3 and it works fine with dovecot. If you dont use courier-maildrop, several functions like autoresponders, email filters etc. will not work. Also the mail quota is handled by maildrop, so as long as you install it your setup will work with dovecot as pop3 and imap server.

Quote:
Sorry, it must be frustrating to have people asking around about things that you haven't had time to work on, but hey, I just means that Ispconfig is really good.
@gring. This answer was not meant to you. I'am just saying this because it is not possible to to switch to another pop3 / imap daemon which is not supported without good linux admin knowledge and without knowing what they are doing and if someone nevr debugged a mailsystem and is not familar with setting up mailservers from the basics even without ispconfig then he should stick with the supported software.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 20th July 2009, 17:07
gring gring is offline
Member
 
Join Date: Mar 2009
Posts: 44
Thanks: 2
Thanked 3 Times in 3 Posts
 
Default

Hi, I took another server, and it works now, seems my problems were related to the distribution itself
Reply With Quote
The Following User Says Thank You to gring For This Useful Post:
cobro (23rd July 2009)
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
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 16:59
Emails not working [URGENT] AusHell General 8 2nd July 2008 04:07
dovecot problem sojic Server Operation 21 23rd March 2008 18:22
mail problems with imap Compadre Installation/Configuration 2 6th March 2008 10:54
Virtual Users And Domains W/ Postfix, Courier and MySql + Squirrelmail prob kwinnuxbie HOWTO-Related Questions 7 22nd October 2006 19:26


All times are GMT +2. The time now is 07:29.


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