Topic: How to change the default name when mails are saved under vmail folder
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.0
- Deployed with iRedMail Easy or the downloadable installer? No
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL(MariaDB)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Currently we can see that email files are stored under: /var/vmail/vmail1/domain/p/o/s/postmaster-2021.08.20.06.57.05/Maildir/cur
and file names here are something like
1629444549.M62644P6192.mail.persisl.com,S=3865,W=3941:2,S
What we want to do is to find a way to query the email information on database and then find the related mail file path.
We found table msgs on amavisd database which contains message_id and mail_id, but seems are irreverent to the mail file name.
Is there a way to store the file name (1629444549.M62644P6192.mail.persisl.com,S=3865,W=3941:2,S) to a database table like the msgs table on amavisd db, so we can query that table to monitor any incoming emails?
Or alternatively, is there a way to change the default file name to make it using the message_id or mail_id?
Any help would be appreciated.
Thanks,
Leon
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.