• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

where are the mail alias stored?

  • Thread starter Carlos Treviño
  • Start date
C

Carlos Treviño

Guest
I make an OS reload and loose my plesk functionality on the old server but I have the discs and information.

Where are the mail alias stored on the server?
I can't find them on /var/qmail/alias

I need to restore the users alias configuration and I think the data should be somewere phisically on the server but I can't find it any help is appreciated

Thanks
 
The aliases are stored in psa.mail_aliases. The mn_id column references the id in the mail table. The dom_id column in the mail table references the id of the domains table. With that you can build a query that suits your need. For example if you want to know all aliases of a domain name "mydomain.xx" your query could be:

Code:
SELECT a.alias AS alias
FROM psa.mail_aliases AS a
INNER JOIN psa.mail AS b ON b.id = a.mn_id
INNER JOIN psa.domains AS c ON c.id = b.dom_id
WHERE c.name LIKE 'mydomain.xx';
 
The aliases are stored in psa.mail_aliases. The mn_id column references the id in the mail table. The dom_id column in the mail table references the id of the domains table. With that you can build a query that suits your need. For example if you want to know all aliases of a domain name "mydomain.xx" your query could be:

Code:
SELECT a.alias AS alias
FROM psa.mail_aliases AS a
INNER JOIN psa.mail AS b ON b.id = a.mn_id
INNER JOIN psa.domains AS c ON c.id = b.dom_id
WHERE c.name LIKE 'mydomain.xx';
Thank you very much. Since my install was completely broken, instead of having to recover psa database, I also found that aliases can be found in /var/lib/psa/dumps/domains/XXXXXX/backup_info_XXXXX.xml
 
Back
Top