Page MenuHomeDevCentral

Install postfix
ClosedPublic

Authored by DorianWinty on Jul 24 2023, 20:48.
Tags
None
Referenced Files
F3938695: D3242.id8739.diff
Tue, Dec 24, 04:05
F3938693: D3242.id8815.diff
Tue, Dec 24, 04:04
Unknown Object (File)
Mon, Dec 23, 05:28
Unknown Object (File)
Sun, Dec 22, 19:20
Unknown Object (File)
Sun, Dec 22, 17:41
Unknown Object (File)
Sun, Dec 22, 08:04
Unknown Object (File)
Sun, Dec 22, 05:10
Unknown Object (File)
Sat, Dec 21, 04:34
Subscribers
None

Details

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
mail
Build Status
Buildable 5391
Build 5672: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
roles/mailserver/init.sls
8–9

this line should be removed ?

roles/mailserver/init.sls
8–9

yes, as we've now content :)

DorianWinty marked an inline comment as done.

remove excess lines

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

rewrite files with clear headers

add master.cf from hervil

add postfix config for vimbadmin

dereckson mentioned this in Unknown Object (Repository).Jul 11 2024, 16:31
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

DorianWinty marked 2 inline comments as done.

update depending of the hand made changes

reajust diffent part of main.cf

add enable part of postfix

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

roles/mailserver/postfix/init.sls
45
56–61
67–72
DorianWinty marked 4 inline comments as done.

update following the comments

This revision is now accepted and ready to land.Sep 22 2024, 09:44
This revision was landed with ongoing or failed builds.Sep 24 2024, 05:50
Closed by commit rOPS6e4d36dadd6a: Install postfix (authored by DorianWinty). · Explain Why
This revision was automatically updated to reflect the committed changes.
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
-------------