propellor spin

This commit is contained in:
Joey Hess 2014-07-18 00:36:21 -04:00
parent 5590c1c75a
commit fddcf13973
Failed to extract signature
1 changed files with 25 additions and 0 deletions

View File

@ -389,6 +389,7 @@ kiteMailServer = propertyList "kitenet.net mail server"
[ Postfix.installed [ Postfix.installed
, Apt.installed ["postfix-pcre"] , Apt.installed ["postfix-pcre"]
, Apt.serviceInstalledRunning "postgrey" , Apt.serviceInstalledRunning "postgrey"
, Apt.serviceInstalledRunning "spamassassin" , Apt.serviceInstalledRunning "spamassassin"
, "/etc/default/spamassassin" `File.containsLines` , "/etc/default/spamassassin" `File.containsLines`
[ "ENABLED=1" [ "ENABLED=1"
@ -397,13 +398,35 @@ kiteMailServer = propertyList "kitenet.net mail server"
, "NICE=\"--nicelevel 15\"" , "NICE=\"--nicelevel 15\""
] `onChange` Service.restarted "spamassassin" ] `onChange` Service.restarted "spamassassin"
`describe` "spamd enabled" `describe` "spamd enabled"
, Apt.serviceInstalledRunning "spamass-milter" , Apt.serviceInstalledRunning "spamass-milter"
-- Add -m to prevent modifying messages Subject or body.
, "/etc/default/spamass-milter" `File.containsLine`
"OPTIONS=\"-m -u spamass-milter -i 127.0.0.1\""
`onChange` Service.restarted "spamass-milter"
`describe` "spamass-milter configured"
, Apt.installed ["maildrop"] , Apt.installed ["maildrop"]
, "/etc/maildroprc" `File.hasContent`
[ "# Global maildrop filter file (deployed with propellor"
, "DEFAULT=\"$HOME/Maildir\""
, "MAILBOX=\"$DEFAULT/.\""
, "# Filter spam to a spam folder, unless .keepspam exists"
, "if (/^X-Spam-Status: Yes/)"
, "{"
, " `test -e \"$HOME/.keepspam\"`"
, " if ( $RETURNCODE != 0 )"
, " to ${MAILBOX}spam"
, "}"
]
`describe` "maildrop configured"
, "/etc/aliases" `File.hasPrivContentExposed` ctx , "/etc/aliases" `File.hasPrivContentExposed` ctx
`onChange` cmdProperty "newaliases" ["newaliases"] `onChange` cmdProperty "newaliases" ["newaliases"]
, hasJoeyCAChain , hasJoeyCAChain
, "/etc/ssl/certs/postfix.pem" `File.hasPrivContentExposed` ctx , "/etc/ssl/certs/postfix.pem" `File.hasPrivContentExposed` ctx
, "/etc/ssl/private/postfix.pem" `File.hasPrivContent` ctx , "/etc/ssl/private/postfix.pem" `File.hasPrivContent` ctx
, "/etc/postfix/mydomain" `File.containsLines` , "/etc/postfix/mydomain" `File.containsLines`
[ "/.*\\.kitenet\\.net/\tOK" [ "/.*\\.kitenet\\.net/\tOK"
, "/mooix\\.net/\tOK" , "/mooix\\.net/\tOK"
@ -468,8 +491,10 @@ kiteMailServer = propertyList "kitenet.net mail server"
`onChange` Postfix.dedupMainCf `onChange` Postfix.dedupMainCf
`onChange` Service.restarted "postfix" `onChange` Service.restarted "postfix"
`describe` "postfix configured" `describe` "postfix configured"
, Apt.serviceInstalledRunning "dovecot-imapd" , Apt.serviceInstalledRunning "dovecot-imapd"
, Apt.serviceInstalledRunning "dovecot-pop3d" , Apt.serviceInstalledRunning "dovecot-pop3d"
, Apt.serviceInstalledRunning "cron" , Apt.serviceInstalledRunning "cron"
, Apt.installed ["bsd-mailx"] , Apt.installed ["bsd-mailx"]
] ]