Automx on FreeBSD with virtual mail setup

David Mehler dave.mehler at gmail.com
Thu Apr 12 00:09:13 CEST 2018


Hello Christian,

Thank you for your response. I am having to do some upgrades at the
moment, but I will be getting back to this by end of the evening.

Question, do I need to manually make the xml files or does automx handle that?

If I have to manually make the .xml files does the following look
right? I'm currently getting a hanging thunderbird and outlook says
that I would have to configure manually.

My apache configuration is also included, if something is wrong about
the xml or the apache please let me know.

Thanks.
Dave.

cat autoconfig.conf
# Example for autoconfig (Mozilla clients)
<VirtualHost *:80>
ServerName autoconfig.domain.com
ServerAdmin webmaster at domain.com
DocumentRoot /usr/vhosts/domain.com/mail
LogLevel info
ErrorLog /var/log/provisioning-autoconfig-error.log
CustomLog /var/log/provisioning-autoconfig-access.log combined

WSGIScriptAlias /mail/config-v1.1.xml /usr/local/share/automx/automx_wsgi.py
<Directory "/usr/vhosts/domain.com/mail">
Options None
AllowOverride None
Require all granted
</Directory>

# email autoconfig (For Mozilla clients)
Alias "/mail" "/usr/vhosts/domain.com/mail"
Alias "/.well-known/autoconfig/mail" "/usr/vhosts/domain.com/mail"
<Directory "/usr/vhosts/domain.com/mail/">
Options None
AllowOverride None
Require all granted
</Directory>
</VirtualHost>

cat autodiscover.conf
# Example for autodiscover (Microsoft clients)
<VirtualHost *:80>
ServerName autodiscover.domain.com
ServerAdmin webmaster at domain.com

LogLevel info
ErrorLog /var/log/provisioning-autodiscover-error.log
CustomLog /var/log/provisioning-autodiscover-access.log combined

# share well-known for renewal via Let's Encrypt!
Alias "/.well-known/acme-challenge" "/usr/local/www/.well-known/acme-challenge"

 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
    </IfModule>

WSGIScriptAlias /Autodiscover/Autodiscover.xml
/usr/local/share/automx/automx_wsgi.py
WSGIScriptAlias /autodiscover/autodiscover.xml
/usr/local/share/automx/automx_wsgi.py
WSGIScriptAlias /autodiscover/mobileconfig
/usr/local/share/automx/automx_wsgi.py

<Directory "/usr/local/share/automx">
Options None
AllowOverride None
Require all granted
</Directory>

# email autodiscover (For Microsoft clients)
Alias "/autodiscover" "/usr/vhosts/domain.com/autodiscover"
<Directory "/usr/vhosts/domain.com/autodiscover/">
Options None
AllowOverride None
Require all granted
</Directory>
</VirtualHost>

# SSL example for autodiscover (Microsoft clients)
<VirtualHost *:443>
ServerName autodiscover.domain.com
ServerAdmin webmaster at domain.com
DocumentRoot /usr/local/share/automx
LogLevel info
ErrorLog /var/log/provisioning-autodiscover-error.log
CustomLog /var/log/provisioning-autodiscover-access.log combined

WSGIScriptAlias /Autodiscover/Autodiscover.xml
/usr/local/share/automx/automx_wsgi.py
WSGIScriptAlias /autodiscover/autodiscover.xml
/usr/local/share/automx/automx_wsgi.py
WSGIScriptAlias /autodiscover/mobileconfig
/usr/local/share/automx/automx_wsgi.py

<Directory "/usr/local/share/automx">
Options None
AllowOverride None
Require all granted
</Directory>

SSLEngine on
SSLCertificateFile "/usr/local/etc/ssl/acme/domain.com/fullchain.pem"
SSLCertificateKeyFile "/usr/local/etc/ssl/acme/private/domain.com/privkey.pem"

# email autodiscover (For Microsoft clients)
Alias "/autodiscover" "/usr/vhosts/domain.com/autodiscover"
<Directory "/usr/vhosts/domain.com/autodiscover/">
Options None
AllowOverride None
Require all granted
</Directory>
</VirtualHost>

cat autodiscover.xml
<?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>IMAP</Type>
<Server>imap.domain.com</Server>
<Port>993</Port>
<DomainRequired>off</DomainRequired>
<LoginName></LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>smtp.domain.com</Server> <!--IP Addr or DNS name of server-->
<Port>587</Port>
<DomainRequired>off</DomainRequired>
<LoginName></LoginName>
<SPA>off</SPA>
<Encryption>TLS</Encryption>
<AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
<UsePOPAuth>off</UsePOPAuth>
<SMTPLast>off</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>

