Admin interface and password for Snappymail

What type of hardware are you using: Other ARM board
What YunoHost version are you running: 12.0.11
What app is this about: Snappymail v2.35.4

Describe your issue

Hi all,

Every once in a while I need to access the Snappymail-admin-panel. Usually I’ve totally forgotten about it, and I need to do a search for the location of the panel (hint: the application page in Yunohost admin interface got the link), and then see whether I recall the password or not.

There are moreover two options; either there already was a password configured, or this is the first time. I wrote down both options for future reference. In hope the notes help someone down the line, here are the steps of the process:

  • Initial admin password:

    • Does not exist during the installation of Snappymail.
    • Visit the admin page at https://sub.domain.tld/snappymail/app/?admin.
    • Log in to the server via SSH and navigate to /var/www/snappymail/app# cd data/_data_/_default_/.
    • It may take some time for the file to be created. Once it exists, you can open admin_password.txt in that directory.
    • Log in to the “Admin Panel” using admin as the login and the discovered password as the passphrase. TOTP is not initially configured.
    • You will be prompted to change the password.
    • Snappymail automatically removes the temporary password file.
  • After forgetting the password:

    • An encrypted version of the password is stored in the config file located at /var/www/snappymail/app/data/_data_/_default_/configs/application.ini.
    • The property is named admin_password under the section “Login and password for the web admin panel”:
      • If the value is empty, you have not logged in yet. The password file is created after visiting the admin page.
      • If the value is filled, it means you have logged in before.
    • To generate a new password:
      • Delete the recorded password.
      • Visit the admin page again (possibly using a private browser window helps in some cases).
      • The file admin_password.txt will be automatically created shortly afterward.
    • Log in with the new password and the user mentioned as admin_login in application.ini (‘admin’ by default)
    • At the top of the page, a banner will suggest changing the password:
      • In addition to the password, you can also change the admin username.
      • Note that you also need the (new/temporary) current password.
      • The new username/password combination is saved in the previously mentioned application.ini file.
    • After changing the password, Snappymail automatically cleans up the temporary password file.

The last few times I needed the admin panel, was to remedy being unable to send mail (failed to add recipient 553 5.7.1 sender adresse rejected : not logged in).

Now that I want to reproduce the issue though, I’m unable: whether I set SMTP ‘Secure’ to ‘None’ or ‘STARTTLS’, and ‘Server’ to ‘localhost’ or ‘domain.tld’, I am still able to send email from Snappymail. This is an unforseen development, but does not change anything about steps to log in to the panel :slight_smile:

Share relevant logs or error messages

Logs are not applicable, there is no problem at the moment

The above is more of a reminder/howto than a problem. I reply to myself to be able to mark the thread as ‘Solved’.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.