View Single Post
  #12  
Old 20th November 2011, 04: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