cat mobileconfig
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>EmailAccountDescription</key>
<string>domain.com E-Mail Service</string>
<key>EmailAccountName</key>
<string></string>
<key>EmailAccountType</key>
<string>EmailTypeIMAP</string>
<key>EmailAddress</key>
<string></string>
<key>IncomingMailServerAuthentication</key>
<string>EmailAuthPassword</string>
<key>IncomingMailServerHostName</key>
<string>imap.domain.com</string>
<key>IncomingMailServerPortNumber</key>
<integer>993</integer>
<key>IncomingMailServerUseSSL</key>
<true/>
<key>IncomingMailServerUsername</key>
<string></string>
<key>IncomingPassword</key>
<string></string>
<key>OutgoingMailServerAuthentication</key>
<string>EmailAuthPassword</string>
<key>OutgoingMailServerHostName</key>
<string>smtp.domain.com</string>
<key>OutgoingMailServerPortNumber</key>
<integer>587</integer>
<key>OutgoingMailServerUseSSL</key>
<true/>
<key>OutgoingMailServerUsername</key>
<string></string>
<key>OutgoingPasswordSameAsIncomingPassword</key>
<true/>
<key>PayloadDescription</key>
<string>domain.com Email Services</string>
<key>PayloadDisplayName</key>
<string>domain.com E-Mail Service</string>
<key>PayloadIdentifier</key>
<string>domain.com.email</string>
<key>PayloadOrganization</key>
<string>Orga</string>
<key>PayloadType</key>
<string>com.apple.mail.managed</string>
<key>PayloadUUID</key>
<string>A5115AD5-3A86-4C4F-B964-576A757409AB</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PreventAppSheet</key>
<true/>
<key>PreventMove</key>
<false/>
<key>SMIMEEnabled</key>
<false/>
<key>disableMailRecentsSyncing</key>
<false/>
</dict>
</array>
<key>PayloadDescription</key>
<string>domain.com - E-Mail Account Configuration</string>
<key>PayloadDisplayName</key>
<string>E-Mail Account domain.com</string>
<key>PayloadIdentifier</key>
<string>E-Mail Account domain.com</string>
<key>PayloadOrganization</key>
<string>domain.com</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>E99CC7F7-6E38-4A1D-97DC-232143F67BC1</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>

cat config-v1.1.xml
<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
<emailProvider id="domain.com">
<domain>domain.com</domain>
<displayName>domain.com</displayName>
<displayShortName>domain.com</displayShortName>
<incomingServer type="imap">
<hostname>imap.domain.com</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILLOCALPART%</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname>smtp.domain.com</hostname>
<port>587</port>
<socketType>STARTTLS</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILLOCALPART%</username>
</outgoingServer>
<documentation url="http://www.domain.com/">
<descr lang="en">e-mail settings</descr>
</documentation>
</emailProvider>
</clientConfig>

and an automx-test user at domain.com gives me this:
Testing Autoconfig ...
Connecting to http://autoconfig.domain.com/mail/config-v1.1.xml?emailaddress=user@domain.com
...

  HTTP/1.1 200 OK
  Date: Wed, 11 Apr 2018 22:06:28 GMT
  Server: Apache
  Last-Modified: Sun, 08 Apr 2018 23:53:54 GMT
  ETag: "338-5695f00821ab7"
  Accept-Ranges: bytes
  Content-Length: 824
  Vary: Accept-Encoding,User-Agent
  Connection: close
  Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
<emailProvider id="domain.com">
<domain>domain.com</domain>
<displayName>domain.com</displayName>
<displayShortName>domain.com</displayShortName>
<incomingServer type="imap">
<hostname>imap.domain.com</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILLOCALPART%</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname>smtp.domain.com</hostname>
<port>587</port>
<socketType>STARTTLS</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILLOCALPART%</username>
</outgoingServer>
<documentation url="http://www.domain.com/">
<descr lang="en">e-mail settings</descr>
</documentation>
</emailProvider>
</clientConfig>


Testing Autodiscover (Microsoft Outlook(tm)) ...
Connecting to https://autodiscover.domain.com/autodiscover/autodiscover.xml ...

  HTTP/1.1 200 OK
  Date: Wed, 11 Apr 2018 22:06:29 GMT
  Server: Apache
  Last-Modified: Fri, 06 Apr 2018 05:00:40 GMT
  ETag: "3d0-56926f003d4d6"
  Accept-Ranges: bytes
  Content-Length: 976
  Vary: Accept-Encoding,User-Agent
  Connection: close
  Content-Type: application/xml
