Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 15th November 2011, 02:51
CSsab CSsab is offline
Senior Member
 
Join Date: Apr 2010
Posts: 174
Thanks: 19
Thanked 32 Times in 27 Posts
Default

Quote:
Originally Posted by dgonzalezh View Post
postfix or dovecot reports that it can't find auth
auth has it's own folder in /usr/lib/dovecot/modules/auth
or more likely on your system to be /usr/lib64/dovecot/modules/auth

It is probably looking for:

libdriver_mysql.so

The libraries can be in different places in the testing distros due to the need for multiarch support but you can also symlink them to the directory defined in your dovecot.conf

Do you recreate the dovecot certificates when you install dovecot v2?

Can you also tell me a bit about what this is for in your dovecot.conf

service ipc {
chroot = empty
client_limit = 0
drop_priv_before_exec = no
executable = ipc
extra_groups =
group =
idle_kill = 0
privileged_group =
process_limit = 1
process_min_avail = 0
protocol =
service_count = 0
type =
unix_listener ipc {
group =
mode = 0600
user =
}
unix_listener login/ipc-proxy {
group =
mode = 0600
user = $default_login_user
}


Thanks.
Reply With Quote
Sponsored Links
  #12  
Old 20th November 2011, 05:32
CSsab CSsab is offline
Senior Member
 
Join Date: Apr 2010
Posts: 174
Thanks: 19
Thanked 32 Times in 27 Posts
Default Working dovecot v2 on ISPConfig 3.0.4

I have dovecot v2 working fairly well now although this is still a testing and unsupported system. This is my dovecot.conf:
Code:
## TESTING DOVECOT v2 CONFIGURATION FILE ##

ssl = yes
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
mail_privileged_group = mail
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_gid = 5000
first_valid_uid = 5000
last_valid_gid = 5000
last_valid_uid = 5000
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/var/vmail/%d/%n/Maildir
passdb {
driver = pam
}
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
quota = maildir
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
# sieve_global_path = /var/vmail/globalsieverc
sieve_max_script_size = 1M
sieve_max_actions = 32
sieve_max_redirects = 4
sieve_quota_max_scripts = 10
sieve_quota_max_storage = 5M
sieve_extensions = +notify +imapflags
recipient_delimiter = +
}
protocols = imap pop3 sieve lmtp
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0660
group = postfix
user = postfix
}
unix_listener auth-master {
mode = 0600
user = vmail
}
user = root
}
service imap {
executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
}
service pop3 {
executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
}
userdb {
driver = passwd
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocol imap {
mail_plugin_dir = /usr/lib/dovecot/modules
mail_plugins = quota imap_quota
}
protocol pop3 {
mail_plugin_dir = /usr/lib/dovecot/modules
mail_plugins = quota
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugin_dir = /usr/lib/dovecot/modules
mail_plugins = $mail_plugins
quota_full_tempfail = no
rejection_reason = Your message to <%t> was automatically rejected:%n%r
recipient_delimiter = +
lda_original_recipient_header = X-Original-To
lda_mailbox_autocreate = no
lda_mailbox_autosubscribe = no
sendmail_path = /usr/sbin/sendmail
hostname = (hidden)
postmaster_address = postmaster@(hidden)
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
service_count = 1
process_min_avail = 10
vsz_limit = 64M
}

service managesieve {
}

protocol sieve {
managesieve_max_line_length = 65536
mail_max_userip_connections = 10
mail_plugins =
managesieve_logout_format = bytes=%i/%o
managesieve_max_compile_errors = 5
}

lmtp_save_to_detail_mailbox = yes
protocol lmtp {
mail_plugins = $mail_plugins
}
service lmtp {
inet_listener lmtp {
address = xxx.xxx.xxx.xxx 127.0.0.1
port = 24
}
unix_listener lmtp {
mode = 0600
  }
}
There is no need to change any tables in the ispconfig mysql database since Till has changed the mailuser edit part of the code.

I changed the dovecot.sql file since I was having some errors to what xabbu suggested in the earlier posts:

Code:
user_query = SELECT email as user, maildir as home, CONCAT(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'
In roundcube I use the managesieve plugin from roundcube which connects to the managesieve server (change the port in the plugin script from 2000 to 4190) and implements client side sieve filter sets. You need dovecot-managesieved running to make it all work.

Still working on better dovecot.conf and I am trying out some of dgonzalezh suggestions. I can send and receive mail from my first mailserver and domain but only send and not receive from a second mail server in the setup. Likely my dns settings are not right for the second mail server.

Hope this helps someone.
Reply With Quote
The Following User Says Thank You to CSsab For This Useful Post:
falko (20th November 2011)
  #13  
Old 10th September 2012, 21:37
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 395
Thanks: 30
Thanked 58 Times in 50 Posts
Default

I wondered how to get Dovecot 2 working with ISPConfig 3.0.4, too.

I already had Dovecot 1.2.9 working very reliably with ISPConfig 3.0.4 on Ubuntu 10.04 LTS. But certain Dovecot plug-ins, e.g. Antispam, seem not to work reliably (if at all) with such old versions of Dovecot.

The first challenge was installing Dovecot 2 on Ubuntu 10.04. Fortunately, some kind soul had already built a back-ported package, which made the process pretty simple: https://launchpad.net/~christian-roe...rchive/dovecot

Here are the required steps, which should upgrade Dovecot to 2.1.9 (I'm using ISPConfig 3.0.4.6):

Code:
# apt-get install python-software-properties
# add-apt-repository ppa:christian-roessner-net/dovecot
# apt-get update
# apt-get dist-upgrade
Perhaps ISPConfig >= 3.0.4.3 generates its own configuration file from a template, but that was not an option for me. (Unless there is some way to force ISPConfig to reconfigure services, when no upgrade is available; as yet, this question remains unanswered: http://www.howtoforge.com/forums/showthread.php?t=46329 .)

I let Dovecot do most of the heavy-lifting here. I just fed my old configuration file through Dovecot's configuration updater utility:

Code:
# doveconf -n -c /root/dovecot.old.conf > /etc/dovecot/dovecot.conf
The results were not perfect, but Dovecot resolved, or warned about, almost every issue.

The only "fatal" item that Dovecot was not able to update was

Code:
mail_plugin_dir = /usr/lib/dovecot/modules/lda
to

Code:
mail_plugin_dir = /usr/lib/dovecot/dovecot-lda
Without further ado, here's my configuration file, which seems to work.

(I have Quota and Sieve installed, which is reflected in this configuration; also, be sure to change the paths to the SSL key and certificate, or comment-out those lines. Finally, the protocol lda {"mail_plugin_dir"} value may be architecture-dependent on some systems, so ensure that the path is correct for the given system.)

Code:
auth_mechanisms = plain login

base_dir = /var/run/dovecot/

log_timestamp = "%Y-%m-%d %H:%M:%S "

login_greeting = ISPConfig3 IMAP server ready...

mail_gid = 5000
mail_location = maildir:/var/vmail/%d/%n/Maildir
mail_privileged_group = mail
mail_uid = 5000

passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}

plugin {
  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
  sieve = /var/vmail/%d/%n/.sieve
}

protocols = imap pop3

service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
  }
}

service imap {
  executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
}

service pop3 {
  executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
}

ssl = yes
ssl_cert = </root/ssl/your-ssl.crt
ssl_cipher_list = ALL:!LOW:!SSLv2
ssl_key = </root/ssl/your-ssl.key
verbose_ssl = no
ssl_parameters_regenerate = 168 hours

userdb {
  driver = prefetch
}

userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}

