+
+# emacs dependency.
+# dunno why debian installed postfix with yum-builddep emacs
+# but I will just explicitly install it here since
+# I use it for sending mail in emacs.
+if private-host; then
+ relayhost="[mail.messagingengine.com]:587"
+else
+ # ses initially suggests port 25, but I had problems connecting to that.
+ relayhost="[email-smtp.us-west-2.amazonaws.com]:587"
+fi
+if isdeb; then
+ s debconf-set-selections<<EOF
+postfix postfix/main_mailer_type select Satellite system
+postfix postfix/mailname string $host
+postfix postfix/relayhost string $relayhost
+EOF
+
+ pi postfix
+else
+ pi postfix
+ # Settings from reading the output when installing on debian,
+ # then seeing which were different in a default install on arch.
+ # I assume the same works for fedora.
+ postconfin <<EOF
+mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+mailbox_size_limit = 0
+relayhost = $relayhost
+inet_interfaces = loopback-only
+EOF
+
+ s systemctl enable postfix
+ s systemctl start postfix
+fi
+
+