1

Topic: connecting to remote sql (aws rds) after installation of iredmail

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
======== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,
I wanted to know if there's a way to connect to remote database instance (for example AWS RDS) after installation of iRedMail.
Thanks.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: connecting to remote sql (aws rds) after installation of iredmail

After iRedMail installation, you have to update all config files which uses a SQL server address. for example:

- /etc/dovecot/dovecot-mysql.conf
- /etc/postfix/mysql/*.cf

3

Re: connecting to remote sql (aws rds) after installation of iredmail

Thanks Zhang.  I'm a little fuzzy on how to do this.  I installed my iRedmail with postgresql, and my AWS RDS engine is MYSQL.  Can this be done.  Also where do I update in the config files?  For example, below is output from my dovecot config file:



]# cat dovecot-pgsql.conf
driver = pgsql
default_pass_scheme = CRYPT
connect = host=127.0.0.1 dbname=vmail user=vmail password=aaaaaaaaaaaaaaaaaaaaaaaaaaa
password_query = SELECT password, allow_nets FROM mailbox WHERE username='%u' AND enable%Ls%Lc=1 AND active=1
user_query = SELECT \
    mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir AS home, \
    '*:bytes=' || mailbox.quota*1048576 AS quota_rule \
FROM mailbox,domain \
WHERE mailbox.username='%u' \
    AND mailbox.domain='%d' \
    AND mailbox."enable%Ls%Lc"=1 \
    AND mailbox.domain=domain.domain \
    AND domain.backupmx=0 \
    AND domain.active=1 \
    AND mailbox.active=1


Thanks.

4

Re: connecting to remote sql (aws rds) after installation of iredmail

If you server doesn't have any serious data yet, try to restore the OS, then install iRedMail again by following this tutorial:
http://www.iredmail.org/docs/install.ir … erver.html