init.sls 900 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # Postfix
  3. #
  4. # Force installation of bsd-mailx as it's not installed anymore in Debian Jessie..
  5. bsd-mailx:
  6. pkg.installed:
  7. - name: bsd-mailx
  8. postfix:
  9. pkg.installed:
  10. - name: postfix
  11. - requires:
  12. - file: /etc/mailname
  13. service.running:
  14. - enable: true
  15. - reload: true
  16. #
  17. # Don't listen on port 25, by default, a unix socket is enough.
  18. /etc/postfix/master.cf:
  19. file.managed:
  20. - source:
  21. - salt://postfix/master.cf.{{ grains['nodename'] }}
  22. - salt://postfix/master.cf
  23. - watch_in:
  24. - service: postfix
  25. #
  26. # Send root mail to ops@ffho.net
  27. /etc/aliases:
  28. file.managed:
  29. - source: salt://postfix/aliases
  30. newaliases:
  31. cmd.wait:
  32. - name: /usr/bin/newaliases
  33. - watch:
  34. - file: /etc/aliases
  35. # Set mailname for xxx.paderborn.freifunk.net (FIXME)
  36. /etc/mailname:
  37. file.managed:
  38. - contents: "{{ grains.nodename }}.paderborn.freifunk.net"