<?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>IMAP</Type>
<Server>imap.domain.com</Server>
<Port>993</Port>
<DomainRequired>off</DomainRequired>
<LoginName></LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>smtp.domain.com</Server> <!--IP Addr or DNS name of server-->
<Port>587</Port>
<DomainRequired>off</DomainRequired>
<LoginName></LoginName>
<SPA>off</SPA>
<Encryption>TLS</Encryption>
<AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
<UsePOPAuth>off</UsePOPAuth>
<SMTPLast>off</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>


Testing Autodiscover (mobilesync) ...
Connecting to https://autodiscover.domain.com/autodiscover/autodiscover.xml ...

  HTTP/1.1 200 OK
  Date: Wed, 11 Apr 2018 22:06:29 GMT
  Server: Apache
  Last-Modified: Fri, 06 Apr 2018 05:00:40 GMT
  ETag: "3d0-56926f003d4d6"
  Accept-Ranges: bytes
  Content-Length: 976
  Vary: Accept-Encoding,User-Agent
  Connection: close
  Content-Type: application/xml
<?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>IMAP</Type>
<Server>imap.domain.com</Server>
<Port>993</Port>
<DomainRequired>off</DomainRequired>
<LoginName></LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>smtp.domain.com</Server> <!--IP Addr or DNS name of server-->
<Port>587</Port>
<DomainRequired>off</DomainRequired>
<LoginName></LoginName>
<SPA>off</SPA>
<Encryption>TLS</Encryption>
<AuthRequired>on</AuthRequired> <!-- Optional: Is Authentication required? -->
<UsePOPAuth>off</UsePOPAuth>
<SMTPLast>off</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>


Testing mobileconfig...
Connecting to https://autodiscover.domain.com/mobileconfig ...

  HTTP/1.1 200 OK
  Date: Wed, 11 Apr 2018 22:06:29 GMT
  Server: Apache
  Last-Modified: Fri, 06 Apr 2018 04:59:43 GMT
  ETag: "930-56926eca6c461"
  Accept-Ranges: bytes
  Content-Length: 2352
  Vary: Accept-Encoding,User-Agent
  Connection: close
  Content-Type: text/xml
