From dave.mehler at gmail.com Sat Apr 7 03:43:05 2018 From: dave.mehler at gmail.com (David Mehler) Date: Fri, 6 Apr 2018 21:43:05 -0400 Subject: automx xml configuration files Message-ID: Hello, I'm trying to get automx going on FreeBSD 11.1. I'm using apache 2.4 and the email server is postfix/dovecot/MySQL. I've got .xml files for autoconfig, autodiscover (outlook and activesync), and mobileconfig. An automx-test user at domain.com returns all three files. The issue is thunderbird and outlook express classic both hang then offer me manual configuration. I'm wondering if one or more of these xml files have a syntax errors? Can someone check them out and let me know? Thanks. Dave. config-v1.1.xml domain.com domain.com domain.com imap.domain.com 993 SSL password-cleartext %EMAILADDRESS% smtp.domain.net 587 STARTTLS password-cleartext %EMAILADDRESS% e-mail settings cat autodiscover.xml email settings IMAP imap.domain.com 993 off off on on SMTP smtp.domain.com 587 off off TLS on off off cat mobileconfig PayloadContent EmailAccountDescription domain.com E-Mail Service EmailAccountName EmailAccountType EmailTypeIMAP EmailAddress IncomingMailServerAuthentication EmailAuthPassword IncomingMailServerHostName imap.domain.com IncomingMailServerPortNumber 993 IncomingMailServerUseSSL IncomingMailServerUsername IncomingPassword OutgoingMailServerAuthentication EmailAuthPassword OutgoingMailServerHostName smtp.domain.com OutgoingMailServerPortNumber 587 OutgoingMailServerUseSSL OutgoingMailServerUsername OutgoingPasswordSameAsIncomingPassword PayloadDescription domain.com Email Services PayloadDisplayName domain.com E-Mail Service PayloadIdentifier domain.com.email PayloadOrganization Orga PayloadType com.apple.mail.managed PayloadUUID A5115AD5-3A86-4C4F-B964-576A757409AB PayloadVersion 1 PreventAppSheet PreventMove SMIMEEnabled disableMailRecentsSyncing PayloadDescription domain.com - E-Mail Account Configuration PayloadDisplayName E-Mail Account domain.com PayloadIdentifier E-Mail Account domain.com PayloadOrganization domain.com PayloadRemovalDisallowed PayloadType Configuration PayloadUUID E99CC7F7-6E38-4A1D-97DC-232143F67BC1 PayloadVersion 1 From c at roessner-network-solutions.com Mon Apr 9 19:29:36 2018 From: c at roessner-network-solutions.com (=?utf-8?Q?Christian_R=C3=B6=C3=9Fner?=) Date: Mon, 9 Apr 2018 19:29:36 +0200 Subject: automx xml configuration files In-Reply-To: References: Message-ID: <71DCBDF5-9235-4CF5-AA99-51424C5EA9C9@roessner-network-solutions.com> Hi David, sorry for this very long delay. Currently I am very short in time. I will have a closer look at your messages tomorrow and will try to help you then Christian Von meinem iPhone gesendet > Am 07.04.2018 um 03:43 schrieb David Mehler : > > Hello, > > I'm trying to get automx going on FreeBSD 11.1. I'm using apache 2.4 > and the email server is postfix/dovecot/MySQL. > > I've got .xml files for autoconfig, autodiscover (outlook and > activesync), and mobileconfig. An automx-test user at domain.com returns > all three files. > > The issue is thunderbird and outlook express classic both hang then > offer me manual configuration. > > I'm wondering if one or more of these xml files have a syntax errors? > Can someone check them out and let me know? > > Thanks. > Dave. > > config-v1.1.xml > > > > domain.com > domain.com > domain.com > > > imap.domain.com > 993 > SSL > password-cleartext > %EMAILADDRESS% > > > > smtp.domain.net > 587 > STARTTLS > password-cleartext > %EMAILADDRESS% > > > > e-mail settings > > > > > cat autodiscover.xml > > > > > email > settings > > IMAP > imap.domain.com > 993 > off > > off > on > on > > > SMTP > smtp.domain.com > 587 > off > > off > TLS > on > off > off > > > > > > cat mobileconfig > > "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> > > > PayloadContent > > > EmailAccountDescription > domain.com E-Mail Service > EmailAccountName > > EmailAccountType > EmailTypeIMAP > EmailAddress > > IncomingMailServerAuthentication > EmailAuthPassword > IncomingMailServerHostName > imap.domain.com > IncomingMailServerPortNumber > 993 > IncomingMailServerUseSSL > > IncomingMailServerUsername > > IncomingPassword > > OutgoingMailServerAuthentication > EmailAuthPassword > OutgoingMailServerHostName > smtp.domain.com > OutgoingMailServerPortNumber > 587 > OutgoingMailServerUseSSL > > OutgoingMailServerUsername > > OutgoingPasswordSameAsIncomingPassword > > PayloadDescription > domain.com Email Services > PayloadDisplayName > domain.com E-Mail Service > PayloadIdentifier > domain.com.email > PayloadOrganization > Orga > PayloadType > com.apple.mail.managed > PayloadUUID > A5115AD5-3A86-4C4F-B964-576A757409AB > PayloadVersion > 1 > PreventAppSheet > > PreventMove > > SMIMEEnabled > > disableMailRecentsSyncing > > > > PayloadDescription > domain.com - E-Mail Account Configuration > PayloadDisplayName > E-Mail Account domain.com > PayloadIdentifier > E-Mail Account domain.com > PayloadOrganization > domain.com > PayloadRemovalDisallowed > > PayloadType > Configuration > PayloadUUID > E99CC7F7-6E38-4A1D-97DC-232143F67BC1 > PayloadVersion > 1 > > From dave.mehler at gmail.com Mon Apr 9 22:55:15 2018 From: dave.mehler at gmail.com (David Mehler) Date: Mon, 9 Apr 2018 16:55:15 -0400 Subject: automx xml configuration files In-Reply-To: <71DCBDF5-9235-4CF5-AA99-51424C5EA9C9@roessner-network-solutions.com> References: <71DCBDF5-9235-4CF5-AA99-51424C5EA9C9@roessner-network-solutions.com> Message-ID: Hello Christian, Thank you for your reply. I look forward to your help. If it would help I can send my .xml files. Thanks. Dave. On 4/9/18, Christian R??ner wrote: > Hi David, > > sorry for this very long delay. Currently I am very short in time. I will > have a closer look at your messages tomorrow and will try to help you then > > Christian > > Von meinem iPhone gesendet > >> Am 07.04.2018 um 03:43 schrieb David Mehler : >> >> Hello, >> >> I'm trying to get automx going on FreeBSD 11.1. I'm using apache 2.4 >> and the email server is postfix/dovecot/MySQL. >> >> I've got .xml files for autoconfig, autodiscover (outlook and >> activesync), and mobileconfig. An automx-test user at domain.com returns >> all three files. >> >> The issue is thunderbird and outlook express classic both hang then >> offer me manual configuration. >> >> I'm wondering if one or more of these xml files have a syntax errors? >> Can someone check them out and let me know? >> >> Thanks. >> Dave. >> >> config-v1.1.xml >> >> >> >> domain.com >> domain.com >> domain.com >> >> >> imap.domain.com >> 993 >> SSL >> password-cleartext >> %EMAILADDRESS% >> >> >> >> smtp.domain.net >> 587 >> STARTTLS >> password-cleartext >> %EMAILADDRESS% >> >> >> >> e-mail settings >> >> >> >> >> cat autodiscover.xml >> >> > xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006"> >> > xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a"> >> >> email >> settings >> >> IMAP >> imap.domain.com >> 993 >> off >> >> off >> on >> on >> >> >> SMTP >> smtp.domain.com >> 587 >> off >> >> off >> TLS >> on >> off >> off >> >> >> >> >> >> cat mobileconfig >> >> > "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >> >> >> PayloadContent >> >> >> EmailAccountDescription >> domain.com E-Mail Service >> EmailAccountName >> >> EmailAccountType >> EmailTypeIMAP >> EmailAddress >> >> IncomingMailServerAuthentication >> EmailAuthPassword >> IncomingMailServerHostName >> imap.domain.com >> IncomingMailServerPortNumber >> 993 >> IncomingMailServerUseSSL >> >> IncomingMailServerUsername >> >> IncomingPassword >> >> OutgoingMailServerAuthentication >> EmailAuthPassword >> OutgoingMailServerHostName >> smtp.domain.com >> OutgoingMailServerPortNumber >> 587 >> OutgoingMailServerUseSSL >> >> OutgoingMailServerUsername >> >> OutgoingPasswordSameAsIncomingPassword >> >> PayloadDescription >> domain.com Email Services >> PayloadDisplayName >> domain.com E-Mail Service >> PayloadIdentifier >> domain.com.email >> PayloadOrganization >> Orga >> PayloadType >> com.apple.mail.managed >> PayloadUUID >> A5115AD5-3A86-4C4F-B964-576A757409AB >> PayloadVersion >> 1 >> PreventAppSheet >> >> PreventMove >> >> SMIMEEnabled >> >> disableMailRecentsSyncing >> >> >> >> PayloadDescription >> domain.com - E-Mail Account Configuration >> PayloadDisplayName >> E-Mail Account domain.com >> PayloadIdentifier >> E-Mail Account domain.com >> PayloadOrganization >> domain.com >> PayloadRemovalDisallowed >> >> PayloadType >> Configuration >> PayloadUUID >> E99CC7F7-6E38-4A1D-97DC-232143F67BC1 >> PayloadVersion >> 1 >> >> > > From c at roessner-network-solutions.com Wed Apr 11 18:25:50 2018 From: c at roessner-network-solutions.com (=?utf-8?Q?Christian_Ro=CC=88=C3=9Fner?=) Date: Wed, 11 Apr 2018 18:25:50 +0200 Subject: Automx on FreeBSD with virtual mail setup In-Reply-To: References: Message-ID: 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 at 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1629 bytes Desc: not available URL: From dave.mehler at gmail.com Thu Apr 12 00:09:13 2018 From: dave.mehler at gmail.com (David Mehler) Date: Wed, 11 Apr 2018 18:09:13 -0400 Subject: Automx on FreeBSD with virtual mail setup In-Reply-To: References: Message-ID: 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) 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 Options None AllowOverride None Require all granted # email autoconfig (For Mozilla clients) Alias "/mail" "/usr/vhosts/domain.com/mail" Alias "/.well-known/autoconfig/mail" "/usr/vhosts/domain.com/mail" Options None AllowOverride None Require all granted cat autodiscover.conf # Example for autodiscover (Microsoft clients) 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" RewriteEngine On RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.* RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301] 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 Options None AllowOverride None Require all granted # email autodiscover (For Microsoft clients) Alias "/autodiscover" "/usr/vhosts/domain.com/autodiscover" Options None AllowOverride None Require all granted # SSL example for autodiscover (Microsoft clients) 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 Options None AllowOverride None Require all granted 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" Options None AllowOverride None Require all granted cat autodiscover.xml email settings IMAP imap.domain.com 993 off off on on SMTP smtp.domain.com 587 off off TLS on off off cat mobileconfig PayloadContent EmailAccountDescription domain.com E-Mail Service EmailAccountName EmailAccountType EmailTypeIMAP EmailAddress IncomingMailServerAuthentication EmailAuthPassword IncomingMailServerHostName imap.domain.com IncomingMailServerPortNumber 993 IncomingMailServerUseSSL IncomingMailServerUsername IncomingPassword OutgoingMailServerAuthentication EmailAuthPassword OutgoingMailServerHostName smtp.domain.com OutgoingMailServerPortNumber 587 OutgoingMailServerUseSSL OutgoingMailServerUsername OutgoingPasswordSameAsIncomingPassword PayloadDescription domain.com Email Services PayloadDisplayName domain.com E-Mail Service PayloadIdentifier domain.com.email PayloadOrganization Orga PayloadType com.apple.mail.managed PayloadUUID A5115AD5-3A86-4C4F-B964-576A757409AB PayloadVersion 1 PreventAppSheet PreventMove SMIMEEnabled disableMailRecentsSyncing PayloadDescription domain.com - E-Mail Account Configuration PayloadDisplayName E-Mail Account domain.com PayloadIdentifier E-Mail Account domain.com PayloadOrganization domain.com PayloadRemovalDisallowed PayloadType Configuration PayloadUUID E99CC7F7-6E38-4A1D-97DC-232143F67BC1 PayloadVersion 1 cat config-v1.1.xml domain.com domain.com domain.com imap.domain.com 993 SSL password-cleartext %EMAILLOCALPART% smtp.domain.com 587 STARTTLS password-cleartext %EMAILLOCALPART% e-mail settings 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 at 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 domain.com domain.com domain.com imap.domain.com 993 SSL password-cleartext %EMAILLOCALPART% smtp.domain.com 587 STARTTLS password-cleartext %EMAILLOCALPART% e-mail settings 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 email settings IMAP imap.domain.com 993 off off on on SMTP smtp.domain.com 587 off off TLS on off off 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 email settings IMAP imap.domain.com 993 off off on on SMTP smtp.domain.com 587 off off TLS on off off 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 |....| 000000b0 50 61 79 6c 6f 61 64 43 6f 6e 74 65 6e 74 3c 2f |PayloadContent...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 |.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.Email| 00000130 41 63 63 6f 75 6e 74 4e 61 6d 65 3c 2f 6b 65 79 |AccountName..EmailAc| 00000160 63 6f 75 6e 74 54 79 70 65 3c 2f 6b 65 79 3e 0a |countType.| 00000170 3c 73 74 72 69 6e 67 3e 45 6d 61 69 6c 54 79 70 |EmailTyp| 00000180 65 49 4d 41 50 3c 2f 73 74 72 69 6e 67 3e 0a 3c |eIMAP.<| 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 |.<| 000001b0 2f 73 74 72 69 6e 67 3e 0a 3c 6b 65 79 3e 49 6e |/string>.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.Ema| 000001f0 69 6c 41 75 74 68 50 61 73 73 77 6f 72 64 3c 2f |ilAuthPassword.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.imap.davem| 00000240 65 68 6c 65 72 2e 63 6f 6d 3c 2f 73 74 72 69 6e |ehler.com.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.993.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>..IncomingMailS| 000002d0 65 72 76 65 72 55 73 65 72 6e 61 6d 65 3c 2f 6b |erverUsername..Incom| 00000300 69 6e 67 50 61 73 73 77 6f 72 64 3c 2f 6b 65 79 |ingPassword..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.| 00000350 3c 73 74 72 69 6e 67 3e 45 6d 61 69 6c 41 75 74 |EmailAut| 00000360 68 50 61 73 73 77 6f 72 64 3c 2f 73 74 72 69 6e |hPassword.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.smtp.domain| 000003b0 2e 63 6f 6d 3c 2f 73 74 72 69 6e 67 3e 0a 3c 6b |.com.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>.5| 000003f0 38 37 3c 2f 69 6e 74 65 67 65 72 3e 0a 3c 6b 65 |87.OutgoingMailSe| 00000410 72 76 65 72 55 73 65 53 53 4c 3c 2f 6b 65 79 3e |rverUseSSL| 00000420 0a 3c 74 72 75 65 2f 3e 0a 3c 6b 65 79 3e 4f 75 |..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.<| 00000450 73 74 72 69 6e 67 3e 3c 2f 73 74 72 69 6e 67 3e |string>| 00000460 0a 3c 6b 65 79 3e 4f 75 74 67 6f 69 6e 67 50 61 |.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..| 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.domain.com | 000004d0 45 6d 61 69 6c 20 53 65 72 76 69 63 65 73 3c 2f |Email Services.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>.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.Payloa| 00000540 64 49 64 65 6e 74 69 66 69 65 72 3c 2f 6b 65 79 |dIdentifier.daveme| 00000560 68 6c 65 72 2e 63 6f 6d 2e 65 6d 61 69 6c 3c 2f |hler.com.email.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 |.O| 000005a0 72 67 61 3c 2f 73 74 72 69 6e 67 3e 0a 3c 6b 65 |rga.PayloadType.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.PayloadUUID.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>.Pa| 00000640 79 6c 6f 61 64 56 65 72 73 69 6f 6e 3c 2f 6b 65 |yloadVersion.1.Pre| 00000670 76 65 6e 74 41 70 70 53 68 65 65 74 3c 2f 6b 65 |ventAppSheet..| 00000690 50 72 65 76 65 6e 74 4d 6f 76 65 3c 2f 6b 65 79 |PreventMove..| 000006b0 53 4d 49 4d 45 45 6e 61 62 6c 65 64 3c 2f 6b 65 |SMIMEEnabled..disableMailRece| 000006e0 6e 74 73 53 79 6e 63 69 6e 67 3c 2f 6b 65 79 3e |ntsSyncing| 000006f0 0a 3c 66 61 6c 73 65 2f 3e 0a 3c 2f 64 69 63 74 |....| 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.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.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>.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.Payloa| 000007c0 64 49 64 65 6e 74 69 66 69 65 72 3c 2f 6b 65 79 |dIdentifier.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| 00000800 0a 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 4f 72 67 |.PayloadOrg| 00000810 61 6e 69 7a 61 74 69 6f 6e 3c 2f 6b 65 79 3e 0a |anization.| 00000820 3c 73 74 72 69 6e 67 3e 64 61 76 65 6d 65 68 6c |davemehl| 00000830 65 72 2e 63 6f 6d 3c 2f 73 74 72 69 6e 67 3e 0a |er.com.| 00000840 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 52 65 6d 6f |PayloadRemo| 00000850 76 61 6c 44 69 73 61 6c 6c 6f 77 65 64 3c 2f 6b |valDisallowed..PayloadType.Conf| 00000890 69 67 75 72 61 74 69 6f 6e 3c 2f 73 74 72 69 6e |iguration.PayloadU| 000008b0 55 49 44 3c 2f 6b 65 79 3e 0a 3c 73 74 72 69 6e |UID.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.| 000008f0 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 56 65 72 73 |PayloadVers| 00000900 69 6f 6e 3c 2f 6b 65 79 3e 0a 3c 69 6e 74 65 67 |ion.1.<| 00000920 2f 64 69 63 74 3e 0a 3c 2f 70 6c 69 73 74 3e 0a |/dict>..| 00000930 On 4/11/18, Christian Ro??ner 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 at 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 > > From dave.mehler at gmail.com Fri Apr 13 04:35:44 2018 From: dave.mehler at gmail.com (David Mehler) Date: Thu, 12 Apr 2018 22:35:44 -0400 Subject: automx hostname sending, and letsencrypt certificates Message-ID: Hello, I'm noticing two issues that might be a contributor to the reason autoconfig/autodiscover is not working for my domain. The first is I'm using a letsencrypt certificate, (connecting with outlook 2010), and I keep getting prompted if I want to accept the key. I say yes then later I am prompted again. First issue, I thought letsencrypt certificates were trusted and I should not get this message. I am using a SAN certificate. The order is something like: domain.com www.domain.com test.domain.com blog.domain.com mail.domain.com autoconfig.domain.com autodiscover.domain.com Do the certificates for autoconfig/autodiscover need to be their own certificates no SAN (Subject Alternative Name)? Second issue, in attempting to send an email tonight I noticed in the maillog of my server that the hostname is not an fqdn, that the client is sending. My email server is configured to reject non fqdn helo clients, can this be got around? I'm using Postfix 3.1. Thanks. Dave. From dave.mehler at gmail.com Sun Apr 15 02:26:27 2018 From: dave.mehler at gmail.com (David Mehler) Date: Sat, 14 Apr 2018 20:26:27 -0400 Subject: Automx on FreeBSD with virtual mail setup In-Reply-To: References: Message-ID: Hello Christian, Wondering if you got my last message? Thanks. Dave. On 4/11/18, David Mehler wrote: > 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) > > 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 > > Options None > AllowOverride None > Require all granted > > > # email autoconfig (For Mozilla clients) > Alias "/mail" "/usr/vhosts/domain.com/mail" > Alias "/.well-known/autoconfig/mail" "/usr/vhosts/domain.com/mail" > > Options None > AllowOverride None > Require all granted > > > > cat autodiscover.conf > # Example for autodiscover (Microsoft clients) > > 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" > > > RewriteEngine On > RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.* > RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301] > > > 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 > > > Options None > AllowOverride None > Require all granted > > > # email autodiscover (For Microsoft clients) > Alias "/autodiscover" "/usr/vhosts/domain.com/autodiscover" > > Options None > AllowOverride None > Require all granted > > > > # SSL example for autodiscover (Microsoft clients) > > 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 > > > Options None > AllowOverride None > Require all granted > > > 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" > > Options None > AllowOverride None > Require all granted > > > > cat autodiscover.xml > > xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006"> > xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a"> > > email > settings > > IMAP > imap.domain.com > 993 > off > > off > on > on > > > SMTP > smtp.domain.com > 587 > off > > off > TLS > on > off > off > > > > > > cat mobileconfig > > "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> > > > PayloadContent > > > EmailAccountDescription > domain.com E-Mail Service > EmailAccountName > > EmailAccountType > EmailTypeIMAP > EmailAddress > > IncomingMailServerAuthentication > EmailAuthPassword > IncomingMailServerHostName > imap.domain.com > IncomingMailServerPortNumber > 993 > IncomingMailServerUseSSL > > IncomingMailServerUsername > > IncomingPassword > > OutgoingMailServerAuthentication > EmailAuthPassword > OutgoingMailServerHostName > smtp.domain.com > OutgoingMailServerPortNumber > 587 > OutgoingMailServerUseSSL > > OutgoingMailServerUsername > > OutgoingPasswordSameAsIncomingPassword > > PayloadDescription > domain.com Email Services > PayloadDisplayName > domain.com E-Mail Service > PayloadIdentifier > domain.com.email > PayloadOrganization > Orga > PayloadType > com.apple.mail.managed > PayloadUUID > A5115AD5-3A86-4C4F-B964-576A757409AB > PayloadVersion > 1 > PreventAppSheet > > PreventMove > > SMIMEEnabled > > disableMailRecentsSyncing > > > > PayloadDescription > domain.com - E-Mail Account Configuration > PayloadDisplayName > E-Mail Account domain.com > PayloadIdentifier > E-Mail Account domain.com > PayloadOrganization > domain.com > PayloadRemovalDisallowed > > PayloadType > Configuration > PayloadUUID > E99CC7F7-6E38-4A1D-97DC-232143F67BC1 > PayloadVersion > 1 > > > > cat config-v1.1.xml > > > > domain.com > domain.com > domain.com > > imap.domain.com > 993 > SSL > password-cleartext > %EMAILLOCALPART% > > > smtp.domain.com > 587 > STARTTLS > password-cleartext > %EMAILLOCALPART% > > > e-mail settings > > > > > 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 at 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 > > > > domain.com > domain.com > domain.com > > imap.domain.com > 993 > SSL > password-cleartext > %EMAILLOCALPART% > > > smtp.domain.com > 587 > STARTTLS > password-cleartext > %EMAILLOCALPART% > > > e-mail settings > > > > > > 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 > > xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006"> > xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a"> > > email > settings > > IMAP > imap.domain.com > 993 > off > > off > on > on > > > SMTP > smtp.domain.com > 587 > off > > off > TLS > on > off > off > > > > > > > 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 > > xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006"> > xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a"> > > email > settings > > IMAP > imap.domain.com > 993 > off > > off > on > on > > > SMTP > smtp.domain.com > 587 > off > > off > TLS > on > off > off > > > > > > > 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 | 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"?>. 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">. 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">..| > 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>.. 000000d0 63 74 3e 0a 3c 6b 65 79 3e 45 6d 61 69 6c 41 63 > |ct>.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 > |.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 00000120 72 69 6e 67 3e 0a 3c 6b 65 79 3e 45 6d 61 69 6c > |ring>.Email| > 00000130 41 63 63 6f 75 6e 74 4e 61 6d 65 3c 2f 6b 65 79 > |AccountName 00000140 3e 0a 3c 73 74 72 69 6e 67 3e 3c 2f 73 74 72 69 > |>. 00000150 6e 67 3e 0a 3c 6b 65 79 3e 45 6d 61 69 6c 41 63 > |ng>.EmailAc| > 00000160 63 6f 75 6e 74 54 79 70 65 3c 2f 6b 65 79 3e 0a > |countType.| > 00000170 3c 73 74 72 69 6e 67 3e 45 6d 61 69 6c 54 79 70 > |EmailTyp| > 00000180 65 49 4d 41 50 3c 2f 73 74 72 69 6e 67 3e 0a 3c > |eIMAP.<| > 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 > |.<| > 000001b0 2f 73 74 72 69 6e 67 3e 0a 3c 6b 65 79 3e 49 6e > |/string>.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>.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>.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. 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 00000250 67 3e 0a 3c 6b 65 79 3e 49 6e 63 6f 6d 69 6e 67 > |g>.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. 00000280 67 65 72 3e 39 39 33 3c 2f 69 6e 74 65 67 65 72 > |ger>993 00000290 3e 0a 3c 6b 65 79 3e 49 6e 63 6f 6d 69 6e 67 4d > |>.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>.. 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 000002e0 65 79 3e 0a 3c 73 74 72 69 6e 67 3e 3c 2f 73 74 > |ey>. 000002f0 72 69 6e 67 3e 0a 3c 6b 65 79 3e 49 6e 63 6f 6d > |ring>.Incom| > 00000300 69 6e 67 50 61 73 73 77 6f 72 64 3c 2f 6b 65 79 > |ingPassword 00000310 3e 0a 3c 73 74 72 69 6e 67 3e 3c 2f 73 74 72 69 > |>. 00000320 6e 67 3e 0a 3c 6b 65 79 3e 4f 75 74 67 6f 69 6e > |ng>.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.| > 00000350 3c 73 74 72 69 6e 67 3e 45 6d 61 69 6c 41 75 74 > |EmailAut| > 00000360 68 50 61 73 73 77 6f 72 64 3c 2f 73 74 72 69 6e > |hPassword 00000370 67 3e 0a 3c 6b 65 79 3e 4f 75 74 67 6f 69 6e 67 > |g>.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. 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. 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>.5| > 000003f0 38 37 3c 2f 69 6e 74 65 67 65 72 3e 0a 3c 6b 65 > |87. 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| > 00000420 0a 3c 74 72 75 65 2f 3e 0a 3c 6b 65 79 3e 4f 75 > |..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.<| > 00000450 73 74 72 69 6e 67 3e 3c 2f 73 74 72 69 6e 67 3e > |string>| > 00000460 0a 3c 6b 65 79 3e 4f 75 74 67 6f 69 6e 67 50 61 > |.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 00000490 79 3e 0a 3c 74 72 75 65 2f 3e 0a 3c 6b 65 79 3e > |y>..| > 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. 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>.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>.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 00000530 69 6e 67 3e 0a 3c 6b 65 79 3e 50 61 79 6c 6f 61 > |ing>.Payloa| > 00000540 64 49 64 65 6e 74 69 66 69 65 72 3c 2f 6b 65 79 > |dIdentifier 00000550 3e 0a 3c 73 74 72 69 6e 67 3e 64 61 76 65 6d 65 > |>.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>.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 > |.O| > 000005a0 72 67 61 3c 2f 73 74 72 69 6e 67 3e 0a 3c 6b 65 > |rga. 000005b0 79 3e 50 61 79 6c 6f 61 64 54 79 70 65 3c 2f 6b > |y>PayloadType 000005c0 65 79 3e 0a 3c 73 74 72 69 6e 67 3e 63 6f 6d 2e > |ey>.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. 000005f0 3e 50 61 79 6c 6f 61 64 55 55 49 44 3c 2f 6b 65 > |>PayloadUUID 00000600 79 3e 0a 3c 73 74 72 69 6e 67 3e 41 35 31 31 35 > |y>.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>.Pa| > 00000640 79 6c 6f 61 64 56 65 72 73 69 6f 6e 3c 2f 6b 65 > |yloadVersion 00000650 79 3e 0a 3c 69 6e 74 65 67 65 72 3e 31 3c 2f 69 > |y>.1 00000660 6e 74 65 67 65 72 3e 0a 3c 6b 65 79 3e 50 72 65 > |nteger>.Pre| > 00000670 76 65 6e 74 41 70 70 53 68 65 65 74 3c 2f 6b 65 > |ventAppSheet 00000680 79 3e 0a 3c 74 72 75 65 2f 3e 0a 3c 6b 65 79 3e > |y>..| > 00000690 50 72 65 76 65 6e 74 4d 6f 76 65 3c 2f 6b 65 79 > |PreventMove 000006a0 3e 0a 3c 66 61 6c 73 65 2f 3e 0a 3c 6b 65 79 3e > |>..| > 000006b0 53 4d 49 4d 45 45 6e 61 62 6c 65 64 3c 2f 6b 65 > |SMIMEEnabled 000006c0 79 3e 0a 3c 66 61 6c 73 65 2f 3e 0a 3c 6b 65 79 > |y>.. 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| > 000006f0 0a 3c 66 61 6c 73 65 2f 3e 0a 3c 2f 64 69 63 74 > |.. 00000700 3e 0a 3c 2f 61 72 72 61 79 3e 0a 3c 6b 65 79 3e > |>..| > 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. 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>.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>.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 000007b0 69 6e 67 3e 0a 3c 6b 65 79 3e 50 61 79 6c 6f 61 > |ing>.Payloa| > 000007c0 64 49 64 65 6e 74 69 66 69 65 72 3c 2f 6b 65 79 > |dIdentifier 000007d0 3e 0a 3c 73 74 72 69 6e 67 3e 45 2d 4d 61 69 6c > |>.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| > 00000800 0a 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 4f 72 67 > |.PayloadOrg| > 00000810 61 6e 69 7a 61 74 69 6f 6e 3c 2f 6b 65 79 3e 0a > |anization.| > 00000820 3c 73 74 72 69 6e 67 3e 64 61 76 65 6d 65 68 6c > |davemehl| > 00000830 65 72 2e 63 6f 6d 3c 2f 73 74 72 69 6e 67 3e 0a > |er.com.| > 00000840 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 52 65 6d 6f > |PayloadRemo| > 00000850 76 61 6c 44 69 73 61 6c 6c 6f 77 65 64 3c 2f 6b > |valDisallowed 00000860 65 79 3e 0a 3c 66 61 6c 73 65 2f 3e 0a 3c 6b 65 > |ey>.. 00000870 79 3e 50 61 79 6c 6f 61 64 54 79 70 65 3c 2f 6b > |y>PayloadType 00000880 65 79 3e 0a 3c 73 74 72 69 6e 67 3e 43 6f 6e 66 > |ey>.Conf| > 00000890 69 67 75 72 61 74 69 6f 6e 3c 2f 73 74 72 69 6e > |iguration 000008a0 67 3e 0a 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 55 > |g>.PayloadU| > 000008b0 55 49 44 3c 2f 6b 65 79 3e 0a 3c 73 74 72 69 6e > |UID. 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.| > 000008f0 3c 6b 65 79 3e 50 61 79 6c 6f 61 64 56 65 72 73 > |PayloadVers| > 00000900 69 6f 6e 3c 2f 6b 65 79 3e 0a 3c 69 6e 74 65 67 > |ion. 00000910 65 72 3e 31 3c 2f 69 6e 74 65 67 65 72 3e 0a 3c > |er>1.<| > 00000920 2f 64 69 63 74 3e 0a 3c 2f 70 6c 69 73 74 3e 0a > |/dict>..| > 00000930 > > > On 4/11/18, Christian Ro??ner 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 at 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 >> >> >