Git Product home page Git Product logo

Comments (7)

jordanbrock avatar jordanbrock commented on June 6, 2024

Sorry, neglected to mention that logging in as the first user ([email protected]) works perfectly.

from sovereign.

bcachet avatar bcachet commented on June 6, 2024

Hello,

I got troubles with mail authentication too (SMTP).
I manage to connect to SMTP server with openssh

openssl s_client -connect mail.mydomain.com:465

Then EHLO returns:

EHLO mail.mydomain.com
250-mail.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

But when performing authentication

AUTH LOGIN
AUTH LOGIN
334 VXNlcm5hbWU6
[email protected] in base 64 (also tried bertrand in base 64)
334 UGFzc3dvcmQ6
password in base 64

I got

535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6

I think the problem is with my password hash in roles/mailserver/vars/main.yml

---
mail_server_hostname: mail.mydomain.com
mail_mysql_username: mailuser
mail_mysql_password: plain text password
mail_mysql_database: mailserver
mail_virtual_domains:
  - name: mydomain.com
    pk_id: 1
    primary_user: bertrand
mail_virtual_users:
  - address: [email protected]
    password_hash: $6$salt information$password encoded
    domain_pk_id: 1

Where $6$salt information$password encoded is the output of the command

doveadm pw -s SHA512-CRYPT

What did I miss ?

from sovereign.

jordanbrock avatar jordanbrock commented on June 6, 2024

@bcachet Is your password hash similar to this:

$6$dMVnW54SZbSzwd$dBv9YPGV5.Tg1tUItdKeNJDUfb./gl63vdIwxZLtCyEQRGcfY0gF9ZU.bFl.xRkPSVN7qp6ffQEf8CJ2UPzDO1

I used the following command to generate the hash

mkpasswd -m sha-512

You need to include the full hash, including the $6 at the beginning which signifies the hashing algorithm.

from sovereign.

jordanbrock avatar jordanbrock commented on June 6, 2024

Further to my issue above, I noticed that my mail directory has the following permissions

drwxr-xr-x  3 root    root    4096 Sep  3 07:43 example.com

Then the (successful) primary user directory has the following

drwxr-xr-x 6 vmail dovecot 4096 Sep  4 18:00 bill

Should the /decrypted-mail/example.com directory be owned by vmail?

from sovereign.

jordanbrock avatar jordanbrock commented on June 6, 2024

OK, so I should probably have just done that. chown /decrypted-mail/example.com to vmail and chgrp to dovecot has fixed the problem.

from sovereign.

bcachet avatar bcachet commented on June 6, 2024

I will try using mkpasswd, but yeah, my password is of the form $6$5SsudmJZ6QCIGzX5$MQxsjj8TF.gWFl.1ffkRbrWu8PDmT5u2n1LRJW4MjTd73zTeaQgibnAVBqo1SuTQ8LouuSsYFFIlmKp2Wi9tk/

from sovereign.

bcachet avatar bcachet commented on June 6, 2024

Just work perfectly with mkpasswd command.
Don't understand why doveadm-pw doesn't provide a good hash

Thanks for the information

from sovereign.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.