Edit this page | Blame


We have been using postfix and exim on different servers. Now it may be the time to switch to opensmtpd as it is modern, secure and easier to configure. Guix comes with a default opensmtp service, so let's try and get that running as a system container for reasons of deployment. See also

Setting up a mail service with Guix is described in

A service is defined as

(service opensmtpd-service-type
           (config-file (local-file "./my-smtpd.conf"))))

A first attempt at running a container is

(use-modules (gnu)
             (gnu services mail))

  (host-name "mail")
  (timezone "UTC")
  (locale "en_US.utf8")
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (targets (list "/dev/sdX"))))
  (file-systems %base-file-systems)
  (users %base-user-accounts)
  (packages %base-packages)

  (services (cons
             (service opensmtpd-service-type
                       (config-file %default-opensmtpd-config-file
                       ; (config-file (local-file "./my-smtpd.conf")))


guix system container opensmtpd.scm

creates a container file that can be started with the returned launcher, e.g. as root

(made with skribilo)