Compare commits
No commits in common. "7309a20c47123fd8c831b09e8ca496af80904a2b" and "5849ecc9e41a908c3561653448e4587bab8cac60" have entirely different histories.
7309a20c47
...
5849ecc9e4
14 changed files with 20 additions and 280 deletions
1
bundles/dovecot/files/sudors
Normal file
1
bundles/dovecot/files/sudors
Normal file
|
@ -0,0 +1 @@
|
||||||
|
www-data ALL=(ALL) NOPASSWD: /usr/bin/doveadm pw -s ARGON2ID
|
|
@ -9,6 +9,8 @@ deploy_challenge() {
|
||||||
update add $1.${zone}. 60 IN TXT \"$3\"
|
update add $1.${zone}. 60 IN TXT \"$3\"
|
||||||
send
|
send
|
||||||
" | tee | nsupdate -y hmac-sha512:${acme_key_name}:${acme_key}
|
" | tee | nsupdate -y hmac-sha512:${acme_key_name}:${acme_key}
|
||||||
|
|
||||||
|
sleep 10
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_challenge() {
|
clean_challenge() {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
from ipaddress import ip_interface
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
'apt': {
|
'apt': {
|
||||||
'packages': {
|
'packages': {
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
test autodiscover.php:
|
|
||||||
|
|
||||||
`curl -X POST https://autoconfig.mail.example.com/Autodiscover/Autodiscover.xml -d '<EMailAddress>test@example.com</EMailAddress>'`
|
|
|
@ -1,83 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// https://raw.githubusercontent.com/Radiergummi/autodiscover/master/autodiscover/autodiscover.php
|
|
||||||
|
|
||||||
/********************************
|
|
||||||
* Autodiscover responder
|
|
||||||
********************************
|
|
||||||
* This PHP script is intended to respond to any request to http(s)://mydomain.com/autodiscover/autodiscover.xml.
|
|
||||||
* If configured properly, it will send a spec-complient autodiscover XML response, pointing mail clients to the
|
|
||||||
* appropriate mail services.
|
|
||||||
* If you use MAPI or ActiveSync, stick with the Autodiscover service your mail server provides for you. But if
|
|
||||||
* you use POP/IMAP servers, this will provide autoconfiguration to Outlook, Apple Mail and mobile devices.
|
|
||||||
*
|
|
||||||
* To work properly, you'll need to set the service (sub)domains below in the settings section to the correct
|
|
||||||
* domain names, adjust ports and SSL.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//get raw POST data so we can extract the email address
|
|
||||||
$request = file_get_contents("php://input");
|
|
||||||
|
|
||||||
// optional debug log
|
|
||||||
# file_put_contents( 'request.log', $request, FILE_APPEND );
|
|
||||||
|
|
||||||
// retrieve email address from client request
|
|
||||||
preg_match( "/\<EMailAddress\>(.*?)\<\/EMailAddress\>/", $request, $email );
|
|
||||||
|
|
||||||
// check for invalid mail, to prevent XSS
|
|
||||||
if (filter_var($email[1], FILTER_VALIDATE_EMAIL) === false) {
|
|
||||||
throw new Exception('Invalid E-Mail provided');
|
|
||||||
}
|
|
||||||
|
|
||||||
// get domain from email address
|
|
||||||
$domain = substr( strrchr( $email[1], "@" ), 1 );
|
|
||||||
|
|
||||||
/**************************************
|
|
||||||
* Port and server settings below *
|
|
||||||
**************************************/
|
|
||||||
|
|
||||||
// IMAP settings
|
|
||||||
$imapServer = 'imap.' . $domain; // imap.example.com
|
|
||||||
$imapPort = 993;
|
|
||||||
$imapSSL = true;
|
|
||||||
|
|
||||||
// SMTP settings
|
|
||||||
$smtpServer = 'smtp.' . $domain; // smtp.example.com
|
|
||||||
$smtpPort = 587;
|
|
||||||
$smtpSSL = true;
|
|
||||||
|
|
||||||
//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" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
|
|
||||||
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
|
|
||||||
<Account>
|
|
||||||
<AccountType>email</AccountType>
|
|
||||||
<Action>settings</Action>
|
|
||||||
<Protocol>
|
|
||||||
<Protocol>
|
|
||||||
<Type>IMAP</Type>
|
|
||||||
<Server><?php echo $imapServer; ?></Server>
|
|
||||||
<Port><?php echo $imapPort; ?></Port>
|
|
||||||
<DomainRequired>off</DomainRequired>
|
|
||||||
<LoginName><?php echo $email[1]; ?></LoginName>
|
|
||||||
<SPA>off</SPA>
|
|
||||||
<SSL><?php echo $imapSSL ? 'on' : 'off'; ?></SSL>
|
|
||||||
<AuthRequired>on</AuthRequired>
|
|
||||||
</Protocol>
|
|
||||||
<Protocol>
|
|
||||||
<Type>SMTP</Type>
|
|
||||||
<Server><?php echo $smtpServer; ?></Server>
|
|
||||||
<Port><?php echo $smtpPort; ?></Port>
|
|
||||||
<DomainRequired>off</DomainRequired>
|
|
||||||
<LoginName><?php echo $email[1]; ?></LoginName>
|
|
||||||
<SPA>off</SPA>
|
|
||||||
<SSL><?php echo $smtpSSL ? 'on' : 'off'; ?></SSL>
|
|
||||||
<AuthRequired>on</AuthRequired>
|
|
||||||
<UsePOPAuth>on</UsePOPAuth>
|
|
||||||
<SMTPLast>on</SMTPLast>
|
|
||||||
</Protocol>
|
|
||||||
</Account>
|
|
||||||
</Response>
|
|
||||||
</Autodiscover>
|
|
|
@ -1,57 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<clientConfig version="1.1">
|
|
||||||
<!-- Outgoing Server -->
|
|
||||||
<emailProvider id="${mailserver}">
|
|
||||||
|
|
||||||
<!-- Hosted Domains -->
|
|
||||||
|
|
||||||
<domain>${mailserver}</domain>
|
|
||||||
<displayName>${mailserver}</displayName>
|
|
||||||
<displayShortName>${mailserver}</displayShortName>
|
|
||||||
|
|
||||||
<!-- Incoming Mail Servers -->
|
|
||||||
|
|
||||||
<incomingServer type="imap">
|
|
||||||
<hostname>${mailserver}</hostname>
|
|
||||||
<port>993</port>
|
|
||||||
<socketType>SSL</socketType>
|
|
||||||
<authentication>password-cleartext</authentication>
|
|
||||||
<username>%EMAILADDRESS%</username>
|
|
||||||
</incomingServer>
|
|
||||||
|
|
||||||
<incomingServer type="imap">
|
|
||||||
<hostname>${mailserver}</hostname>
|
|
||||||
<port>143</port>
|
|
||||||
<socketType>STARTTLS</socketType>
|
|
||||||
<authentication>password-cleartext</authentication>
|
|
||||||
<username>%EMAILADDRESS%</username>
|
|
||||||
</incomingServer>
|
|
||||||
|
|
||||||
<!-- Outgoing Mail Servers -->
|
|
||||||
|
|
||||||
<outgoingServer type="smtp">
|
|
||||||
<hostname>${mailserver}</hostname>
|
|
||||||
<port>465</port>
|
|
||||||
<socketType>SSL</socketType>
|
|
||||||
<authentication>password-cleartext</authentication>
|
|
||||||
<username>%EMAILADDRESS%</username>
|
|
||||||
</outgoingServer>
|
|
||||||
|
|
||||||
<outgoingServer type="smtp">
|
|
||||||
<hostname>${mailserver}</hostname>
|
|
||||||
<port>587</port>
|
|
||||||
<socketType>STARTTLS</socketType>
|
|
||||||
<authentication>password-cleartext</authentication>
|
|
||||||
<username>%EMAILADDRESS%</username>
|
|
||||||
</outgoingServer>
|
|
||||||
|
|
||||||
<!-- Documentation -->
|
|
||||||
|
|
||||||
<documentation url="http://www.example.com/help/mail/thunderbird">
|
|
||||||
<descr lang="en">Configure Thunderbird 2.0 for IMAP</descr>
|
|
||||||
<descr lang="de">Thunderbird 2.0 mit IMAP konfigurieren</descr>
|
|
||||||
</documentation>
|
|
||||||
|
|
||||||
</emailProvider>
|
|
||||||
<clientConfigUpdate url="https://${autoconfig}/mail/config-v1.1.xml" />
|
|
||||||
</clientConfig>
|
|
|
@ -1,16 +0,0 @@
|
||||||
autoconfig_hostname = node.metadata.get('mailserver/autoconfig_hostname')
|
|
||||||
|
|
||||||
files = {
|
|
||||||
f'/var/www/{autoconfig_hostname}/mail/config-v1.1.xml': {
|
|
||||||
'content_type': 'mako',
|
|
||||||
'context': {
|
|
||||||
'mailserver': node.metadata.get('mailserver/hostname'),
|
|
||||||
'autoconfig': autoconfig_hostname,
|
|
||||||
},
|
|
||||||
'owner': 'www-data',
|
|
||||||
},
|
|
||||||
f'/var/www/{autoconfig_hostname}/autodiscover/autodiscover.php': {
|
|
||||||
'content_type': 'mako',
|
|
||||||
'owner': 'www-data',
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
defaults = {}
|
|
||||||
|
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
|
||||||
'mailserver/autoconfig_hostname',
|
|
||||||
)
|
|
||||||
def hostname(metadata):
|
|
||||||
return {
|
|
||||||
'mailserver': {
|
|
||||||
'autoconfig_hostname': f"autoconfig.{metadata.get('mailserver/hostname')}",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
|
||||||
'nginx/vhosts',
|
|
||||||
)
|
|
||||||
def nginx(metadata):
|
|
||||||
return {
|
|
||||||
'nginx': {
|
|
||||||
'vhosts': {
|
|
||||||
metadata.get('mailserver/autoconfig_hostname'): {
|
|
||||||
'content': 'mailserver-autodiscover/vhost.conf',
|
|
||||||
'context': {
|
|
||||||
'root': f"/var/www/{metadata.get('mailserver/autoconfig_hostname')}",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
|
||||||
'letsencrypt/domains',
|
|
||||||
)
|
|
||||||
def letsencrypt(metadata):
|
|
||||||
return {
|
|
||||||
'letsencrypt': {
|
|
||||||
'domains': {
|
|
||||||
metadata.get('mailserver/autoconfig_hostname'): {
|
|
||||||
'aliases': {
|
|
||||||
*{
|
|
||||||
f'autoconfig.{domain}'
|
|
||||||
for domain in metadata.get('mailserver/domains')
|
|
||||||
},
|
|
||||||
*{
|
|
||||||
f'autodiscover.{domain}'
|
|
||||||
for domain in metadata.get('mailserver/domains')
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
|
||||||
'dns',
|
|
||||||
)
|
|
||||||
def autoconfig(metadata):
|
|
||||||
dns = {}
|
|
||||||
|
|
||||||
for domain in metadata.get('mailserver/domains'):
|
|
||||||
dns.update({
|
|
||||||
f'autoconfig.{domain}': {
|
|
||||||
'CNAME': {f"{metadata.get('mailserver/autoconfig_hostname')}."},
|
|
||||||
},
|
|
||||||
f'_autodiscover._tcp.{domain}': {
|
|
||||||
'SRV': {f"10 10 443 {metadata.get('mailserver/autoconfig_hostname')}."},
|
|
||||||
},
|
|
||||||
f'autodiscover.{domain}': {
|
|
||||||
'CNAME': {f"{metadata.get('mailserver/autoconfig_hostname')}."},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
'dns': dns,
|
|
||||||
}
|
|
|
@ -53,14 +53,3 @@ submission inet n - y - - smtpd
|
||||||
-o smtpd_recipient_restrictions=
|
-o smtpd_recipient_restrictions=
|
||||||
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
|
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
|
||||||
-o milter_macro_daemon_name=ORIGINATING
|
-o milter_macro_daemon_name=ORIGINATING
|
||||||
smtps inet n - y - - smtpd
|
|
||||||
-o syslog_name=postfix/smtps
|
|
||||||
-o smtpd_tls_wrappermode=yes
|
|
||||||
-o smtpd_sasl_auth_enable=yes
|
|
||||||
-o smtpd_reject_unlisted_recipient=no
|
|
||||||
-o smtpd_client_restrictions=$mua_client_restrictions
|
|
||||||
-o smtpd_helo_restrictions=$mua_helo_restrictions
|
|
||||||
-o smtpd_sender_restrictions=$mua_sender_restrictions
|
|
||||||
-o smtpd_recipient_restrictions=
|
|
||||||
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
|
|
||||||
-o milter_macro_daemon_name=ORIGINATING
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
encrypt$gAAAAABhlq_D2jvj7dxi_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ix1HqPCAZ1j79A-LmowoYq7qhTUHoVYJ4zf2Jd2zeuaMjdpZ4Bej0Be6dJNpZBsolXQl-QJPlw08ZUf1HbP-XhT0URcVQt9reAHU-G77rJVSo30OrrsDRjNxvh0LVnzrvaeFdtEl6rKh_Qtli6vNDBOCk1hNre6cKDgjCy-O-rOKdOwmBueXI5tEJMNaFLOoX29elGTHE=
|
|
|
@ -1 +0,0 @@
|
||||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxvB69VOHK0vJ0yumq5TR9/29N0PQiZj4HQJ1hMdQGuwt3zozDR7vvgINJ5lJo8NXcZEJtbRbkIEJLJFvMiGfALNYU/Lcgpfc0bfCgWgwsvFe2P8JrcxSDf0M0eEV/k78agXVn75b5eWDCPPSm16XqjK8RlNz3LJo7ENkVAZshPg4mRm039ejAFmKKCirfzw3l4uZak9czSQxlLmOd503uiu0ljlguwHoNRX2FLSi77mdDYQl16BtHgu96fJL0ruiokfyuBi0Ves1LX2Fc4KQIzk1cgEt/dSZvQBkvYH/idR48rVgOT+lGyT30y2VbyFK0rCSft8tcC7HDoqYi2zJQQIDAQAB
|
|
|
@ -1,16 +0,0 @@
|
||||||
server {
|
|
||||||
listen 443 ssl http2;
|
|
||||||
listen [::]:443 ssl http2;
|
|
||||||
server_name ${server_name};
|
|
||||||
|
|
||||||
ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem;
|
|
||||||
ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem;
|
|
||||||
|
|
||||||
root ${root};
|
|
||||||
|
|
||||||
location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
|
|
||||||
try_files /autodiscover/autodiscover.php =404;
|
|
||||||
fastcgi_pass php-handler;
|
|
||||||
include fastcgi.conf;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -4,7 +4,6 @@
|
||||||
'dovecot',
|
'dovecot',
|
||||||
'letsencrypt',
|
'letsencrypt',
|
||||||
'mailserver',
|
'mailserver',
|
||||||
'mailserver-autoconfig',
|
|
||||||
'nginx',
|
'nginx',
|
||||||
'php',
|
'php',
|
||||||
'postfix',
|
'postfix',
|
||||||
|
|
|
@ -38,13 +38,13 @@
|
||||||
'freibrief.net',
|
'freibrief.net',
|
||||||
'nadenau.net',
|
'nadenau.net',
|
||||||
'naeder.net',
|
'naeder.net',
|
||||||
|
'rolfwerner.eu',
|
||||||
'wettengl.net',
|
'wettengl.net',
|
||||||
'wingl.de',
|
'wingl.de',
|
||||||
'woodpipe.de',
|
'woodpipe.de',
|
||||||
'ckn.li',
|
'ckn.li',
|
||||||
'islamicstate.eu',
|
'islamicstate.eu',
|
||||||
'hausamsilberberg.de',
|
'hausamsilberberg.de',
|
||||||
'wiegand.tel',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'dns': {
|
'dns': {
|
||||||
|
@ -80,8 +80,10 @@
|
||||||
'freibrief.net',
|
'freibrief.net',
|
||||||
'nadenau.net',
|
'nadenau.net',
|
||||||
'naeder.net',
|
'naeder.net',
|
||||||
|
'rolfwerner.eu',
|
||||||
'wettengl.net',
|
'wettengl.net',
|
||||||
'wiegand.tel',
|
'wingl.de',
|
||||||
|
'woodpipe.de',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'rspamd': {
|
'rspamd': {
|
||||||
|
|
Loading…
Reference in a new issue