protocol imap {
  mail_plugins = quota imap_quota
}

protocol pop3 {
  mail_plugins = quota
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugin_dir = /usr/lib64/dovecot/modules
  mail_plugins = sieve quota
  postmaster_address = postmaster@my-domain.tld
}
As others have mentioned elsewhere in this thread, it was not necessary to modify /etc/dovecot/dovecot-sql.conf; it worked "out-of-the-box".

After upgrading Dovecot, you may wish to start it manually (instead of with the init script), which provides additional visibility into any problems:

Code:
# /usr/sbin/dovecot -F -c /etc/dovecot/dovecot.conf
Concerning Sieve, the same gentleman created a back-ported package for Ubuntu 10.04:

Code:
# apt-get install dovecot-pigeonhole
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  liblockfile1 lockfile-progs ntpdate
Use 'apt-get autoremove' to remove them.
Suggested packages:
  ufw
The following NEW packages will be installed:
  dovecot-pigeonhole
0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 718kB of archives.
After this operation, 2265kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/christian-roessner-net/dovecot/ubuntu/ lucid/main dovecot-pigeonhole 0.3.1-3~rns~lucid [718kB]
Fetched 718kB in 0s (810kB/s)
Selecting previously deselected package dovecot-pigeonhole.
(Reading database ... 73905 files and directories currently installed.)
Unpacking dovecot-pigeonhole (from .../dovecot-pigeonhole_0.3.1-3~rns~lucid_amd64.deb) ...
Setting up dovecot-pigeonhole (0.3.1-3~rns~lucid) ...

Creating config file /etc/dovecot/conf.d/20-managesieve.conf with new version

Creating config file /etc/dovecot/conf.d/90-sieve.conf with new version
Sieve seems to work as expected. A cursory test indicates that rules defined through ISPConfig are processed correctly.

I have not yet tested Quota.

I will post again with any corrections or updates.
Reply With Quote
  #14  
Old 13th September 2012, 20:01
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 395
Thanks: 30
Thanked 58 Times in 50 Posts
 
Default Default ISPConfig 3 Dovecot 2 Configuration

For reference, this is the stock ISPConfig 3 template (with the variables parsed into actual values) as of version 3.0.4.6.

I am posting this information for those who accidentally butcher their Dovecot 2 configurations and need a "clean slate" or a point of comparison.

Code:
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
ssl_cert = </etc/postfix/smtpd.cert
ssl_key = </etc/postfix/smtpd.key
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
  sieve=/var/vmail/%d/%n/.sieve
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
  user = root
}
protocol imap {
  mail_plugins = quota imap_quota
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  mail_plugins = quota
}
protocol lda {
  mail_plugins = sieve quota
}
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
SOS,Can not receive mail! jason.cn Installation/Configuration 1 4th May 2011 18:38
SquirrelMail login not working glenneh Installation/Configuration 13 9th April 2011 21:01
Perfect server... ISPConfig trashing dovecot config krissie HOWTO-Related Questions 2 30th June 2010 11:38
ISPConfig installation into multiple OpenVZ containers letezo Installation/Configuration 11 3rd March 2009 23:47
ISPconfig Dovecot problem dolmax General 2 15th March 2008 14:17


All times are GMT +2. The time now is 12:17.


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