View Single Post
  #3  
Old 4th August 2011, 12:51
CSsab CSsab is offline
Senior Member
 
Join Date: Apr 2010
Posts: 174
Thanks: 19
Thanked 32 Times in 27 Posts
Default

I can help to a limited extent - wish I had the knowledge base !!
I can only see what needs to be done and not know how to do it - very frustrating.

I can certainly try but will need help and confirmation.

Here are some of my questions:

1. If I run:
openssl x509 -in /etc/ssl/certs/dovecot.pem -noout -text

The correct cert has been written with the CN hostname details and so on. The only thing I would change is the email address which is root@mydomain.tld.
At the moment I can just add an alias in /etc/aliases for root: postmaster@mydomain.tld
and then run
newaliases
/etc/init.d/postfix reload

So the means by which certs can be recreated are not available in binary distributions unless I am missing something - I would have to go here:
http://wiki.dovecot.org/SSL/CertificateCreation
and download mkcert.sh and so on ...

Could you tell me the correct way to do this.

2. These are my dovecot packages (this is a testing system because I am looking at the dovecot-managesieved package in wheezy):
dovecot-common dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve

The following NEW packages will be installed:
dovecot-common dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,476 kB of archives.
After this operation, 7,004 kB of additional disk space will be used.
Selecting previously deselected package dovecot-common.
(Reading database ... 29783 files and directories currently installed.)
Unpacking dovecot-common (from .../dovecot-common_1%3a2.0.13-1.1_amd64.deb) ...
Selecting previously deselected package dovecot-imapd.
Unpacking dovecot-imapd (from .../dovecot-imapd_1%3a2.0.13-1.1_amd64.deb) ...
Selecting previously deselected package dovecot-sieve.
Unpacking dovecot-sieve (from .../dovecot-sieve_1%3a2.0.13-1.1_amd64.deb) ...
Selecting previously deselected package dovecot-managesieved.
Unpacking dovecot-managesieved (from .../dovecot-managesieved_1%3a2.0.13-1.1_amd64.deb) ...
Selecting previously deselected package dovecot-pop3d.
Unpacking dovecot-pop3d (from .../dovecot-pop3d_1%3a2.0.13-1.1_amd64.deb) ...
Setting up dovecot-common (1:2.0.13-1.1) ...

Creating config file /etc/dovecot/dovecot.conf with new version
Creating config file /etc/dovecot/dovecot-db.conf.ext with new version
Creating config file /etc/dovecot/dovecot-dict-sql.conf.ext with new version
Creating config file /etc/dovecot/dovecot-sql.conf.ext with new version
Creating config file /etc/dovecot/conf.d/10-auth.conf with new version
Creating config file /etc/dovecot/conf.d/10-director.conf with new version
Creating config file /etc/dovecot/conf.d/10-logging.conf with new version
Creating config file /etc/dovecot/conf.d/10-mail.conf with new version
Creating config file /etc/dovecot/conf.d/10-master.conf with new version
Creating config file /etc/dovecot/conf.d/10-ssl.conf with new version
Creating config file /etc/dovecot/conf.d/15-lda.conf with new version
Creating config file /etc/dovecot/conf.d/90-acl.conf with new version
Creating config file /etc/dovecot/conf.d/90-plugin.conf with new version
Creating config file /etc/dovecot/conf.d/90-quota.conf with new version
Creating config file /etc/dovecot/conf.d/auth-deny.conf.ext with new version
Creating config file /etc/dovecot/conf.d/auth-master.conf.ext with new version
Creating config file /etc/dovecot/conf.d/auth-passwdfile.conf.ext with new version
Creating config file /etc/dovecot/conf.d/auth-static.conf.ext with new version
Creating config file /etc/dovecot/conf.d/auth-system.conf.ext with new version
Creating config file /etc/dovecot/conf.d/auth-vpopmail.conf.ext with new version
Creating generic self-signed certificate: /etc/ssl/certs/dovecot.pem
This certificate will expire in 10 years.
(replace with hand-crafted or authorized one if needed).
Starting IMAP/POP3 mail server: dovecot.
Setting up dovecot-imapd (1:2.0.13-1.1) ...
Creating config file /etc/dovecot/conf.d/20-imap.conf with new version
Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-sieve (1:2.0.13-1.1) ...
Creating config file /etc/dovecot/conf.d/90-sieve.conf with new version
Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-managesieved (1:2.0.13-1.1) ...
Creating config file /etc/dovecot/conf.d/20-managesieve.conf with new version
Restarting IMAP/POP3 mail server: dovecot.
Setting up dovecot-pop3d (1:2.0.13-1.1) ...
Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version
Restarting IMAP/POP3 mail server: dovecot.




