Commit e54b6c51 authored by UltimateByte's avatar UltimateByte Committed by GitHub
Browse files

Moved config files out

parent a18c1ddf
......@@ -81,87 +81,7 @@ fi
# Thunderbird autoconfig
fn_logecho "[INFO] Writing autoconfig config file"
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<clientConfig version=\"1.1\">
<emailProvider id=\"haisoft.net\">
<domain>haisoft.net</domain>
<displayName>HaiSoft</displayName>
<displayShortName>HaiSoft</displayShortName>
<incomingServer type=\"imap\">
<hostname>${hostname}</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type=\"imap\">
<hostname>${hostname}</hostname>
<port>143</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type=\"pop3\">
<hostname>${hostname}</hostname>
<port>995</port>
<socketType>SSL</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type=\"pop3\">
<hostname>${hostname}</hostname>
<port>110</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<outgoingServer type=\"smtp\">
<hostname>${hostname}</hostname>
<port>465</port>
<socketType>SSL</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
<outgoingServer type=\"smtp\">
<hostname>${hostname}</hostname>
<port>587</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
<outgoingServer type=\"smtp\">
<hostname>${hostname}</hostname>
<port>25</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
<outgoingServer type=\"smtp\">
<hostname>${hostname}</hostname>
<port>2525</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
<documentation url=\"http://help.haisoft.net/\">
<descr lang=\"fr\">Documentation</descr>
<descr lang=\"en\">Documentation</descr>
</documentation>
</emailProvider>
</clientConfig>" > "${autoconfigpathfile}"
curl "https://raw.githubusercontent.com/UltimateByte/plesk_mail_autoconfig/master/config-v1.1.xml" > "${autoconfigpathfile}"
fn_logecho "[INFO] Correcting default DNS zone for autoconfig"
/usr/local/psa/bin/server_dns --add -cname autoconfig -canonical "${hostname}"
......@@ -175,43 +95,7 @@ done
# Outlook autodiscover
fn_logecho "[INFO] Writing autodiscover config file"
echo "<?php
\$raw = file_get_contents('php://input');
\$matches = array();
preg_match('/<EMailAddress>(.*)<\/EMailAddress>/', \$raw, \$matches);
header('Content-Type: application/xml');
?>
<Autodiscover xmlns=\"http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006\">
<Response xmlns=\"http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a\">
<User>
<DisplayName>HaiSoft</DisplayName>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>${hostname}</Server>
<Port>993</Port>
<DomainRequired>off</DomainRequired>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
<LoginName><?php echo \$matches[1]; ?></LoginName>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>${hostname}</Server>
<Port>465</Port>
<DomainRequired>off</DomainRequired>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
<LoginName><?php echo \$matches[1]; ?></LoginName>
</Protocol>
</Account>
</Response>
</Autodiscover>" > "${autodiscoverpathfile}"
curl "https://raw.githubusercontent.com/UltimateByte/plesk_mail_autoconfig/master/autodiscover.xml" > "${autodiscoverpathfile}"
fn_logecho "[INFO] Writing autodiscover htaccess"
echo "AddHandler php-script .php .xml
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment