Aufgabe #1656
offenAufgabe #1619: Aktualisierung vom Dienst Mail (Anwendung postfix), samt dem Dienst Mail-Verteiler (Anwendung GNU Mailman) vom Stand FreeBSD 11
Ermittlung der (gezielt geänderten) Konfiguration für Postfix, GNU Mailman & Co
0%
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
postfix¶
/usr/local/etc/postfix/main.cf¶
war
compatibility_level = 3.7
ist zusätzlich
#myhostname = srs14.stura.htw-dresden.de myhostname = mail.stura.htw-dresden.de
ist zusätzlich
mydomain = stura.htw-dresden.de
ist zusätzlich neu
smtp_bind_address = 141.56.51.14
ist zusätzlich
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
ist zusätzlich
local_recipient_maps = unix:passwd.byname $alias_maps
war
mynetworks_style = host
ist zusätzlich
mynetworks = 141.56.16.131, 141.56.16.134, 141.56.16.135, 141.56.16.136, 141.56.16.231, 141.56.16.232, 141.56.50.0/26, 127.0.0.0/24, 192.168.100.12, 141.56.51.0/24, 141.56.36.32/29, 141.56.16.128/28, 141.56.16.224/28
ist zusätzlich
alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
ist zusätzlich
home_mailbox = Mail/
ist zusätzlich
mail_spool_directory = /var/mail
ist zusätzlich
mailbox_command = /usr/local/bin/maildrop -d ${USER}
ist zusätzlich
header_checks = pcre:$config_directory/header_checks
war
inet_protocols = all
ist zusätzlich
inet_protocols = ipv4
ist zusätzlich neu
smtpd_sender_restrictions =
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
ist zusätzlich neu
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
check_client_access hash:/usr/local/etc/postfix/rbl_override,
reject_rbl_client sbl.spamhaus.org,
permit
ist zusätzlich neu
smtpd_helo_restrictions =
permit_mynetworks,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname,
reject_unknown_helo_hostname
ist zusätzlich neu
smtpd_client_restrictions =
permit_mynetworks,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net
ist zusätzlich neu
smtpd_relay_restrictions =
permit_mynetworks,
defer_unauth_destination
# permit_mynetworks
ist zusätzlich neu
sender_canonical_maps = tcp:127.0.0.1:10001
ist zusätzlich neu
sender_canonical_classes = envelope_sender
ist zusätzlich neu
recipient_canonical_maps = tcp:127.0.0.1:10002
ist zusätzlich neu
recipient_canonical_classes = envelope_recipient, header_recipient
war
smtp_tls_CApath = /etc/ssl/certs
war
meta_directory = /usr/local/libexec/postfix
war
shlib_directory = /usr/local/lib/postfix
/usr/local/etc/postfix/master.cf¶
war
relay unix - - n - - smtp
-o syslog_name=postfix/$service_name
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
ist
relay unix - - n - - smtp # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
ist zusätzlich
mailman unix - n n - - pipe
flags=FR user=mailman:mailman argv=/usr/local/mailman/postfix-to-mailman.py ${nexthop} ${user}
/usr/local/etc/postfix/header_checks¶
diff /usr/local/etc/postfix/header_checks.sample /usr/local/etc/postfix/header_checks
549a550,575 > ### vb > ### 2016-02-08 > ### Versuch zum "Ableiten" aller Mails, die von der Hochschule als Spam gekennzeichnet sind > #/^X-HTW-Spam-Flag:\s+YES/ REDIRECT paul.riegel@htw-dresden.de > ### ptb > ### 2018-02-23 > ### befreien von vater von spam mails > /^X-HTW-Spam-Flag:\s+YES/ REDIRECT spam@stura.htw-dresden.de > ### 2020-02-29 > ### das rz htw dresden scheint den header geaendert zu haben > ### anscheinend wird nun endlich auch ein aktuelle version von rspamd verwendet, zuvor war es irgendwas von 2000 > ### https://rspamd.com/changes.html#release-194-23-may-2019 > /^X-Spam-Flag:\s+YES/ REDIRECT spam@stura.htw-dresden.de > ### pte > ### ve > ### gb > ### 2023-05-15 > ### Versuch ein (noch zu benennendes) Problem wegen SPF, was das RZ 2023-05-12 macht, zu loesen > #/.+/ outgoing@stura.htw-dresden.de > #### #### vb > #### #### 2023-05-15T20:30 > #### #### @goeranh@: das war nicht auskommentiert (und der "test" noch wirksam)!!! > #### #### ilsi beschwerte sich (irritiert) soeben bei mir. > #/From:.*/ REPLACE From: outgoing@stura.htw-dresden.de > ### ge >
/usr/local/etc/postfix/rbl_override¶
less /usr/local/etc/postfix/rbl_override
mail.htw-dresden.de OK webmail.htw-dresden.de OK rlux45.rz.htw-dresden.de OK 141.56.16.45 OK rmr1.rz.htw-dresden.de OK 141.56.16.131 OK rmr2.rz.htw-dresden.de OK 141.56.16.132 OK 141.56.16.133 OK rmx4.rz.htw-dresden.de OK 141.56.16.134 OK rmx5.rz.htw-dresden.de OK 141.56.16.135 OK rmx6.rz.htw-dresden.de OK 141.56.16.136 OK
/usr/local/etc/postfix/relay_recipients¶
less /usr/local/etc/postfix/relay_recipients
@stura.htw-dresden.de OK @htw-dresden.de OK
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
apache¶
/usr/local/etc/apache24/httpd.conf¶
diff /usr/local/etc/apache24/httpd.conf.sample /usr/local/etc/apache24/httpd.conf
135d134 < #LoadModule proxy_uwsgi_module libexec/apache24/mod_proxy_uwsgi.so 147a147,150 > ####vb > #### 2023-06-02 vater > #### Es soll https (also http mit TLS) verwendet werden. > #### Es wird certbot verwendet. 148a152,157 > #### 2023-06-02 vater > #### certbot findet mod_ssl.so bei der standardmaessigen relativen Angabe des Ortes nicht. > #### certbot findet mod_ssl.so bei aber bei relativer Angabe des Ortes. > ####LoadModule ssl_module libexec/apache24/mod_ssl.so > LoadModule ssl_module /usr/local/libexec/apache24/mod_ssl.so > ####ve 152d160 < #LoadModule md_module libexec/apache24/mod_md.so 166c174 < #LoadModule cgid_module libexec/apache24/mod_cgid.so --- > LoadModule cgid_module libexec/apache24/mod_cgid.so 169c177 < #LoadModule cgi_module libexec/apache24/mod_cgi.so --- > LoadModule cgi_module libexec/apache24/mod_cgi.so 180a189,191 > ####vb > #### 2023-06-02 vater > #### certbot erstellt Inhalte, etwa in der Datei /usr/local/etc/apache24/extra/httpd-vhosts.conf, mit RewriteEngine, RewriteCond und RewriteRule. 181a193,194 > LoadModule rewrite_module libexec/apache24/mod_rewrite.so > ####ve 226a240,248 > ####vb > #### 2023-06-02 > #### Die Anwendung Apache funktioniert auch ohne Festlegung. Jedoch beschwert sich die Anwendung Apache. > ####AH00557: httpd: apr_sockaddr_info_get() failed for mail-2023-05 > ####AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message > #### Es gibt 2 Eintraege fuer DNS der Domain stura.htw-dresden.de, die auf die Instanz zeigen. > ServerName lists.stura.htw-dresden.de > ####ServerName mail.stura.htw-dresden.de > ####ve 509c531 < #Include etc/apache24/extra/httpd-vhosts.conf --- > Include etc/apache24/extra/httpd-vhosts.conf 538a561,564 > <IfModule mod_ssl.c> > Listen 443 > </IfModule> > Include /usr/local/etc/apache24/extra/httpd-vhosts-le-ssl.conf
/usr/local/etc/apache24/httpd.conf¶
less /usr/local/etc/apache24/httpd.conf
<VirtualHost lists.stura.htw-dresden.de:80>
ServerAdmin webmaster@stura.htw-dresden.de
DocumentRoot "/usr/local/mailman/lists"
ServerName lists.stura.htw-dresden.de
# ServerName www.lists.stura.htw-dresden.de
# ServerAlias mail.stura.htw-dresden.de
<Directory /usr/local/mailman/archives/>
####vb
#### https://httpd.apache.org/docs/2.4/mod/core.html#options
# Options FollowSymLinks
Options Indexes FollowSymLinks
####ve
AllowOverride None
</Directory>
Alias /pipermail/ /usr/local/mailman/archives/public/
Alias /images/mailman/ /usr/share/images/mailman/
Alias /icons/ /usr/local/mailman/icons/
ScriptAlias /admin /usr/local/mailman/cgi-bin/admin
ScriptAlias /admindb /usr/local/mailman/cgi-bin/admindb
ScriptAlias /confirm /usr/local/mailman/cgi-bin/confirm
ScriptAlias /create /usr/local/mailman/cgi-bin/create
ScriptAlias /edithtml /usr/local/mailman/cgi-bin/edithtml
ScriptAlias /listinfo /usr/local/mailman/cgi-bin/listinfo
ScriptAlias /options /usr/local/mailman/cgi-bin/options
ScriptAlias /private /usr/local/mailman/cgi-bin/private
ScriptAlias /rmlist /usr/local/mailman/cgi-bin/rmlist
ScriptAlias /roster /usr/local/mailman/cgi-bin/roster
ScriptAlias /subscribe /usr/local/mailman/cgi-bin/subscribe
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
ScriptAlias / /usr/local/mailman/cgi-bin/listinfo
<Directory "/usr/local/mailman">
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
ErrorLog /var/log/mailman-error.log
# CustomLog /var/log/mailman-access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =mail.stura.htw-dresden.de [OR]
RewriteCond %{SERVER_NAME} =lists.stura.htw-dresden.de
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
/usr/local/etc/apache24/extra/httpd-vhosts-le-ssl.conf¶
less /usr/local/etc/apache24/extra/httpd-vhosts-le-ssl.conf
<VirtualHost *:443>
#<VirtualHost lists.stura.htw-dresden.de:443>
ServerAdmin webmaster@stura.htw-dresden.de
DocumentRoot "/usr/local/mailman/lists"
ServerName lists.stura.htw-dresden.de
# ServerAlias mail.stura.htw-dresden.de
<Directory /usr/local/mailman/archives/>
####vb
#### https://httpd.apache.org/docs/2.4/mod/core.html#options
# Options FollowSymLinks
Options Indexes FollowSymLinks
####ve
AllowOverride None
</Directory>
Alias /pipermail/ /usr/local/mailman/archives/public/
Alias /images/mailman/ /usr/share/images/mailman/
Alias /icons/ /usr/local/mailman/icons/
ScriptAlias /admin /usr/local/mailman/cgi-bin/admin
ScriptAlias /admindb /usr/local/mailman/cgi-bin/admindb
ScriptAlias /confirm /usr/local/mailman/cgi-bin/confirm
ScriptAlias /create /usr/local/mailman/cgi-bin/create
ScriptAlias /edithtml /usr/local/mailman/cgi-bin/edithtml
ScriptAlias /listinfo /usr/local/mailman/cgi-bin/listinfo
ScriptAlias /options /usr/local/mailman/cgi-bin/options
ScriptAlias /private /usr/local/mailman/cgi-bin/private
ScriptAlias /rmlist /usr/local/mailman/cgi-bin/rmlist
ScriptAlias /roster /usr/local/mailman/cgi-bin/roster
ScriptAlias /subscribe /usr/local/mailman/cgi-bin/subscribe
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
ScriptAlias / /usr/local/mailman/cgi-bin/listinfo
<Directory "/usr/local/mailman">
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
ErrorLog /var/log/mailman-error.log
# CustomLog /var/log/mailman-access.log combined
Include /usr/local/etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /usr/local/etc/letsencrypt/live/lists.stura.htw-dresden.de/fullchain.pem
SSLCertificateKeyFile /usr/local/etc/letsencrypt/live/lists.stura.htw-dresden.de/privkey.pem
</VirtualHost>