New: html/sql.add.alias.domain.html.

This commit is contained in:
Zhang Huangbin 2018-01-13 12:57:01 +08:00
parent 047ef326bc
commit 731514286e
5 changed files with 118 additions and 0 deletions

View File

@ -1,5 +1,7 @@
# LDAP: Add an alias domain
[TOC]
## What an alias domain is used for?
Let's say you have a mail domain `example.com` hosted on your iRedMail server,

View File

@ -0,0 +1,39 @@
# SQL: Add an alias domain
[TOC]
## What an alias domain is used for?
Let's say you have a mail domain `example.com` hosted on your iRedMail server,
if you add domain name `domain.ltd` as an alias domain of `example.com`, all
emails sent to `username@domain.ltd` will be delivered to user
`username@example.com`'s mailbox.
## Add alias domain with iRedAdmin-Pro
With iRedAdmin-Pro, you can simply add alias domain name in domain profile page,
under tab `Aliases`.
Screenshot:
![](./images/iredadmin/domain_profile_alias.png)
## How to add an alias domain with SQL commands
Adding alias domain is as simple as inserting one SQL record. Let's create two
alias domains (`alias-1.com`, `alias-2.com`) for the primary domain
`example.com` with SQL commands below (Note: we use MySQL for example, but
PostgreSQL uses exactly same `INSERT` commands):
```
-- Connect to `vmail` database.
sql> USE vmail;
-- Create alias domain `alias-1.com`
sql> INSERT INTO alias_domain (alias_domain, target_domain) VALUES ('alias-1.com', 'example.com');
-- Create alias domain `alias-2.com`
sql> INSERT INTO alias_domain (alias_domain, target_domain) VALUES ('alias-2.com', 'example.com');
```
That's all.

View File

@ -132,6 +132,7 @@
<li><a href="restrict.mail.user.to.login.from.specified.ip.or.networks.html">Restrict mail user to login from specified IP addresses or networks</a></li>
<li><a href="send.out.email.from.specified.ip.addresses.html">Send out email from specified IP address</a></li>
<li><a href="sign.disclaimer.html">Sign disclaimer on outgoing mails</a></li>
<li><a href="sql.add.alias.domain.html">SQL: Add an alias domain</a></li>
<li><a href="sql.create.catch-all.html">SQL: Add per-domain catch-all account</a></li>
<li><a href="sql.create.mail.alias.html">SQL: Add a mail alias account</a></li>
<li><a href="sql.create.mail.user.html">SQL: Create new mail user</a></li>

View File

@ -16,6 +16,16 @@
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="ldap-add-an-alias-domain">LDAP: Add an alias domain</h1>
<div class="toc">
<ul>
<li><a href="#ldap-add-an-alias-domain">LDAP: Add an alias domain</a><ul>
<li><a href="#what-an-alias-domain-is-used-for">What an alias domain is used for?</a></li>
<li><a href="#add-alias-domain-with-iredadmin-pro">Add alias domain with iRedAdmin-Pro</a></li>
<li><a href="#how-to-add-an-alias-domain-with-phpldapadmin">How to add an alias domain with phpLDAPadmin:</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="what-an-alias-domain-is-used-for">What an alias domain is used for?</h2>
<p>Let's say you have a mail domain <code>example.com</code> hosted on your iRedMail server,
if you add domain name <code>domain.ltd</code> as an alias domain of <code>example.com</code>, all

View File

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SQL: Add an alias domain</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="https://www.iredmail.org" target="_blank">
<img alt="iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>&nbsp;
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="sql-add-an-alias-domain">SQL: Add an alias domain</h1>
<div class="toc">
<ul>
<li><a href="#sql-add-an-alias-domain">SQL: Add an alias domain</a><ul>
<li><a href="#what-an-alias-domain-is-used-for">What an alias domain is used for?</a></li>
<li><a href="#add-alias-domain-with-iredadmin-pro">Add alias domain with iRedAdmin-Pro</a></li>
<li><a href="#how-to-add-an-alias-domain-with-sql-commands">How to add an alias domain with SQL commands</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="what-an-alias-domain-is-used-for">What an alias domain is used for?</h2>
<p>Let's say you have a mail domain <code>example.com</code> hosted on your iRedMail server,
if you add domain name <code>domain.ltd</code> as an alias domain of <code>example.com</code>, all
emails sent to <code>username@domain.ltd</code> will be delivered to user
<code>username@example.com</code>'s mailbox.</p>
<h2 id="add-alias-domain-with-iredadmin-pro">Add alias domain with iRedAdmin-Pro</h2>
<p>With iRedAdmin-Pro, you can simply add alias domain name in domain profile page,
under tab <code>Aliases</code>.</p>
<p>Screenshot:</p>
<p><img alt="" src="./images/iredadmin/domain_profile_alias.png" /></p>
<h2 id="how-to-add-an-alias-domain-with-sql-commands">How to add an alias domain with SQL commands</h2>
<p>Adding alias domain is as simple as inserting one SQL record. Let's create two
alias domains (<code>alias-1.com</code>, <code>alias-2.com</code>) for the primary domain
<code>example.com</code> with SQL commands below (Note: we use MySQL for example, but
PostgreSQL uses exactly same <code>INSERT</code> commands):</p>
<pre><code>-- Connect to `vmail` database.
sql&gt; USE vmail;
-- Create alias domain `alias-1.com`
sql&gt; INSERT INTO alias_domain (alias_domain, target_domain) VALUES ('alias-1.com', 'example.com');
-- Create alias domain `alias-2.com`
sql&gt; INSERT INTO alias_domain (alias_domain, target_domain) VALUES ('alias-2.com', 'example.com');
</code></pre>
<p>That's all.</p><div class="footer">
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3293801-21"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-3293801-21');
</script>
</body></html>