<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On 8 Sep 2019, at 18:10, Steven Smith <<a href="mailto:steve.t.smith@gmail.com" class="">steve.t.smith@gmail.com</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div dir="ltr" class=""><span class=""></span></div><div dir="ltr" class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="ltr" class=""></div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><blockquote type="cite" class=""><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Also, I would like to influence the host, domain, and old for the auto-configuration. Is there a way to do that? I would like to run the mail-server configuration stage again with the correct names</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote></div><br class=""><div class="">Answering myself: in Server.app: set 'Computer Name’ to th eFQDN (just as Host Name, so something like host.domain.tld and not just ‘Host’). /bin/hostname reports the 'Computer Name' field, not the ‘Host Name’ field.</div></div></blockquote><br class=""><div class="">This out-of-scope for MacPorts, but here’s a few comments about what it sounds like you’re trying to do.</div><div class=""><br class=""></div><div class="">Migration from old macOS Server.</div><div class=""><br class=""></div><div class="">I’ve done this myself, trying to follow <a href="https://developer.apple.com/support/macos-server/macOS-Server-Service-Migration-Guide.pdf" class="">https://developer.apple.com/support/macos-server/macOS-Server-Service-Migration-Guide.pdf</a>. This Apple migration guide is helpful, but deficient in several key aspects, e.g. DNS, VPN, Calendar and Contacts, and Mail.  FWIW, here are my own notes on migration:</div><div class="">• <a href="https://github.com/essandess/macOS-Open-Source-Server" class="">https://github.com/essandess/macOS-Open-Source-Server</a></div><div class="">• <a href="https://github.com/essandess/macOS-Open-Source-Server/blob/master/macOS Server Migration Notes.md" class="">https://github.com/essandess/macOS-Open-Source-Server/blob/master/macOS%20Server%20Migration%20Notes.md</a></div></div></div></div></blockquote><div><br class=""></div><div>Yes, I found most of these over the months.</div><br class=""><blockquote type="cite" class=""><div dir="auto" class=""><div dir="ltr" class=""><div class="">Also, I could be wrong, but it sounds like your trying to migrate your services on the same server as your old, running Server.app version 5.7.</div></div></div></blockquote><div><br class=""></div><div>No. I have a brand new Mac mini late 2018 that is being setup up form a greenfield state. The old server is currently still running and I am building the new one until a cutover point when I will move mail to the new server (without the users noticing it, if I’m lucky). But much has to be done. The whole server and the remote  backup for instance.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div dir="ltr" class=""><div class="">This would be a Very Bad Idea. Rather, buy a new box,configure it as a sandbox,</div></div></div></div></blockquote><div><br class=""></div><div>What do you mean with 'configure it as a sandbox’? You mean, setit up independently? Yes, that is what I am doing.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div dir="ltr" class=""><div class="">harden everything, migrate user data, then deploy. </div></div></div></div></blockquote><div><br class=""></div>Exactly, that is the plan.</div><div><br class=""></div><div>For the local macOS accounts I’m still running them as ‘Mobile Accounts’ with PHD-like synchronisation set up using ChronoSync. Not ideal, but it works. <br class=""><br class=""><blockquote type="cite" class=""><div dir="auto" class=""><div dir="ltr" class=""><div class="">Running a Mail Server.</div><div class=""><br class=""></div><div class="">There is no more Server.app Mail server. If you decide to run one yourself, it means knowing what every line in the postfix and dovecot and rspamd configuration does, and knowing and checking the user and group permissions of all files and directories used for the mail server. You can’t assume that the MacPorts mail-server example—or any other—configuration is appropriate for your own network or users. You have to check it line-by-line and test it before you adopt and deploy it. If you’re not willing to embrace these steps, you should purchase a commercial mail server, or use a cloud service email provider, for which there are many options. Aside from the basic rtfm’s on the MTAs and MDAs, here’s a few helpful background links on configuring a BSD/Linux mail server:</div><div class=""><br class=""></div><div class="">• <a href="https://www.c0ffee.net/blog/mail-server-guide/" class="">https://www.c0ffee.net/blog/mail-server-guide/</a></div><div class="">• <a href="https://arstechnica.com/information-technology/2014/02/how-to-run-your-own-e-mail-server-with-your-own-domain-part-1/" class="">https://arstechnica.com/information-technology/2014/02/how-to-run-your-own-e-mail-server-with-your-own-domain-part-1/</a></div><div class=""><br class=""></div><div class="">Whether or not you decide to run your own mail server, transitioning from the old Server.app version 5.7 that’s running a full suite of services means configuring a new box from bare metal up. You’ll need to do this step-by-step. One thing that’s still useful useful with the latest Server.app is TLS certificate management, whose cents can be dropped straight into the postfix and dovecot configuration used in the mail-server port.</div></div></div></blockquote><div><br class=""></div><div>Yes, that is the plan. I’ve set up smooth use of Letsencrypt certificates which are not just automatically updated, but also fully removes the no longer used cert from Keychain and Server. I’m using these for Mail and <a href="http://www.rna.nl" class="">www.rna.nl</a> and they are renewed smoothly without filling up my system with outdated ones  (sadly, there is a little issue left, that is that it isn’t able yet to detect that when there still is a <i class="">different</i> certificate for the same FQDN (intermediate, to be exact, used for Messages and Open Directory, I still haven’t been able to figure out how to use the Letsencrypt certs for that, but maybe because of my Computer Name / Host Name mismatch). Script is here on GitLab:</div><div><br class=""></div><div><a href="https://gitlab.com/gctwnl/macos-server-certbot-deployhook" class="">Gerben Wierda
/

macOS-Server-certbot-deployhook</a></div><div><br class=""></div><div>(Other thing there is a way to manage Virtualbox VMs for docker containers. Something I can get back to when I finally have migrated)</div><br class=""><blockquote type="cite" class=""><div dir="auto" class=""><div dir="ltr" class=""><div class="">Getting back to your specific MacPorts question above, yes, if you change your network settings the Portfile activation stage will detect this and change default settings appropriately. However, as mentioned, it’s on you to make sure the settings in this example configuration are the ones you actually want for your own network and mail server, and edit the actual configuration appropriately.</div><div class=""><br class=""></div><div class="">I’ve had my own mail server transition from Server.app for about six months now, and it’s much nicer than the old one, and, I believe, more secure: postfix run in chroot, up-to-date MTA and MDA services, a blazingly fast anti-spam capability with much-improved spam/ham training workflow, and DKIM configured on the box. After I got it configured and running, I haven’t had to touch it through multiple MacPorts upgrades of postfix and dovecot.</div></div></div></blockquote><div><br class=""></div></div><div>Nice. I wish I was there already. </div><div><br class=""></div><div>I was wondering, btw, how the situation was regarding push notifications to iOS devices.</div><div><br class=""></div><div>I have decided to go to a more modern DNS setup (nsd/unbound) which works fine, but that means your mail-server startup, which loads dns-server (as this uses bind9) cannot be directly used. I wish you had not put DNS in the mail-server, it’s really not part of it (apple-server maybe, but not mail-server).</div><div><br class=""></div><div>My local network already uses the new DNS setup. I have to tweak the Macports still, as the mix of chroot and logging is not yet optimal. For logging to work, the logging needs to be written inside the chroot. But that means a mix in the directory tree of settings (etc) and logging, or moving up in th etree and have a less separated chroot jail.</div><br class=""><div class="">So, what is your setting for Host Name and Computer name in Server.app? Both FQDN?<br class=""></div><div class=""><br class=""></div><div class="">G</div></body></html>