Ref T1930
Details
- Reviewers
dereckson - Maniphest Tasks
- T1930: Postfix Provisioning
- Commits
- rOPS6e4d36dadd6a: Install postfix
Diff Detail
- Repository
- rOPS Nasqueron Operations
- Lint
Lint Passed - Unit
No Test Coverage - Branch
- Build Status
Buildable 5430 Build 5711: arc lint + arc unit
Event Timeline
roles/mailserver/init.sls | ||
---|---|---|
8–9 | this line should be removed ? |
roles/mailserver/init.sls | ||
---|---|---|
8–9 | yes, as we've now content :) |
roles/mailserver/postfix.sls | ||
---|---|---|
1 ↗ | (On Diff #8329) | ... header ... |
Tested,
Postfix is working fine,
"Relay access denied" => so we are not an open relay
Missing part :
- more than one domain
- understandinf of the local delievery
roles/mailserver/postfix/files/main.cf | ||
---|---|---|
20 | myhostname = mail.nasqueron.org TO ADD |
roles/mailserver/postfix/files/master.cf | ||
---|---|---|
74 | No current known use of newsgroups, is a newsgroup gateway | |
76 | Needs bsmtp package | |
78 | Can be removed too, historical virtual mail solution using LDAP. | |
83 | Probably best to use the Perl one for now. It has been actively developed until 2013, then some fixes from 2024, as seen at https://metacpan.org/dist/Mail-SPF-Iterator/changes On FreeBSD, it's postfix-policyd-spf-perl package On Debian, same name is used, ie postfix-policyd-spf-perl Packages not found on EPEL / CentOS Stream 10 / Rocky 9.4 |
roles/mailserver/postfix/files/master.cf | ||
---|---|---|
70 | Path correct, package to add | |
74 | bsmtp still to remove | |
77 | We need to provision the script ourselves. We can use https://github.com/fauria/docker-mailman/blob/master/centos7/postfix-to-mailman.py as a source. It's not part of the mailman3 Debian package anymore. | |
80 | Script is at another location |
salt hervil state.sls roles/mailserver/postfix hervil: ---------- ID: postfix_install Function: pkg.installed Result: True Comment: The following packages were installed/updated: maildrop The following packages were already installed: mailman, postfix-pgsql, postfix-policyd-spf-perl Started: 05:31:47.407511 Duration: 14831.002 ms Changes: ---------- courier-unicode: ---------- new: 2.3.1 old: maildrop: ---------- new: 3.1.8 old: ---------- ID: /usr/local/etc/postfix/main.cf Function: file.managed Result: True Comment: File /usr/local/etc/postfix/main.cf is in the correct state Started: 05:32:02.242138 Duration: 30.929 ms Changes: ---------- ID: /usr/local/etc/postfix/postfix-to-mailman.py Function: file.managed Result: True Comment: File /usr/local/etc/postfix/postfix-to-mailman.py updated Started: 05:32:02.273203 Duration: 101.222 ms Changes: ---------- diff: New file mode: 0644 ---------- ID: /usr/local/etc/postfix/postfix-files Function: file.symlink Result: True Comment: Symlink /usr/local/etc/postfix/postfix-files is present and owned by root:wheel Started: 05:32:02.378124 Duration: 10.155 ms Changes: ---------- ID: /usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf Function: file.managed Result: True Comment: File /usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf is in the correct state Started: 05:32:02.388613 Duration: 17.515 ms Changes: ---------- ---------- ID: /usr/local/etc/postfix/pgsql-virtual-mailbox-maps.cf Function: file.managed Result: True Comment: File /usr/local/etc/postfix/pgsql-virtual-mailbox-maps.cf is in the correct state Started: 05:32:02.406270 Duration: 20.103 ms Changes: ---------- ID: /usr/local/etc/postfix/pgsql-virtual-alias-maps.cf Function: file.managed Result: True Comment: File /usr/local/etc/postfix/pgsql-virtual-alias-maps.cf is in the correct state Started: 05:32:02.426535 Duration: 18.114 ms Changes: ---------- ID: /usr/local/etc/postfix/master.cf Function: file.managed Result: True Comment: File /usr/local/etc/postfix/master.cf updated Started: 05:32:02.444856 Duration: 19.872 ms Changes: ---------- diff: --- +++ @@ -70,10 +70,8 @@ # # Other external delivery methods. # -bsmtp unix - n n - - pipe - flags=Fq. user=bsmtp argv=/usr/local/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient mailman unix - n n - - pipe - flags=FR user=list argv=/usr/local/lib/mailman/bin/postfix-to-mailman.py + flags=FR user=list argv=/usr/local/etc/postfix/postfix-to-mailman.py ${nexthop} ${user} policy-spf unix - n n - - spawn - user=nobody argv=/usr/local/bin/policyd-spf + user=nobody argv=/usr/local/libexec/postfix-policyd-spf-perl ---------- ID: /usr/local/etc/postfix/dynamicmaps.cf Function: file.managed Result: True Comment: File /usr/local/etc/postfix/dynamicmaps.cf is in the correct state Started: 05:32:02.464857 Duration: 14.815 ms Changes: ---------- ID: postfix_running Function: service.running Name: postfix Result: True Comment: The service postfix is already running Started: 05:32:02.482519 Duration: 829.305 ms Changes: Summary for hervil ------------- Succeeded: 10 (changed=3) Failed: 0
Done a second time :
------------- Succeeded: 10 Failed: 0 -------------