Docker-mailserver: migrate v1 to v2

Created on 30 Jun 2016  路  10Comments  路  Source: tomav/docker-mailserver

I would like to implement ldap configuration for everyone but I spent too much time trying to migrate from v1 to v2.

Why the certs aren't working in v2?

I have moved them in /tmp/docker-mailserver/ssl instead of /tmp/postfix/ssl but this doesn't seems to work.

I have also this error when trying to login. : Password mismatch (SHA1 of given password: 36147d)]

I don't use letsenctrypt and I don't know really what It is, I have my own signed certs to use. I have tried by reading the startup script but I didn't manage to make it work.

Could you please share some v1 to v2 migration details ?

Edit : When trying to import my main.cf file :

postconf: fatal: -e, -X, or -# accepts no comment input
question

Most helpful comment

I'm interested in this project and started reading some issues. Most issues clearly say what they do or what's the problem.

But, sorry, what task shall this issue do? It's better to create a (mostly) detailed issue for every migration-problem and add to that tickets a tag f.e. 'v1_to_v2' or smth.

Just my two cents....

All 10 comments

Anyone could help please ?

Postfix configurations
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing attribute name: ""
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing '=' after attribute name: "reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain,"
postconf: fatal: missing '=' after attribute name: "reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net"
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing attribute name: ""
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input
postconf: fatal: missing attribute name: ""
postconf: fatal: -e, -X, or -# accepts no comment input

These errors appear when postconf -e "$line" is executed and can be ignored.

It seems there is an error in the custom certs configuration, it is not recommended to mix the certs and the key in the same file.

I have edited the start-mailserver.sh file to use the $(hostname)-key.pem in place of the key. (See PR #224)

I also added some explanation on how to use self-signed and custom certs.

I will add LDAP in a futur PR.

Regarding password mismatch, the accounts file has now encrypted passwords. Have a look to README and the wiki.

You can also send a gist and we'll try to have a look.

@kopax how are you? What about this issue?
Let me know.

@kopax, there are lot of things reported here:

  • postconf issue
  • password mismatch
  • self-signed and custom certs changes
  • LDAP is another topic.

How can we help?
Did you manage to fix your issues?

I'm interested in this project and started reading some issues. Most issues clearly say what they do or what's the problem.

But, sorry, what task shall this issue do? It's better to create a (mostly) detailed issue for every migration-problem and add to that tickets a tag f.e. 'v1_to_v2' or smth.

Just my two cents....

  • postconf issue

The -e, -X, or -# accepts no comment input occur when using postconf command.
Previous postfix configuration file was just copied in /etc/postfix and use has it was.

Solution was to remove comment and just use value that I needed to overwrite.

  • password missmatch

I wasn't able to correct that one. It seems that the previous account file containings mail and password wasn't working anymore. As I switch to ldap, this issn't an issue for me anymore

  • self-signed and signed certs

I guess @tomav don't use signed-certs, and the signed certs parts wasn't tested by anyone.
I prefer to have two separate file for the key and the certs. I made some minor change to the code to reflect this (https://github.com/tomav/docker-mailserver/pull/251/commits/2d06c0c43049ff4b47f5d81ce5beb741108cfa05#diff-62fede8c21437c1625639aa79b0a97acR153)

  • LDAP is another topic.

Ldap became prioritary to me has I didn't find the help on time to solve the password missmatch issue.

I also had to move the dovecot configuration part from the start-mailserver.sh has it was testing the presence of /tmp/docker-mailserver/postfix-accounts.cf file while it should not.

I have implemented everything in the PR so you can see how I solved each issue. It is serve has it is and hope it can help people who face the same issues.

I know it is the wrong way to contribute to the code and I apologize in advance for that.

Ok, I will close this issue because:

  • LDAP has its own issue #187
  • Changes regarding user management is explained in the Wiki

Regarding self-signed certs, you're right I don't use them, I'm using LetsEncrypt.
Perhaps @emazzotta or @00angus may help.
Otherwise, feel free to PR your fix with tests. I know that we don't cover 100% of this image scope and if you have experienced with this, it will help other users.

And thanks for your work regarding LDAP. Let's see if the other LDAP voters may help.

Hi - by reading the comments it seems that the user has something working now.
Anyway, as for the password mismatch issue - as you @tomav suggest - the problem is quite certainly with the account file: from v1 to v2 that file has important changes in its content => you cannot simply copy/move it.
The main change is with the passwords that cannot be written anymore in clear text.

By simply changing passwords from clear text to encrypted (look at readme for that) authentication should be working with v2 too.

HTH.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShuP1 picture ShuP1  路  4Comments

alen12345 picture alen12345  路  4Comments

landergate picture landergate  路  4Comments

m-a-v picture m-a-v  路  4Comments

dragonito picture dragonito  路  5Comments