layout: true name: titleslide class: center, middle
.footnote[ ###
@schmonz
####
#nycbug
[schmonz.com/talk
/2019-nyc-march](https://schmonz.com/talk/2019-nyc-march/) ] --- layout: true name: footnotelinks .left-column[
] .footnote[ ###
@schmonz
####
#nycbug
[schmonz.com/talk
/2019-nyc-march](https://schmonz.com/talk/2019-nyc-march/) ] --- template: titleslide # Maintaining qmail in 2019
## Amitai Schleier --- layout: false template: footnotelinks .right-column[ # Goals For This Session ## 1. Wanna try it? ## 2. Why do I do this? ## 3. What's new since 1998? ## 4.
But seriously
Okay, what's next? ] --- .right-column[ # 0. Code of Conduct ## Is there one for this meetup? ## Remind ourselves how we want to behave ## Like infra-as-code or TDD, declaring our intentions helps us live up to them ] --- .right-column[ # 1. Wanna try it? ```txt $ git clone https://github.com/NetBSD/pkgsrc.git $ cd pkgsrc/bootstrap $ sudo ./bootstrap --prefix=/opt/pkg $ PATH=/opt/pkg/sbin:/opt/pkg/bin:$PATH $ cd ../mail/qmail-run $ make install ``` #### Tested
recently
- CentOS, Debian, Devuan, FreeBSD, NetBSD, OpenBSD, OS X, Tribblix ] --- .right-column[ # 2. Why do I do this? ### - My first job _vs._ my job today ### - Ease and elegance _vs._ annoying sharp edges ### - Lack of upstream _vs._ evolving needs (_vs._ laziness) ### - Further investment _vs._ [Postfix](http://www.postfix.org) ### - [Legacy code](https://www.legacycode.rocks) (and avoiding it) is now a [professional specialty](https://latentagility.com) ] --- .right-column[ # 3. What's new since 1998? ### - Authentication ### - Encryption ### - Spam #### What's not? ### - `qmail-1.03.tar.gz` ] --- .right-column[ # My Fate Is Sealed: July 2004 ### - [Big, careful commit to pkgsrc/mail/qmail](http://mail-index.netbsd.org/pkgsrc-changes/2004/07/21/0034.html) ### - `/var/qmail` works like qmail old-timers expect ### - `${PREFIX}` works like pkgsrc users expect ### - Pretty nice rc.d scripts ### - "Life with qmail" and packages: harmonious??! ] --- .right-column[ # pkgsrc ca. 2007 ### - Patches for AUTH and [TLS](http://inoa.net/qmail-tls/) freshly updated ### - Patches for SMTP recipient-checking, but mutually exclusive ([badrcptto](http://patch.be/qmail/), [realrcptto](http://code.dogmap.org/qmail/#realrcptto), [qregex](http://www.arda.homeunix.net/downloads-qmail/)) ### - Binary package useful only on build host ### - Constraints: `djb-nonlicense` and [DJB's rules for distributors](http://cr.yp.to/qmail/dist.html) ### - 1.03nb13 ] --- .right-column[ # Bombshell: December 2007 ### - `public-domain`!!!1 ### - Covered: [daemontools](https://cr.yp.to/daemontools.html), [ucspi-tcp](https://cr.yp.to/ucspi-tcp.html), [qmail](http://cr.yp.to/qmail.html) ### - Not covered yet: [checkpassword](http://cr.yp.to/checkpwd.html) ### - Constraints: my academic courseload and job ] --- .right-column[ # Interregnum: 2008-2014 ### - December 2008: Mac mini's drive crashed during final exams, no money or attention to spare ### - `@schmonz.com` forwarding to Gmail ### - October 2014: Up and running, this time on a VPS ] --- .right-column[ # Oops: June 2011 ### - Commit what I claim to be "DESTDIR support" ] --- .right-column[ # Oops: April 2016 ### - `USE_DESTDIR` rapture: all packages are binary ### - Cool, no problem, I totally already took care of that ] --- .right-column[ # Cool: March 2017 ### - Port forward a pre-1998 `getpwnam()` patch ### - Commit under `mail/qmail/patches/` ### - Not trying to be a patch publisher ] --- .right-column[ # Not Cool: also March 2017 ### - `DESTDIR` binary packages had never init'd the queue ### - Hadn't noticed (my VPS had once built source packages) ### - Quick: add dependency on `mail/queue-fix` ] --- .right-column[ # Better: also also March 2017 ### - `user-destdir`: defer users/groups till `pkg_add` ### - No hardcoded or pre-allocated numeric IDs ### - Working binary packages! ### - (Enable more options by default) ### - (Add option for [Sender Rewriting Scheme](http://www.mco2.com.br/opensource/qmail/srs/)) ] --- .right-column[ # Pretty Sweet: April 2017 ### - Configurable user/group _names_ in `mk.conf` ### - Binary packages in 2017Q1 pkgsrc release! ### - (checkpassword still `djb-nonlicense`) ### - 1.03nb24 ] --- .right-column[ # Inevitable: May 2017 ### - Publish my first patch:
QMAILREMOTE
### - (And a package option for it) ] --- .right-column[ # Slippery Slope: July 2017 ### - Publish
destdir
(removing lots of packaging cruft) ### - Publish
rejectutils
(multiple recipient checks) ### - (Always-on a bunch of options) ### - (Enable new options, including `SMTPUTF8`) ### - (Annotate packages with applied `QMAILPATCHES`) ] --- .right-column[ # Futile Attempt: August 2017 ### - Some remotes wouldn't accept our `SMTPUTF8` mail ### - Analyze, fix in pkgsrc with `sed` at patch time (?!?!) ### - Publish
qbiff-utmpx
(fixing FreeBSD build) ### - (Enable more new options) ] --- .right-column[ # Captain Obvious: May 2018 ### - Extract `mail/qmail-rejectutils` ### - 1.03nb33 ] --- .right-column[ # DJB Responds: July 2018 ### - Add dependency on public-domain checkpassword ### - Add `inet6` and `pam` options ### - 1.03nb36 ] --- .right-column[ # TLS Nope: September 2018 ### - Couldn't yet update to latest TLS patch ### - Could at least bump key sizes to match ### - This did not fix busted Gmail interop ] --- .right-column[ # acceptutils! October 2018 ### - My redesigned SMTP AUTH implementation ### - Avoid patch conflicts ### - Extend qmail's existing design to post-1998 use cases ### - Add new user-controlled features ] --- .right-column[ # acceptutils! October 2018 ### - `reup` runs a program repeatedly until it succeeds ### - `authup` offers SMTP AUTH ### - `checknotroot` refuses to run as UID 0 ### - `fixsmtpio` filters I/O and exit status ] --- .right-column[ # acceptutils! October 2018 ### - `AUTH` without patching existing code ### - `checkpassword` without `chmod +s` ### - Arguably better security properties ### - New features in old programs ### - Let's look at
the pictures
] --- .right-column[ # TLS: October 2018 ### - Update trivially to latest TLS patch ### - Interop with Gmail! ### - Opportunistic encryption on my mail server ### - Add `STARTTLS` to `authup` (message submission) ### - No more `stunnel`, only `sslserver` ] --- .right-column[ # TLS: November 2018 ### - Add `STARTTLS` to `fixsmtpio` (incoming SMTP) ### - (RFC says session state must be cleared) ### - (Easy: stop `qmail-smtpd` kid, start fresh one) ### - Publish
TLS-onlyremote
### - Add `qmail-qfilter-addtlsheader` ] --- .right-column[ # Handling Transitions: November 2018 ### - Migrate RCPTCHECK to qmail-spp plugin system ### - Add SPP plugin for greylisting, commented out ### - Deinstall completely cleanly ] --- .right-column[ # Portability: December 2018 ### - Updated
destdir
(fixing OpenBSD build) ### - Add SPP plugin for SPF policy checking ### - Fix rc.d scripts on FreeBSD ### - Enable IPv6 for incoming connections ### - rc.d-boot: integrate `rc.conf` into various OS boot sequences ] --- .right-column[ # pkgsrc 2018Q4: January 2019 I've shipped
quite a few improvements
for qmail users in our 2018Q4 release. In three sentences: 1.
qmail-run
gains TLS, SPF, IPv6, SMTP recipient checks, and many other sensible defaults. 2. Most qmail-related packages -- including the new ones used by qmail-run -- are available on most pkgsrc platforms. 3. [rc.d-boot](http://pkgsrc.se/pkgtools/rc.d-boot) starts `rc.conf`-enabled pkgsrc services at boot time on many platforms. In one: > It's probably easy for you to run qmail now. ] --- .right-column[ # qmail, pkgsrc, Today ### - Many sensible defaults, ### - Including starting at boot time, ### - On most pkgsrc platforms ### Probably easy for you to run qmail now! ] --- .right-column[ # How We Got Here ### - Notice what's annoying ### - If it's easy to fix, automate it ### - Else figure out how to make it easy #### And ### - Invest in simplicity ### - Spend dividends on new features ] --- .right-column[ # Coming in 2019Q1 ### - Add `meta-pkgs/qmail-server` ### - Handle leap seconds for TAI system clocks ### - Configure TLS cipher list in `rc.conf` ] --- .right-column[ # 4. Okay, what's next? ### - blacklistd(8) support ([Christos' NYCBUG talk](https://www.nycbug.org/index?action=view&id=10358)) ### - Refactor qmail-remote: `remoteip` and `remoteio` ### - IPv6 and OpenSSL-1.1 compatible TLS for outbound ### -
qmail-rfilter
for filtering outbound ### - rfilters for SRS and DKIM ### - DMARC ] --- .right-column[ # 4. Okay, what's next? ### - SMF support (Solaris-derived service management) ### - More rc.d-boot platforms ### - Automate switching from system MTA to pkgsrc qmail ### - Migrate `realrcptto` to `qmail-verify` ### - Add ext-todo, big-todo, big-concurrency patches ### - Test with vmailmgr, vpopmail ] --- .right-column[ # More Info -
DevOpsDays NYC: Run Your @wn Email Server!
-
2018Q4 qmail updates in pkgsrc
-
Packaging Complex Software (2005)
(schmonz.com) -
Packaging djbware (2007)
(schmonz.com) -
Automation for mail hosting
(schmonz.com) -
QMAILREMOTE
(schmonz.com) -
destdir
(schmonz.com) -
rejectutils
(schmonz.com) -
qbiff-utmpx
(schmonz.com) -
acceptutils
(schmonz.com) -
qmail-rfilter
(schmonz.com) -
qmail
(schmonz.com) - [s/qmail](https://www.fehcom.de/sqmail/) (fehcom.de) ] --- .right-column[ # Agile in 3 Minutes ##
agilein3minut.es
> "Before Agile in 3 Minutes, I couldn't get my team to have a > conversation about important topics. Now I have to timebox it."
-
5: Wrong
-
29: Refactor
] --- .right-column[ # Agile in 3 Minutes: The Book ## [leanpub.com/agilein3minutes
/c/nycbug19](https://leanpub.com/agilein3minutes/c/nycbug19) The simplest _essays_ that could possibly work. Lowest allowable price on Leanpub, today! ] --- template: titleslide # Maintaining qmail in 2019
## [Amitai Schleier](https://latentagility.com)