base_installation::system_users: [] # Fetched via ldap
profile::xmr_stak::mining_pool: "" # Fetched via ldap
profile::xmr_stak::wallet: "" # Fetched via ldap
+profile::mail::mailhub: "" # Fetched via ldap
letsencrypt::email: ~ # Fetched via ldap
letsencrypt::try_for_real_hostname: true
--- /dev/null
+class profile::mail (
+ String $mailhub,
+ Optional[Integer] $mailhub_port = 25,
+) {
+ ensure_packages(["s-nail", "ssmtp"])
+
+ $hostname = lookup("base_installation::real_hostname")
+
+ file { "/etc/ssmtp/ssmtp.conf":
+ ensure => "present",
+ content => template("profile/mail/ssmtp.conf.erb"),
+ }
+}
+
--- /dev/null
+#
+# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
+#
+# The person who gets all mail for userids < 1000
+# Make this empty to disable rewriting.
+root=postmaster
+# The place where the mail goes. The actual machine name is required
+# no MX records are consulted. Commonly mailhosts are named mail.domain.com
+# The example will fit if you are in domain.com and you mailhub is so named.
+mailhub=<%= @mailhub %>:<%= @mailhub_port %>
+# Where will the mail seem to come from?
+#rewriteDomain=y
+# The full hostname
+hostname=<%= @hostname %>