00000000  3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31  |<?xml version="1|
00000010  2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 55 54  |.0" encoding="UT|
00000020  46 2d 38 22 3f 3e 0a 3c  21 44 4f 43 54 59 50 45  |F-8"?>.<!DOCTYPE|
00000030  20 70 6c 69 73 74 20 50  55 42 4c 49 43 20 22 2d  | plist PUBLIC "-|
00000040  2f 2f 41 70 70 6c 65 2f  2f 44 54 44 20 50 4c 49  |//Apple//DTD PLI|
00000050  53 54 20 31 2e 30 2f 2f  45 4e 22 20 22 68 74 74  |ST 1.0//EN" "htt|
00000060  70 3a 2f 2f 77 77 77 2e  61 70 70 6c 65 2e 63 6f  |p://www.apple.co|
00000070  6d 2f 44 54 44 73 2f 50  72 6f 70 65 72 74 79 4c  |m/DTDs/PropertyL|
00000080  69 73 74 2d 31 2e 30 2e  64 74 64 22 3e 0a 3c 70  |ist-1.0.dtd">.<p|
00000090  6c 69 73 74 20 76 65 72  73 69 6f 6e 3d 22 31 2e  |list version="1.|
000000a0  30 22 3e 0a 3c 64 69 63  74 3e 0a 3c 6b 65 79 3e  |0">.<dict>.<key>|
000000b0  50 61 79 6c 6f 61 64 43  6f 6e 74 65 6e 74 3c 2f  |PayloadContent</|
000000c0  6b 65 79 3e 0a 3c 61 72  72 61 79 3e 0a 3c 64 69  |key>.<array>.<di|
000000d0  63 74 3e 0a 3c 6b 65 79  3e 45 6d 61 69 6c 41 63  |ct>.<key>EmailAc|
000000e0  63 6f 75 6e 74 44 65 73  63 72 69 70 74 69 6f 6e  |countDescription|
000000f0  3c 2f 6b 65 79 3e 0a 3c  73 74 72 69 6e 67 3e 64  |</key>.<string>d|
00000100  61 76 65 6d 65 68 6c 65  72 2e 63 6f 6d 20 45 2d  |avemehler.com E-|
00000110  4d 61 69 6c 20 53 65 72  76 69 63 65 3c 2f 73 74  |Mail Service</st|
00000120  72 69 6e 67 3e 0a 3c 6b  65 79 3e 45 6d 61 69 6c  |ring>.<key>Email|
00000130  41 63 63 6f 75 6e 74 4e  61 6d 65 3c 2f 6b 65 79  |AccountName</key|
00000140  3e 0a 3c 73 74 72 69 6e  67 3e 3c 2f 73 74 72 69  |>.<string></stri|
00000150  6e 67 3e 0a 3c 6b 65 79  3e 45 6d 61 69 6c 41 63  |ng>.<key>EmailAc|
00000160  63 6f 75 6e 74 54 79 70  65 3c 2f 6b 65 79 3e 0a  |countType</key>.|
00000170  3c 73 74 72 69 6e 67 3e  45 6d 61 69 6c 54 79 70  |<string>EmailTyp|
00000180  65 49 4d 41 50 3c 2f 73  74 72 69 6e 67 3e 0a 3c  |eIMAP</string>.<|
00000190  6b 65 79 3e 45 6d 61 69  6c 41 64 64 72 65 73 73  |key>EmailAddress|
000001a0  3c 2f 6b 65 79 3e 0a 3c  73 74 72 69 6e 67 3e 3c  |</key>.<string><|
000001b0  2f 73 74 72 69 6e 67 3e  0a 3c 6b 65 79 3e 49 6e  |/string>.<key>In|
000001c0  63 6f 6d 69 6e 67 4d 61  69 6c 53 65 72 76 65 72  |comingMailServer|
000001d0  41 75 74 68 65 6e 74 69  63 61 74 69 6f 6e 3c 2f  |Authentication</|
000001e0  6b 65 79 3e 0a 3c 73 74  72 69 6e 67 3e 45 6d 61  |key>.<string>Ema|
000001f0  69 6c 41 75 74 68 50 61  73 73 77 6f 72 64 3c 2f  |ilAuthPassword</|
00000200  73 74 72 69 6e 67 3e 0a  3c 6b 65 79 3e 49 6e 63  |string>.<key>Inc|
00000210  6f 6d 69 6e 67 4d 61 69  6c 53 65 72 76 65 72 48  |omingMailServerH|
00000220  6f 73 74 4e 61 6d 65 3c  2f 6b 65 79 3e 0a 3c 73  |ostName</key>.<s|
00000230  74 72 69 6e 67 3e 69 6d  61 70 2e 64 61 76 65 6d  |tring>imap.davem|
00000240  65 68 6c 65 72 2e 63 6f  6d 3c 2f 73 74 72 69 6e  |ehler.com</strin|
00000250  67 3e 0a 3c 6b 65 79 3e  49 6e 63 6f 6d 69 6e 67  |g>.<key>Incoming|
00000260  4d 61 69 6c 53 65 72 76  65 72 50 6f 72 74 4e 75  |MailServerPortNu|
00000270  6d 62 65 72 3c 2f 6b 65  79 3e 0a 3c 69 6e 74 65  |mber</key>.<inte|
00000280  67 65 72 3e 39 39 33 3c  2f 69 6e 74 65 67 65 72  |ger>993</integer|
00000290  3e 0a 3c 6b 65 79 3e 49  6e 63 6f 6d 69 6e 67 4d  |>.<key>IncomingM|
000002a0  61 69 6c 53 65 72 76 65  72 55 73 65 53 53 4c 3c  |ailServerUseSSL<|
000002b0  2f 6b 65 79 3e 0a 3c 74  72 75 65 2f 3e 0a 3c 6b  |/key>.<true/>.<k|
000002c0  65 79 3e 49 6e 63 6f 6d  69 6e 67 4d 61 69 6c 53  |ey>IncomingMailS|
000002d0  65 72 76 65 72 55 73 65  72 6e 61 6d 65 3c 2f 6b  |erverUsername</k|
000002e0  65 79 3e 0a 3c 73 74 72  69 6e 67 3e 3c 2f 73 74  |ey>.<string></st|
000002f0  72 69 6e 67 3e 0a 3c 6b  65 79 3e 49 6e 63 6f 6d  |ring>.<key>Incom|
00000300  69 6e 67 50 61 73 73 77  6f 72 64 3c 2f 6b 65 79  |ingPassword</key|
00000310  3e 0a 3c 73 74 72 69 6e  67 3e 3c 2f 73 74 72 69  |>.<string></stri|
00000320  6e 67 3e 0a 3c 6b 65 79  3e 4f 75 74 67 6f 69 6e  |ng>.<key>Outgoin|
00000330  67 4d 61 69 6c 53 65 72  76 65 72 41 75 74 68 65  |gMailServerAuthe|
00000340  6e 74 69 63 61 74 69 6f  6e 3c 2f 6b 65 79 3e 0a  |ntication</key>.|
00000350  3c 73 74 72 69 6e 67 3e  45 6d 61 69 6c 41 75 74  |<string>EmailAut|
00000360  68 50 61 73 73 77 6f 72  64 3c 2f 73 74 72 69 6e  |hPassword</strin|
00000370  67 3e 0a 3c 6b 65 79 3e  4f 75 74 67 6f 69 6e 67  |g>.<key>Outgoing|
00000380  4d 61 69 6c 53 65 72 76  65 72 48 6f 73 74 4e 61  |MailServerHostNa|
00000390  6d 65 3c 2f 6b 65 79 3e  0a 3c 73 74 72 69 6e 67  |me</key>.<string|
000003a0  3e 73 6d 74 70 2e 64 61  76 65 6d 65 68 6c 65 72  |>smtp.domain|
000003b0  2e 63 6f 6d 3c 2f 73 74  72 69 6e 67 3e 0a 3c 6b  |.com</string>.<k|
000003c0  65 79 3e 4f 75 74 67 6f  69 6e 67 4d 61 69 6c 53  |ey>OutgoingMailS|
000003d0  65 72 76 65 72 50 6f 72  74 4e 75 6d 62 65 72 3c  |erverPortNumber<|
000003e0  2f 6b 65 79 3e 0a 3c 69  6e 74 65 67 65 72 3e 35  |/key>.<integer>5|
000003f0  38 37 3c 2f 69 6e 74 65  67 65 72 3e 0a 3c 6b 65  |87</integer>.<ke|
00000400  79 3e 4f 75 74 67 6f 69  6e 67 4d 61 69 6c 53 65  |y>OutgoingMailSe|
00000410  72 76 65 72 55 73 65 53  53 4c 3c 2f 6b 65 79 3e  |rverUseSSL</key>|
00000420  0a 3c 74 72 75 65 2f 3e  0a 3c 6b 65 79 3e 4f 75  |.<true/>.<key>Ou|
00000430  74 67 6f 69 6e 67 4d 61  69 6c 53 65 72 76 65 72  |tgoingMailServer|
00000440  55 73 65 72 6e 61 6d 65  3c 2f 6b 65 79 3e 0a 3c  |Username</key>.<|
00000450  73 74 72 69 6e 67 3e 3c  2f 73 74 72 69 6e 67 3e  |string></string>|
00000460  0a 3c 6b 65 79 3e 4f 75  74 67 6f 69 6e 67 50 61  |.<key>OutgoingPa|
00000470  73 73 77 6f 72 64 53 61  6d 65 41 73 49 6e 63 6f  |sswordSameAsInco|
00000480  6d 69 6e 67 50 61 73 73  77 6f 72 64 3c 2f 6b 65  |mingPassword</ke|
00000490  79 3e 0a 3c 74 72 75 65  2f 3e 0a 3c 6b 65 79 3e  |y>.<true/>.<key>|
000004a0  50 61 79 6c 6f 61 64 44  65 73 63 72 69 70 74 69  |PayloadDescripti|
000004b0  6f 6e 3c 2f 6b 65 79 3e  0a 3c 73 74 72 69 6e 67  |on</key>.<string|
000004c0  3e 44 61 76 65 6d 65 68  6c 65 72 2e 63 6f 6d 20  |>domain.com |
000004d0  45 6d 61 69 6c 20 53 65  72 76 69 63 65 73 3c 2f  |Email Services</|
000004e0  73 74 72 69 6e 67 3e 0a  3c 6b 65 79 3e 50 61 79  |string>.<key>Pay|
000004f0  6c 6f 61 64 44 69 73 70  6c 61 79 4e 61 6d 65 3c  |loadDisplayName<|
00000500  2f 6b 65 79 3e 0a 3c 73  74 72 69 6e 67 3e 64 61  |/key>.<string>da|
00000510  76 65 6d 65 68 6c 65 72  2e 63 6f 6d 20 45 2d 4d  |vemehler.com E-M|
00000520  61 69 6c 20 53 65 72 76  69 63 65 3c 2f 73 74 72  |ail Service</str|
00000530  69 6e 67 3e 0a 3c 6b 65  79 3e 50 61 79 6c 6f 61  |ing>.<key>Payloa|
00000540  64 49 64 65 6e 74 69 66  69 65 72 3c 2f 6b 65 79  |dIdentifier</key|
00000550  3e 0a 3c 73 74 72 69 6e  67 3e 64 61 76 65 6d 65  |>.<string>daveme|
00000560  68 6c 65 72 2e 63 6f 6d  2e 65 6d 61 69 6c 3c 2f  |hler.com.email</|
00000570  73 74 72 69 6e 67 3e 0a  3c 6b 65 79 3e 50 61 79  |string>.<key>Pay|
00000580  6c 6f 61 64 4f 72 67 61  6e 69 7a 61 74 69 6f 6e  |loadOrganization|
00000590  3c 2f 6b 65 79 3e 0a 3c  73 74 72 69 6e 67 3e 4f  |</key>.<string>O|
000005a0  72 67 61 3c 2f 73 74 72  69 6e 67 3e 0a 3c 6b 65  |rga</string>.<ke|
000005b0  79 3e 50 61 79 6c 6f 61  64 54 79 70 65 3c 2f 6b  |y>PayloadType</k|
000005c0  65 79 3e 0a 3c 73 74 72  69 6e 67 3e 63 6f 6d 2e  |ey>.<string>com.|
000005d0  61 70 70 6c 65 2e 6d 61  69 6c 2e 6d 61 6e 61 67  |apple.mail.manag|
000005e0  65 64 3c 2f 73 74 72 69  6e 67 3e 0a 3c 6b 65 79  |ed</string>.<key|
000005f0  3e 50 61 79 6c 6f 61 64  55 55 49 44 3c 2f 6b 65  |>PayloadUUID</ke|
00000600  79 3e 0a 3c 73 74 72 69  6e 67 3e 41 35 31 31 35  |y>.<string>A5115|
00000610  41 44 35 2d 33 41 38 36  2d 34 43 34 46 2d 42 39  |AD5-3A86-4C4F-B9|
00000620  36 34 2d 35 37 36 41 37  35 37 34 30 39 41 42 3c  |64-576A757409AB<|
00000630  2f 73 74 72 69 6e 67 3e  0a 3c 6b 65 79 3e 50 61  |/string>.<key>Pa|
00000640  79 6c 6f 61 64 56 65 72  73 69 6f 6e 3c 2f 6b 65  |yloadVersion</ke|
00000650  79 3e 0a 3c 69 6e 74 65  67 65 72 3e 31 3c 2f 69  |y>.<integer>1</i|
00000660  6e 74 65 67 65 72 3e 0a  3c 6b 65 79 3e 50 72 65  |nteger>.<key>Pre|
00000670  76 65 6e 74 41 70 70 53  68 65 65 74 3c 2f 6b 65  |ventAppSheet</ke|
00000680  79 3e 0a 3c 74 72 75 65  2f 3e 0a 3c 6b 65 79 3e  |y>.<true/>.<key>|
00000690  50 72 65 76 65 6e 74 4d  6f 76 65 3c 2f 6b 65 79  |PreventMove</key|
000006a0  3e 0a 3c 66 61 6c 73 65  2f 3e 0a 3c 6b 65 79 3e  |>.<false/>.<key>|
000006b0  53 4d 49 4d 45 45 6e 61  62 6c 65 64 3c 2f 6b 65  |SMIMEEnabled</ke|
000006c0  79 3e 0a 3c 66 61 6c 73  65 2f 3e 0a 3c 6b 65 79  |y>.<false/>.<key|
000006d0  3e 64 69 73 61 62 6c 65  4d 61 69 6c 52 65 63 65  |>disableMailRece|
000006e0  6e 74 73 53 79 6e 63 69  6e 67 3c 2f 6b 65 79 3e  |ntsSyncing</key>|
000006f0  0a 3c 66 61 6c 73 65 2f  3e 0a 3c 2f 64 69 63 74  |.<false/>.</dict|
00000700  3e 0a 3c 2f 61 72 72 61  79 3e 0a 3c 6b 65 79 3e  |>.</array>.<key>|
00000710  50 61 79 6c 6f 61 64 44  65 73 63 72 69 70 74 69  |PayloadDescripti|
00000720  6f 6e 3c 2f 6b 65 79 3e  0a 3c 73 74 72 69 6e 67  |on</key>.<string|
00000730  3e 64 61 76 65 6d 65 68  6c 65 72 2e 63 6f 6d 20  |>domain.com |
00000740  2d 20 45 2d 4d 61 69 6c  20 41 63 63 6f 75 6e 74  |- E-Mail Account|
00000750  20 43 6f 6e 66 69 67 75  72 61 74 69 6f 6e 3c 2f  | Configuration</|
00000760  73 74 72 69 6e 67 3e 0a  3c 6b 65 79 3e 50 61 79  |string>.<key>Pay|
00000770  6c 6f 61 64 44 69 73 70  6c 61 79 4e 61 6d 65 3c  |loadDisplayName<|
00000780  2f 6b 65 79 3e 0a 3c 73  74 72 69 6e 67 3e 45 2d  |/key>.<string>E-|
00000790  4d 61 69 6c 20 41 63 63  6f 75 6e 74 20 64 61 76  |Mail Account dav|
000007a0  65 6d 65 68 6c 65 72 2e  63 6f 6d 3c 2f 73 74 72  |emehler.com</str|
000007b0  69 6e 67 3e 0a 3c 6b 65  79 3e 50 61 79 6c 6f 61  |ing>.<key>Payloa|
000007c0  64 49 64 65 6e 74 69 66  69 65 72 3c 2f 6b 65 79  |dIdentifier</key|
000007d0  3e 0a 3c 73 74 72 69 6e  67 3e 45 2d 4d 61 69 6c  |>.<string>E-Mail|
000007e0  20 41 63 63 6f 75 6e 74  20 64 61 76 65 6d 65 68  | Account davemeh|
000007f0  6c 65 72 2e 63 6f 6d 3c  2f 73 74 72 69 6e 67 3e  |ler.com</string>|
00000800  0a 3c 6b 65 79 3e 50 61  79 6c 6f 61 64 4f 72 67  |.<key>PayloadOrg|
00000810  61 6e 69 7a 61 74 69 6f  6e 3c 2f 6b 65 79 3e 0a  |anization</key>.|
00000820  3c 73 74 72 69 6e 67 3e  64 61 76 65 6d 65 68 6c  |<string>davemehl|
00000830  65 72 2e 63 6f 6d 3c 2f  73 74 72 69 6e 67 3e 0a  |er.com</string>.|
00000840  3c 6b 65 79 3e 50 61 79  6c 6f 61 64 52 65 6d 6f  |<key>PayloadRemo|
00000850  76 61 6c 44 69 73 61 6c  6c 6f 77 65 64 3c 2f 6b  |valDisallowed</k|
00000860  65 79 3e 0a 3c 66 61 6c  73 65 2f 3e 0a 3c 6b 65  |ey>.<false/>.<ke|
00000870  79 3e 50 61 79 6c 6f 61  64 54 79 70 65 3c 2f 6b  |y>PayloadType</k|
00000880  65 79 3e 0a 3c 73 74 72  69 6e 67 3e 43 6f 6e 66  |ey>.<string>Conf|
00000890  69 67 75 72 61 74 69 6f  6e 3c 2f 73 74 72 69 6e  |iguration</strin|
000008a0  67 3e 0a 3c 6b 65 79 3e  50 61 79 6c 6f 61 64 55  |g>.<key>PayloadU|
000008b0  55 49 44 3c 2f 6b 65 79  3e 0a 3c 73 74 72 69 6e  |UID</key>.<strin|
000008c0  67 3e 45 39 39 43 43 37  46 37 2d 36 45 33 38 2d  |g>E99CC7F7-6E38-|
000008d0  34 41 31 44 2d 39 37 44  43 2d 32 33 32 31 34 33  |4A1D-97DC-232143|
000008e0  46 36 37 42 43 31 3c 2f  73 74 72 69 6e 67 3e 0a  |F67BC1</string>.|
000008f0  3c 6b 65 79 3e 50 61 79  6c 6f 61 64 56 65 72 73  |<key>PayloadVers|
00000900  69 6f 6e 3c 2f 6b 65 79  3e 0a 3c 69 6e 74 65 67  |ion</key>.<integ|
00000910  65 72 3e 31 3c 2f 69 6e  74 65 67 65 72 3e 0a 3c  |er>1</integer>.<|
00000920  2f 64 69 63 74 3e 0a 3c  2f 70 6c 69 73 74 3e 0a  |/dict>.</plist>.|
00000930


