Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Mail Archiver

Featured Replies

Mail Archiver is a web-based solution for archiving, searching, and exporting emails. All emails and attachments are stored in a Postgresql database.

On Github: https://github.com/s1t5/mail-archiver

On Docker: https://hub.docker.com/r/s1t5/mailarchiver

The developer of Mail Archiver is s1t5. I am not him, but will try to support best effort. Edit: he also joined and participates in this topic :-)

Some setup hints, what worked for me:

  • First install postgresql17 from the Community App Store.

    • (Instance) Name: postgresql17-mailarchiver - for easy of installation, I prefer to use a separate database instance for each app.

    • Path to appdata: /mnt/user/appdata/postgresql17-mailarchiver - to match the instance name.

    • Database name: MailArchiver - the recommended default.

    • Database user: mailuser - the recommended default.

    • Database password: something long, but only with these characters: [A-Z] [a-z] [0-9] - this prevents connection issues.

  • Then install the Mail Archiver app.

    • Pay particular attention to the database connection string. 'Host' should be the local IP address when you are using the default bridge network, or the hostname (postgresql17-mailarchiver) when using a custom Docker network.

    • Admin password: at first use something simple, later change it through the WebUI to something harder.

  • Order the apps in your Docker list.

    • Make sure Postgresql is above MailArchiver, so it gets started first.

    • Add a 20 second wait time, so the database is up and running before MailArchiver starts.

    • Right now, MailArchiver does not handle a missing database connection gracefully. This helps.

      afbeelding.png

If you first installed the Postgresql17 container, then later decide you want to change any of the parameters (database, username, password): you have to remove the Docker app AND the appdata folder, then reinstall postgresql17. If you try to change those parameters without cleaning up first, the changes will not be applied.

Edited by Emphyrio
Added setup hints & ordering

  • 2 weeks later...

Hello, everyone! Thank you, @Emphyrio , for introducing the application here.

I installed the Mail Archiver, but unfortunately, I only get to the login page. I've tried logging in with the default login credentials and also with modified ones. Unfortunately, it doesn't work.

Is there a separate admin login page?

  • Author

Not that I'm aware of, I just enter the Web UI and that's it. The default login is admin / secure123! . Which you should definitely change of course.

Is there something in your logs?

Edited by Emphyrio

Now it works. I had to specify the IP address instead of postgres in the database connection.

  • Author
2 hours ago, cepxad-deqwi3-pizrot said:

Now it works. I had to specify the IP address instead of postgres in the database connection.

Thanks for you feedback, I will change the example in the app template. Edit: also created a feature request for showing an error message on the login screen in case the database connection failed.

Edited by Emphyrio

Hi, I have the same problem with the login.

Everything seems to set up correctly, but I just can't get past the login screen.

Setup

  • Docker: s1t5/mailarchiver:latest

  • PostgreSQL 17

  • Fresh install on Unraid

Environment variables:

Authentication__Username=admin
Authentication__Password=password  # (tried various simple passwords)
ConnectionStrings__DefaultConnection=Host=192.168.1.40;Port=5435;Database=mailarchiverdb;...
TimeZone__DisplayTimeZoneId=Europe/Rome

What's happening

The container starts fine, migrations run successfully, and the admin user gets created in the database:

SELECT "Username", "Email", "IsAdmin", "IsActive" 
FROM mail_archiver."Users";

Username: admin
Email: admin@local
IsAdmin: true
IsActive: true

But when I try to login with username admin and the password I set in Authentication__Password, it always fails with "Invalid username or password".

What I've Tried

- Used the exact password from the env variable

- Tried super simple passwords like "password", "admin123"

- Deleted the user and let the app recreate it

- Dropped the entire database and started fresh

- Enabled trace logging to see what's going on

The logs show the user is found in the database, but password verification just fails:

``` Context started tracking 'User' entity with key '{Id: 1}' ResourceManagerStringLocalizer searched for 'InvalidUserPassword' Failed login attempt for username: admin ```

Questions

1. What password hashing algorithm does mail-archiver use?

2. Should the `Authentication__Password` env var match what I type in the login form, or is it only used during initial user creation?

3. Is there a way to manually reset the password via database or CLI?

I've spent quite a bit of time debugging this and I'm a bit stuck. Any pointers would be greatly appreciated!

Thanks! 🙏

29 minutes ago, Ironman79 said:

Hi, I have the same problem with the login.

Everything seems to set up correctly, but I just can't get past the login screen.

Setup

  • Docker: s1t5/mailarchiver:latest

  • PostgreSQL 17

  • Fresh install on Unraid

Environment variables:

Authentication__Username=admin
Authentication__Password=password  # (tried various simple passwords)
ConnectionStrings__DefaultConnection=Host=192.168.1.40;Port=5435;Database=mailarchiverdb;...
TimeZone__DisplayTimeZoneId=Europe/Rome

What's happening

The container starts fine, migrations run successfully, and the admin user gets created in the database:

SELECT "Username", "Email", "IsAdmin", "IsActive" 
FROM mail_archiver."Users";

Username: admin
Email: admin@local
IsAdmin: true
IsActive: true

But when I try to login with username admin and the password I set in Authentication__Password, it always fails with "Invalid username or password".

What I've Tried

- Used the exact password from the env variable

- Tried super simple passwords like "password", "admin123"

- Deleted the user and let the app recreate it

- Dropped the entire database and started fresh

- Enabled trace logging to see what's going on

The logs show the user is found in the database, but password verification just fails:

``` Context started tracking 'User' entity with key '{Id: 1}' ResourceManagerStringLocalizer searched for 'InvalidUserPassword' Failed login attempt for username: admin ```

Questions

1. What password hashing algorithm does mail-archiver use?

2. Should the `Authentication__Password` env var match what I type in the login form, or is it only used during initial user creation?

3. Is there a way to manually reset the password via database or CLI?

I've spent quite a bit of time debugging this and I'm a bit stuck. Any pointers would be greatly appreciated!

Thanks! 🙏

Finally, I was able to login. I had to manually delete the user admin, set a simple password in the container's variables, and then let the docker recreate it. Once logged in, I changed the pw to a stronger one.

Edited by Ironman79

  • 2 weeks later...

@Emphyrio Thank you for this! I was looking for something like this for years. I have it up and running now for 1 hour. Great tutorial! 👍

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.