2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2015-11-06 09:02:46 -06:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > Authenticate without domain part in email address< / title >
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
< / head >
< body >
2019-07-13 06:21:55 -05:00
2015-11-06 09:02:46 -06:00
< div id = "navigation" >
2017-11-16 21:48:44 -06:00
< a href = "https://www.iredmail.org" target = "_blank" >
2016-04-19 12:48:51 -05:00
< 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 = "authenticate-without-domain-part-in-email-address" > Authenticate without domain part in email address< / h1 >
2016-06-16 08:47:48 -05:00
< div class = "toc" >
< ul >
< li > < a href = "#authenticate-without-domain-part-in-email-address" > Authenticate without domain part in email address< / a > < ul >
< li > < a href = "#dovecot" > Dovecot< / a > < / li >
< li > < a href = "#roundcube-webmail" > Roundcube Webmail< / a > < / li >
< / ul >
< / li >
< / ul >
< / div >
2015-11-06 09:02:46 -06:00
< p > With default settings, client must use full email address as username for
POP3/IMAP/SMTP/webmail login, if you want to login without domain name part in
email address, please follow below steps.< / p >
2016-06-16 08:47:48 -05:00
< h2 id = "dovecot" > Dovecot< / h2 >
2015-11-06 09:10:21 -06:00
< p > Open Dovecot config file < code > /etc/dovecot/dovecot.conf< / code > (Linux/OpenBSD) or
< code > /usr/local/etc/dovecot/dovecot.conf< / code > (FreeBSD), find parameter
< code > auth_default_realm< / code > , set the domain name you want to allow user to login
without domain name part in email address. For example:< / p >
2015-11-06 09:02:46 -06:00
< pre > < code > auth_default_realm = mydomain.com
< / code > < / pre >
< p > Restarting Dovecot is required. After restarted Dovecot, user logins as
2015-11-06 09:10:21 -06:00
< code > john.smith< / code > will be rewritten to < code > john.smith@mydomain.com< / code > by Dovecot.
This works for POP3/IMAP/SMTP services.< / p >
2016-06-16 08:47:48 -05:00
< h2 id = "roundcube-webmail" > Roundcube Webmail< / h2 >
2015-11-06 09:10:21 -06:00
< p > Open Roundcube webmail
< a href = "./file.locations.html#roundcube-webmail" > config file < code > config/main.inc.php< / code > < / a > ,
find parameter < code > $config['username_domain']< / code > , list your domain name
in this parameter. For example:< / p >
2015-11-06 09:02:46 -06:00
< pre > < code > // Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$config['username_domain'] = 'mydomain.com';
< / code > < / pre >
2016-05-19 06:51:20 -05:00
< p > Restarting web server (Apache or php-fpm) is recommended.< / p > < div class = "footer" >
2019-09-06 00:54:43 -05:00
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://github.com/iredmail/docs/" > 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://github.com/iredmail/docs/archive/master.zip" > 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 >
2016-05-19 06:51:20 -05:00
< / div >
2017-11-05 02:33:58 -06:00
<!-- 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());
2015-11-06 09:02:46 -06:00
2017-11-05 02:33:58 -06:00
gtag('config', 'UA-3293801-21');
2015-11-06 09:02:46 -06:00
< / script >
< / body > < / html >