2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-11-04 03:48:55 -06:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2015-06-02 23:26:31 -05:00
< title > SQL: Add per-domain catch-all account< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-11-04 03:48:55 -06:00
< / head >
< body >
< div id = "navigation" >
2016-04-19 12:48:51 -05:00
< a href = "/index.html" target = "_blank" >
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-02-29 02:15:19 -06:00
// < a href = "./index.html" > Document Index< / a > < / div > < h1 id = "sql-add-per-domain-catch-all-account" > SQL: Add per-domain catch-all account< / h1 >
2014-11-04 03:48:55 -06:00
< p > 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.< / p >
< p > With MySQL/MariaDB or PostgreSQL backend, you can add catch-all account for
existing domain < code > domain.com< / code > in SQL table < code > vmail.alias< / code > like below:< / p >
2015-09-29 08:28:26 -05:00
< pre > < code class = "sql" > $ mysql -u root -p
sql> USE vmail;
2014-11-04 03:48:55 -06:00
sql> INSERT INTO alias (address, goto, domain)
2016-09-02 07:05:24 -05:00
VALUES ('domain.com', 'dest@example.com', 'domain.com');
2014-11-04 03:48:55 -06:00
< / code > < / pre >
< p > This sql command creates catch-all address for domain < code > domain.com< / code > , all mails
sent to non-existing accounts under < code > domain.com< / code > will be delivered to
< code > dest@example.com< / code > .< / p >
< p > < strong > NOTE< / strong > : With iRedAdmin-Pro, you can manage catch-all account in domain
profile directly. Screenshot attached.< / p >
2015-06-02 23:26:31 -05:00
< p > < img alt = "" src = "../images/iredadmin/domain_profile_catchall.png" / > < / p >
< h2 id = "see-also" > See also< / h2 >
< ul >
< li > < a href = "./ldap.add.catch-all.html" > Add per-domain catch-all account for OpenLDAP backends< / a > < / li >
2016-05-19 06:51:20 -05:00
< / ul > < 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 = "http://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
< / div >
< script type = "text/javascript" >
2015-02-05 07:02:53 -06:00
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
2014-11-04 03:48:55 -06:00
< / script >
< / body > < / html >