C
C
chelios2016-10-30 15:58:10
Exim
chelios, 2016-10-30 15:58:10

How to manually create a mail account in exim+dovecot and change the password for existing mail?

There is a server with exim(4.84_2) and dovecot(2.0.9) installed. There is no web interface for managing mail, and mysql is off / not running.
I determined that the mail format is maildir. Found its location /home/admin/mail/mydomain.com/
Found a file with encrypted (MD5) passwords: /home/admin/conf/mail/mydomain.com/passwd.
1) How to create a new mail? As I suppose, mail is not registered in Exim itself and Exim looks to see if there is such a user and its password somewhere. He looks at the password, judging by the config, in /etc/exim/domains/mydomain.com, which is a link to /home/admin/conf/mail/mydomain.com/ and there is a passwd password file.
But in the config, I did not find the path to the mail itself. Perhaps there is such a user, he looks in the same password file as dovecot, but how does he determine where to save mail?
In dovecot's config there is a path to the mail mail_location = maildir:%h/mail/%d/%n. %h is /home/admin because in passwd such way is registered for all users.
dovecot looks at passwords and existing users like this:

passdb {
  driver = passwd-file
  args = scheme=MD5-CRYPT username_format=%n /etc/exim/domains/%d/passwd
}

userdb {
  driver = passwd-file
  args = username_format=%n /etc/exim/domains/%d/passwd
}

Maybe you just need to add a user to the passwd file and thus create mail?
Do I need to restart Exim after this?
2) How to change the password of an existing mail? Just come up with a new one, encrypt it in MD5 and change it in the passwd file? What if the messages are encrypted with the old password?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question