1

Topic: How to setup virtual emails in a domain point to a different domain

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.4 64-bit
- Related log if you're reporting an issue:
====

OK, here's some background to help with understanding the issues we are facing.

1. I'm a newbie at setting up mail servers. I'm not going to hide my inexperience, it is what it is.
2. I work for a small company the deals with independent and small-chain pharmacies.
3. Some of our clients buy email and website hosting from us, so we have an email system for their use.
4. Recently, a user on one of the hosted domains got one of their accounts compromised and so we ended up being a relay for a ton of spam before we knew it. The issue got fixed but not without pain.
5. The compromise of course means our server's reputation is shot and some of our other clients can send emails to big name provider mail accounts (gmail, office.com, etc...)
6. We decided that the old mail server and seen it's best days and that we need a new server with new OS that we can get updates for, and a new email software setup that  we can get updates for.
7. The new server will be on a different IP address.
8. Needs to be easy to setup and manage, and handle multiple email domains.
9. iRedMail fit the bill perfectly.

- Now I've been getting the new server up and going for the past week.
- Our old server is an OpenSUse 10.0 Postfix/Cyrus IMAP/SpamAssassian/ClamAV/no database setup.
- We only have about 20 or so hosted domains, with an average of 6 email accounts each at them moment.
- Per some industry good practices we have 3 email address for each domain.
      abuse@pharmacy1.com
      postmaster@pharmacy1.com
      webmaster@pharmacy1.com
- we have the same setup for pharmacy2.com and 3 and 4 and so one.
- These three accounts (postmaster, webmaster and abuse) are NOT physical account in the hosted domains, but are virtual email accounts forwarding mail to real accounts on our internal exchange server.
- Our current setup make heavy use of the "virtual_alias_maps" and "virtual_alias_domains" text files.

= What we need/want is to know can we setup the virtual accounts per domain without actually having to create real accounts on the mail server using the iRedAdmin interface?
= Is there a way to have these virtual email address auto-create whenever we add a new domain to the mail server through the Admin panel?

If we need to make some changes to our MySQL database, we'll do it. I've been reading and reading and haven't figured out how to do it. I'm sure I have not strung the correct set of words together in google. I can't imagine that we are the only people to have setup iRedMail this way. Nor is our situation unique.

Sorry for the length of this post and we appreciate any help we can get.

Brian

----

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

2

Re: How to setup virtual emails in a domain point to a different domain

bmunday wrote:

= What we need/want is to know can we setup the virtual accounts per domain without actually having to create real accounts on the mail server using the iRedAdmin interface?

Yes. It's called "mail alias" too.

bmunday wrote:

= Is there a way to have these virtual email address auto-create whenever we add a new domain to the mail server through the Admin panel?

Short answer, no. The latest iRedAdmin-Pro (admin panel) doesn't support create specified mail accounts automatically.

bmunday wrote:

If we need to make some changes to our MySQL database, we'll do it. I've been reading and reading and haven't figured out how to do it. I'm sure I have not strung the correct set of words together in google. I can't imagine that we are the only people to have setup iRedMail this way. Nor is our situation unique.

You mentioned mail accounts are stored in plain text file, then why you need to change SQL database? You need to import them into SQL database.

If you choose MySQL backend to store mail domains/users, here's the SQL structure:
https://bitbucket.org/zhb/iredmail/src/ … mail.mysql