ServerName autodiscover.domain.com ServerAdmin webmaster@domain.com SSLEngine on SSLCertificateFile /etc/apache/ssl/certs/apache.domain.com.crt SSLCertificateKeyFile /etc/apache/ssl/private/apache.domain.com.key # Force all requests to lowercase. Different MUAs, mobile devices etc # request the Autodiscover URL in different cases. RewriteEngine On RewriteMap lc int:tolower RewriteCond %{REQUEST_URI} [A-Z] RewriteRule (.*) ${lc:$1} [R=301,L] DocumentRoot /var/www/autodiscover/htdocs Options +FollowSymLinks -Indexes AllowOverride Options Indexes Limit FileInfo AuthConfig Alias /autodiscover/autodiscover.xml /var/www/autodiscover/htdocs/autodiscover.php ErrorLog /var/www/autodiscover/logs/error.log CustomLog /var/www/autodiscover/logs/access.log combined ------------------------------------------------------------------------------ Copyright (C) 2011 David Ramsden This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. David Ramsden david {at} 0wned {dot} it ------------------------------------------------------------------------------ */ // For other supported protocols and more protocol settings, see: // http://technet.microsoft.com/en-us/library/cc511507.aspx // Get contents of request made to Autodiscover. $request = file_get_contents("php://input"); preg_match("/\(.*?)\<\/EMailAddress\>/", $request, $email_address); /*** Begin Configuration ***/ // ActiveSync URL. $_CONFIG['MobileSync']['Url'] = "https://www.kernel-error.de/Microsoft-Server-ActiveSync"; // IMAP configuration settings. $_CONFIG['IMAP']['Server'] = "imap.kernel-error.de"; $_CONFIG['IMAP']['Port'] = "993"; $_CONFIG['IMAP']['SSL'] = "on"; $_CONFIG['IMAP']['SPA'] = "off"; $_CONFIG['IMAP']['AuthRequired'] = "on"; $_CONFIG['IMAP']['LoginName'] = $email_address[1]; // SMTP configuration settings. $_CONFIG['SMTP']['Server'] = "smtp.kernel-error.de"; $_CONFIG['SMTP']['Port'] = "465"; $_CONFIG['SMTP']['SSL'] = "on"; $_CONFIG['SMTP']['SPA'] = "off"; $_CONFIG['SMTP']['AuthRequired'] = "on"; $_CONFIG['SMTP']['LoginName'] = $email_address[1]; /*** End Configuration ***/ // XML document heading. header("Content-Type: text/xml"); echo "\n"; // Get the schema from the request. preg_match("/\(.*?)\<\/AcceptableResponseSchema\>/", $request, $schema); // Determine the type of device requesting Autodiscover. if (preg_match("/\/mobilesync\//", $schema[1])) { // Mobile device. preg_match("/\(.*?)\<\/EMailAddress\>/", $request, $email_address); ?> en:en MobileSync email settings $value\n"; } ?> 600 Invalid Request