diff --git a/README.md b/README.md index 42660ef6..364cef8c 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ We're migrating [old wiki documents](http://www.iredmail.org/wiki) to Markdown f * [Monitor incoming and outgoing mails with BCC](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/monitor.incoming.and.outgoing.mails.with.bcc.md) * [Pipe incoming email for certain user to external script ](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/pipe.incoming.email.for.certain.user.to.external.script.md) * [Force Dovecot to recalculate mailbox quota](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/recalculate.mailbox.quota.md) +* [SQL: Create domain catch-all account for SQL backend](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/sql.create.domain.catchall.account.md) * [SQL: Create an mail alias account with SQL command line](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/sql.create.mail.alias.md) * [Store SpamAssassin bayes in SQL](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/store.spamassassin.bayes.in.sql.md) diff --git a/howto/sql.create.domain.catchall.account.md b/howto/sql.create.domain.catchall.account.md new file mode 100644 index 00000000..cec59948 --- /dev/null +++ b/howto/sql.create.domain.catchall.account.md @@ -0,0 +1,24 @@ +# SQL: Create domain catch-all account for SQL backend + +With default setting, iRedMail will reject emails sent to non-existing mail +accounts under hosted mail domains. If you want to accept these emails, you +need a domain catch-all account. + +With MySQL/MariaDB or PostgreSQL backend, you can add catch-all account for +existing domain `domain.com` in SQL table `vmail.alias` like below: + +```sql +sql> USE vmail; +sql> INSERT INTO alias (address, goto, domain) + VALUES ('domain.com', 'dest@example.com', 'domain.com'); +``` + +This sql command creates catch-all address for domain `domain.com`, all mails +sent to non-existing accounts under `domain.com` will be delivered to +`dest@example.com`. + +__NOTE__: With iRedAdmin-Pro, you can manage catch-all account in domain +profile directly. Screenshot attached. + +![](../images/iredadmin/domain_profile_catchall.png) + diff --git a/html/index.html b/html/index.html index ae60ae53..7d8f0f10 100644 --- a/html/index.html +++ b/html/index.html @@ -43,6 +43,7 @@
With default setting, iRedMail will reject emails sent to non-existing mail +accounts under hosted mail domains. If you want to accept these emails, you +need a domain catch-all account.
+With MySQL/MariaDB or PostgreSQL backend, you can add catch-all account for
+existing domain domain.com
in SQL table vmail.alias
like below:
sql> USE vmail;
+sql> INSERT INTO alias (address, goto, domain)
+ VALUES ('domain.com', 'dest@example.com', 'domain.com');
+
+
+This sql command creates catch-all address for domain domain.com
, all mails
+sent to non-existing accounts under domain.com
will be delivered to
+dest@example.com
.
NOTE: With iRedAdmin-Pro, you can manage catch-all account in domain +profile directly. Screenshot attached.
+If you found something wrong +in this document, please do +contact us to fix it.
This tutorial is published under a CC BY-ND 3.0 license. + + +