diff options
Diffstat (limited to 'src/org/euandre')
-rw-r--r-- | src/org/euandre/queue.scm | 83 |
1 files changed, 60 insertions, 23 deletions
diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm index 3fe4db2..2485b97 100644 --- a/src/org/euandre/queue.scm +++ b/src/org/euandre/queue.scm @@ -120,7 +120,8 @@ postfix-etc-files postfix-setuid-programs postfix-shepherd-service - postfix-service-type + local-postfix-service-type + internet-postfix-service-type dovecot2-service-type @@ -1012,6 +1013,7 @@ milter_default_action = accept (group setgid-group))) '())))) +;; FIXME: parameterize /var/mail (define (postfix-activation config) (match-record config <postfix-configuration> (queue-directory) @@ -1144,32 +1146,67 @@ max_age: 604800 (cyrus-service-configuration (name "smtpd.conf")))) +(define local-postfix-service-extensions + (list + (service-extension etc-service-type + postfix-etc-files) + (service-extension account-service-type + postfix-accounts) + (service-extension setuid-program-service-type + postfix-setuid-programs) + (service-extension activation-service-type + postfix-activation) + (service-extension profile-service-type + (compose list postfix-configuration-postfix)) + (service-extension shepherd-root-service-type + postfix-shepherd-service))) + +(define local-postfix-service-type + (service-type + (name 'postfix) + (extensions local-postfix-service-extensions) + (default-value (postfix-configuration)) + (description + " + Run the Postfix MTA. + + This is the top-level system service for Postfix. + + It includes: + - populating /etc/postfix/ with read-only configuration files; + - the user and groups used by Postfix when handling email delivery; + - the special setgid binaries for daily usage, such as \"sendmail\"; + - the Shepherd service for starting, stopping and *reloading* the + service without restarting it; + - the activation script for creating the required directories and + configuring them with the correct permissions; + - the binaries in the system profile so that one doesn't need to explicilty + include the package when the service is already enabled. + + An extension to the log-rotation service isn't included: the default + rottlog configuration already includes /var/log/maillog in its routine, + so it is kept out. + + The defaults of <postfix-configuration> provide sane default values for + most things, such as group names, data and queue directories, etc. When + used as-is, it creates a Postfix server that sends email from local users + of the domain provided by \"/etc/hostname\"."))) -(define postfix-service-type +(define internet-postfix-service-type (service-type (name 'postfix) (extensions - (list - (service-extension etc-service-type - postfix-etc-files) - (service-extension account-service-type - postfix-accounts) - (service-extension setuid-program-service-type - postfix-setuid-programs) - (service-extension activation-service-type - postfix-activation) - (service-extension mail-aliases-service-type - postfix-aliases) - (service-extension profile-service-type - (compose list postfix-configuration-postfix)) - (service-extension shepherd-root-service-type - postfix-shepherd-service) - (service-extension nginx-service-type - postfix-nginx-locations) - (service-extension certbot-service-type - postfix-certificates) - (service-extension cyrus-sasl-service-type - postfix-sasl-services))) + (append + local-postfix-service-extensions + (list + (service-extension mail-aliases-service-type + postfix-aliases) + (service-extension nginx-service-type + postfix-nginx-locations) + (service-extension certbot-service-type + postfix-certificates) + (service-extension cyrus-sasl-service-type + postfix-sasl-services)))) (default-value (postfix-configuration)) (description " |