diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..108682f5b5b6115c764b9ff5126ac8182f117c67 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# postfix-nullclient-formula + +This is a simple collection of states that replace default exim4 with a postfix installation that acts as a nullclient. +Throw it onto your machine and it will submit mails easily. + +Two things are configurable using pillar: + +* relayhost (which server to use for submitting emails) +* rootmail-destination (which address to forward mail for local users to) + +# pillar example + +``` +postfix: + nullclient: + relayhost: 'smtp.hs-hannover.de' + rootmail-destination: 'web-rootmails@hs-hannover.de' +``` diff --git a/pillar.example b/pillar.example new file mode 100644 index 0000000000000000000000000000000000000000..ff6628dcd973abd902af548111dbd9d1f6a0cf1a --- /dev/null +++ b/pillar.example @@ -0,0 +1,4 @@ +postfix: + nullclient: + relayhost: 'smtp.example.com' + rootmail-destination: 'rootmails@example.com' diff --git a/postfix/nullclient/etc/postfix/main.cf b/postfix/nullclient/etc/postfix/main.cf index b6e51daa71a32db233743a7f8766c4c70bb74a60..041d5084ba3f4c902e5a0326646f4fb25b870e75 100644 --- a/postfix/nullclient/etc/postfix/main.cf +++ b/postfix/nullclient/etc/postfix/main.cf @@ -1,9 +1,11 @@ +### THIS FILE IS MANAGED BY SALT STATE `postfix.nullclient` +### YOUR CHANGES WILL BE OVERWRITTEN! {% set minion_id = grains['id'] %} # Set compatibility level compatibility_level = 2 myorigin = /etc/mailname -smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) +smtpd_banner = $myhostname ESMTP $mail_name biff = no # appending .domain is the MUA's job. @@ -26,7 +28,7 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = {{ minion_id }} -# Forward everything to the OTRS queue +# Forward emails for local users to this address for easy collection alias_maps = static:web-rootmails@hs-hannover.de alias_database = local_recipient_maps = unix:passwd.byname