netstat -tap
tcp 0 0 *:smtp *:* LISTEN 1290/master
tcp 0 0 *:sieve *:* LISTEN 4629/dovecot
tcp 0 0 *:imaps *:* LISTEN 4629/dovecot
tcp 0 0 *op3s *:* LISTEN 4629/dovecot
tcp 0 0 localhost.localdo:10024 *:* LISTEN 513/amavisd (master
tcp 0 0 localhost.localdo:10025 *:* LISTEN 1290/master
tcp 0 0 localhost.localdo:mysql *:* LISTEN 1091/mysqld
tcp 0 0 *op3 *:* LISTEN 4629/dovecot
tcp 0 0 *:imap2 *:* LISTEN 4629/dovecot
tcp 0 0 localhost.localdo:spamd *:* LISTEN 849/spamd.pid
tcp 0 0 *:ssh *:* LISTEN 843/sshd
tcp6 0 0 [::]:sieve [::]:* LISTEN 4629/dovecot
tcp6 0 0 [::]:imaps [::]:* LISTEN 4629/dovecot
tcp6 0 0 [::]op3s [::]:* LISTEN 4629/dovecot
tcp6 0 0 [::]op3 [::]:* LISTEN 4629/dovecot
tcp6 0 0 [::]:imap2 [::]:* LISTEN 4629/dovecot
tcp6 0 0 [::]:www [::]:* LISTEN 525/apache2
tcp6 0 0 [::]:ssh [::]:* LISTEN 843/sshd

So here is /etc/dovecot.conf (uncommented only) before ISPConfig.

!include_try /usr/share/dovecot/protocols.d/*.protocol
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
!include_try local.conf


So the configurations are in /etc/dovecot/conf.d/
10-auth.conf 10-mail.conf 15-lda.conf 20-pop3.conf 90-quota.conf auth-master.conf.ext auth-system.conf.ext
10-director.conf 10-master.conf 20-imap.conf 90-acl.conf 90-sieve.conf auth-passwdfile.conf.ext auth-vpopmail.conf.ext
10-logging.conf 10-ssl.conf 20-managesieve.conf 90-plugin.conf auth-deny.conf.ext auth-static.conf.ext


Which of these need to be modified by the ISPConfig installer?

Further info:
At the moment when I install ISPConfig 3 the following is appended to the dovecot.conf:

driver = mysql
connect = host=localhost dbname=mydatabasename user=ispconfig password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
default_pass_scheme = CRYPT

password_query = SELECT password FROM mail_user WHERE mymailname = '%u' AND disable%Ls = 'n'
user_query = SELECT (mymailname) as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE mymailname = '%u' AND disable%Ls = 'n'

Then the following errors are thrown off from the ISPConfig 3 installer:

Configuring Dovecot
PHP Warning: chmod(): No such file or directory in /tmp/ispconfig3_install/install/lib/installer_base.lib.php on line 750
PHP Stack trace:
PHP 1. {main}() /tmp/ispconfig3_install/install/install.php:0
PHP 2. installer_base->configure_dovecot() /tmp/ispconfig3_install/install/install.php:337
PHP 3. chmod() /tmp/ispconfig3_install/install/lib/installer_base.lib.php:750

Configuring Spamassassin
Configuring Amavisd


What is the path to the sql file used currently?

Other errors are:
Stopping amavisd: amavisd-new.
defined(%hash) is deprecated at /usr/share/perl5/Mail/SpamAssassin/Dns.pm line 757.
(Maybe you should just omit the defined()?)
Starting amavisd: amavisd-new.

And the main ones are:

Configuring Getmail
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
Stopping SASL Authentication Daemon: saslauthd.
Starting SASL Authentication Daemon: saslauthd.


Stopping amavisd: amavisd-new.
defined(%hash) is deprecated at /usr/share/perl5/Mail/SpamAssassin/Dns.pm line 757.
(Maybe you should just omit the defined()?)
Starting amavisd: amavisd-new.
Stopping ClamAV daemon: clamd.
Starting ClamAV daemon: clamd Bytecode: Security mode set to "TrustSigned".
.
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'pop3s' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:529: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:587: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:664: protocol managesieve {} has been replaced by protocol sieve { }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:681: sieve has been moved into plugin {} section
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:686: sieve_storage has been moved into plugin { sieve_dir }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:813: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:924: passdb sql {} has been replaced by passdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:985: userdb sql {} has been replaced by userdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1014: auth_user has been replaced by service auth { user }
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: mail_plugin_dir: access(/usr/lib/dovecot/modules/lda) failed: No such file or directory
doveconf: Error: managesieve-login: dump-capability process returned 89
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'pop3s' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:529: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:587: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:664: protocol managesieve {} has been replaced by protocol sieve { }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:681: sieve has been moved into plugin {} section
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:686: sieve_storage has been moved into plugin { sieve_dir }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:813: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:924: passdb sql {} has been replaced by passdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:985: userdb sql {} has been replaced by userdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1014: auth_user has been replaced by service auth { user }
doveconf: Error: ssl enabled, but ssl_cert not set
doveconf: Error: ssl enabled, but ssl_cert not set
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: ssl enabled, but ssl_cert not set
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'pop3s' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:529: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:587: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:664: protocol managesieve {} has been replaced by protocol sieve { }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:681: sieve has been moved into plugin {} section
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:686: sieve_storage has been moved into plugin { sieve_dir }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:813: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:924: passdb sql {} has been replaced by passdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:985: userdb sql {} has been replaced by userdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1014: auth_user has been replaced by service auth { user }
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: mail_plugin_dir: access(/usr/lib/dovecot/modules/lda) failed: No such file or directory
doveconf: Error: managesieve-login: dump-capability process returned 89
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:24: 'pop3s' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:529: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:587: mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:664: protocol managesieve {} has been replaced by protocol sieve { }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:681: sieve has been moved into plugin {} section
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:686: sieve_storage has been moved into plugin { sieve_dir }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:813: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:924: passdb sql {} has been replaced by passdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:985: userdb sql {} has been replaced by userdb { driver=sql }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1014: auth_user has been replaced by service auth { user }
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: ssl enabled, but ssl_cert not set

Restarting IMAP/POP3 mail server: dovecot failed!
Configure Jailkit (y,n) [y]:


This error relates to "<" in:

ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem

Fatal: Error in configuration file /etc/dovecot/dovecot.conf: ssl enabled, but ssl_cert not set
and it goes away when the correct path is set.

I don't mind trying to write a new sql file but there are people better able to do that here than me with my limited knowhow.

I am still very keen to help in any way so can post the outputs of anything else needed and can also set up testing systems in either Lenny or Squeeze with very little trouble.
Reply With Quote