124 lines
3.5 KiB
Plaintext
124 lines
3.5 KiB
Plaintext
====== Configurer Autodiscover et Autoconfig ======
|
|
{{ :dummy.png?75x75|Nom de la section}}
|
|
|
|
===== DNS =====
|
|
|
|
|
|
_autodiscover._tcp.yourdomain.com. 3600 IN SRV 10 10 443 mail.yourmx.com.
|
|
|
|
|
|
===== Autodiscover pour Outlook =====
|
|
|
|
|
|
<code PHP autodiscover.php>
|
|
<?php
|
|
$postData = file_get_contents('php://input'); //Autodiscover requests are HTTP posts with XML content
|
|
$xml = simplexml_load_string($postData);
|
|
$user = $xml->Request->EMailAddress; //copy the email address from the request into a variable
|
|
|
|
//set Content-Type
|
|
header("Content-Type: application/xml");
|
|
?>
|
|
<?php echo '<?xml version="1.0" encoding="utf-8" ?>'; ?>
|
|
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
|
|
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
|
|
<Account>
|
|
<AccountType>email</AccountType>
|
|
<Action>settings</Action>
|
|
<Protocol>
|
|
<Type>POP3</Type>
|
|
<Server>mail.yourmx.com</Server>
|
|
<Port>995</Port>
|
|
<LoginName><?php echo $user; ?></LoginName>
|
|
<DomainRequired>off</DomainRequired>
|
|
<SPA>off</SPA>
|
|
<SSL>on</SSL>
|
|
<AuthRequired>on</AuthRequired>
|
|
<DomainRequired>on</DomainRequired>
|
|
</Protocol>
|
|
<Protocol>
|
|
<Type>IMAP</Type>
|
|
<Server>mail.yourmx.com</Server>
|
|
<Port>993</Port>
|
|
<DomainRequired>on</DomainRequired>
|
|
<LoginName><?php echo $user; ?></LoginName>
|
|
<SPA>off</SPA>
|
|
<SSL>on</SSL>
|
|
<Encryption>Auto</Encryption>
|
|
<AuthRequired>on</AuthRequired>
|
|
</Protocol>
|
|
<Protocol>
|
|
<Type>SMTP</Type>
|
|
<Server>mail.yourmx.com</Server>
|
|
<Port>587</Port>
|
|
<DomainRequired>on</DomainRequired>
|
|
<LoginName><?php echo $user; ?></LoginName>
|
|
<SPA>off</SPA>
|
|
<Encryption>Auto</Encryption> <!-- if your server requires encrypotion other than SSL -->
|
|
<AuthRequired>on</AuthRequired>
|
|
<UsePOPAuth>on</UsePOPAuth>
|
|
<SMTPLast>off</SMTPLast>
|
|
</Protocol>
|
|
</Account>
|
|
</Response>
|
|
</Autodiscover>
|
|
</code>
|
|
|
|
===== Directives Apache =====
|
|
|
|
|
|
<code>
|
|
ServerAlias autoconfig.*
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} !on [OR]
|
|
RewriteCond %{HTTP_HOST} !^discover\.my-service\.com$
|
|
RewriteRule ^(.*)$ https://discover.my-service.com$1 [R=301]
|
|
</code>
|
|
|
|
|
|
===== Certificat SSL =====
|
|
|
|
|
|
Remember to get a SIGNED SSL Cert.
|
|
|
|
|
|
===== Autoconfig pour Thunderbird =====
|
|
|
|
|
|
<code XML config-v1.1.xml>
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<clientConfig version="1.1">
|
|
<emailProvider id="domain.tld">
|
|
<domain>domain.tld</domain>
|
|
<displayName>Mail</displayName>
|
|
<displayShortName>Mail</displayShortName>
|
|
<incomingServer type="pop3">
|
|
<hostname>mailserver.domain.tld</hostname>
|
|
<port>995</port>
|
|
<socketType>SSL</socketType>
|
|
<authentication>password-cleartext</authentication>
|
|
<username>%EMAILADDRESS%</username>
|
|
<pop3>
|
|
<leaveMessagesOnServer>true</leaveMessagesOnServer>
|
|
<downloadOnBiff>true</downloadOnBiff>
|
|
<daysToLeaveMessagesOnServer>10</daysToLeaveMessagesOnServer>
|
|
</pop3>
|
|
</incomingServer>
|
|
<incomingServer type="imap">
|
|
<hostname>mailserver.domain.tld</hostname>
|
|
<port>993</port>
|
|
<socketType>SSL</socketType>
|
|
<authentication>password-cleartext</authentication>
|
|
<username>%EMAILADDRESS%</username>
|
|
</incomingServer>
|
|
<outgoingServer type="smtp">
|
|
<hostname>mailserver.domain.tld</hostname>
|
|
<port>587</port>
|
|
<socketType>STARTTLS</socketType>
|
|
<authentication>password-cleartext</authentication>
|
|
<username>%EMAILADDRESS%</username>
|
|
</outgoingServer>
|
|
</emailProvider>
|
|
</clientConfig>
|
|
</code> |