1

Topic: scripting email address additions and deletions

==== Required information ====
- iRedMail version: 0.8.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  PGSQL
- Linux/BSD distribution name and version: RHEL6/64-bit

====

I am looking at setting up a second domain in my iRedMail install (this would NOT be an alias domain to the primary domain) as a forward only domain (each email address will forward to whatever the user's real email address is in whatever domain). I'd like to script adding and deleting users and to where there email addresses forward. Presumably, all of this is stored in the database backend. But do I also need to touch something in the file system w. dovecot since the email addresses are forward only (then somehow remove something when deleting)?

thanks.

----

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

2

Re: scripting email address additions and deletions

dwbotsch wrote:

Presumably, all of this is stored in the database backend.

You're right.

dwbotsch wrote:

But do I also need to touch something in the file system w. dovecot since the email addresses are forward only (then somehow remove something when deleting)?

No. Insert proper forwarding address in table "vmail.alias", column 'goto' should be fine. For example:

sql> INSERT INTO alias (address, goto, domain) VALUES ('original@domain.ltd', 'forward@example.com', 'domain.ltd');