On 4/11/18, Christian Rößner <c at roessner-network-solutions.com> wrote:
> Hi David,
>
>> I'm running FreeBSD 11.1 and have a virtual email system set up. It
>> runs Postfix, Dovecot, and MySQL among other things. To that i'd now
>> like to add Automx.
>>
>> I've got the FreeBSD automx port installed, and I've got the dns
>> propagated for my domain(s) so that's good.
>>
>> I am uncertain now of how to set up the MySQL database and tables, can
>> I integrate automx in to my existing virtual mail database or do I
>> have to make another db?
>
> You can integrate it. It simply depends on the fields you have in the tables
> and what queries you want to do within automx.
>
> Example:
> ----------------------------------------------------------------------
> [automx]
> provider = example.test
> debug = yes
> logfile = /var/log/automx/automx.log
>
> domains = *
>
> memcache = 127.0.0.1:11211
> memcache_ttl = 86400
> client_error_limit = 5
> rate_limit_exception_networks = 127.0.0.0/8, ::1/128
>
> [DEFAULT]
> action = settings
>
> account_type = email
> account_name = Your company
> account_name_short = Company
>
> [global]
> backend = sql
>
> host = mysql://user:pass@server/databasename
> query = SELECT displayname, mailaddr FROM mail WHERE mailaddr='%s';
> result_attrs = displayname, mailaddr
>
> display_name = ${displayname}
>
> imap = yes
> imap_server = mail.example.test
> imap_port = 143
> imap_encryption = starttls
> imap_auth = plaintext
> imap_auth_identity = ${mailaddr}
>
> smtp = yes
> smtp_server = mail.example.test
> smtp_port = 587
> smtp_encryption = starttls
> smtp_auth = plaintext
> smtp_auth_identity = ${mailaddr}
> smtp_default = yes
> ----------------------------------------------------------------------
>
> I have not tested this example, but I think it should work. Concerning
> Python2 or Python3: If you use automx from the Github master, it should run
> under each Python version beginning with 2.7 (maybe 2.6; not sure).
>
> I have no Apache anymore, so I can not help you with this. I use uwsgi with
> nginx. Here is the config stuff from Gentoo-Linux:
>
> Example for Python 3:
> ----------------------------------------------------------------------
> UWSGI_SOCKET=127.0.0.1:9100
> UWSGI_THREADS=1
> UWSGI_PROGRAM=
> UWSGI_XML_CONFIG=
> UWSGI_PROCESSES=4
> UWSGI_LOG_FILE="/var/log/automx/uwsgi.log"
> UWSGI_CHROOT=
> UWSGI_DIR=
> UWSGI_USER=automx
> UWSGI_GROUP=automx
> UWSGI_EMPEROR_PATH=
> UWSGI_EMPEROR_GROUP=
> UWSGI_EXTRA_OPTIONS="--plugin python35 --python-path
> /usr/local/lib64/python3.4 --module automx_wsgi"
> ----------------------------------------------------------------------
>
> And here are the settings for nginx:
>
> Example:
> ----------------------------------------------------------------------
> ...
>     # automx
>     location ^~ /automx {
>         include /etc/nginx/mime.types;
>         types {
>             text/html de en;
>         }
>         try_files $uri $uri/ index.html.$lang;
>         index index.html.$lang;
>
>         access_log /var/log/nginx/access_ssl-automx.log main;
>         error_log /var/log/nginx/error_ssl-automx.log info;
>     }
>
>     # automx - autodiscover
>     location ~ /autodiscover/autodiscover.xml {
>         include        uwsgi_params;
>         uwsgi_pass     127.0.0.1:9100;
>     }
>     # automx - iOS mobileconfig
>     location = /mobileconfig {
>         include        uwsgi_params;
>         uwsgi_pass     127.0.0.1:9100;
>     }
> ...
> ----------------------------------------------------------------------
>
> For autodiscover you need SSL and then you can add something like this:
>
> Example:
> ----------------------------------------------------------------------
> ...
>     # automx - autodiscover
>     location /autodiscover/autodiscover.xml {
>         include        uwsgi_params;
>         uwsgi_pass     127.0.0.1:9100;
>     }
> ...
> ----------------------------------------------------------------------
>
> Hope that is a good starting point for you. Once again sorry for the delay.
> I am very busy...
>
> Best regards
>
> Christian
> --
> Rößner-Network-Solutions
> Erlenwiese 14, 36304 Alsfeld
> T: +49 6631 78823400, F: +49 6631 78823409, M: +49 171 9905345
> USt-IdNr.: DE225643613, https://roessner-network-solutions.com
>
>


More information about the automx-users mailing list