Aufgabe #1033
offensrs14 (mail) statt in VM (FreeBSD) lieber in einen CT (Debian) umziehen?
0%
Beschreibung
https://www.freshports.org/mail/mailman/
https://packages.debian.org/buster/mailmanhttps://packages.debian.org/buster/mailman3
https://packages.debian.org/buster/mailman3-full
https://www.thomas-krenn.com/de/wiki/Mailman_unter_Debian_einrichten
https://www.howtoforge.com/how-to-install-and-configure-mailman-with-postfix-on-debian-squeeze
https://www.howtoforge.com/how-to-install-and-configure-mailman-with-postfix-on-debian-squeeze-p2
https://docs.debops.org/en/master/ansible/roles/mailman/mailman2-migration.html
https://wiki.debian.org/Postfix
https://www.tecmint.com/setup-postfix-mail-server-in-ubuntu-debian/
https://search.nixos.org/packages?channel=unstable&show=mailman&query=mailman
Von MichaelLeopold vor mehr als 3 Jahren aktualisiert
- Zugewiesen an wurde auf Bereich Administration Rechentechnik gesetzt
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
- Status wurde von Neu zu In Bearbeitung geändert
- Zugewiesen an wurde von Bereich Administration Rechentechnik zu PaulRiegel geändert
zum test auf dem server für tests (pve) einen container mit der aktuellsten vorlage für debian 10 erstellt.
eine adresse für ipv4 bei pve angegeben.
einen eintrag für dns (nur a und nicht gleich mx) für mail.test. und lists.test. erstellt.
den dienst (server) ssh aktiviert.systemctl status sshd.servicesystemctl start sshd.service
(als test) ssh für das konto root erlaubt.nano /etc/ssh/sshd_config
dumme aktualisierungapt -y updateapt -y upgradereboot
prüfen der verfügbarkeit der anwendung postfix (dienst mail)systemctl status postfix
systemctl is-active postfixactive
systemctl is-enabled postfixenabled
systemctl is-failed postfixactive
prüfen vom hostname (da ich wohl mal las, dass das bei debian für mail einiges vereinfacht)hostnamectl status
Static hostname: test---mail---debian-10---stura
Icon name: computer-container
Chassis: container
Machine ID: d13ec7b451bbf0484a2b2e9620fb911f
Boot ID: d11e40d4a4bb68172967f4b2f3eea59c
Virtualization: lxc
Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 5.15.107-1-pve
Architecture: x86-64
aber ein konfigurieren vom wurde (erst einmal) verzichtet
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
apt -y install mailman
Package configuration
┌────────┤ Configuring mailman ├────────┐
│ Languages to support: │
│ │
│ [ ] ar (Arabic) │
│ [ ] ca (Catalan) │
│ [ ] cs (Czech) │
│ [ ] da (Danish) │
│ [*] de (German) │
│ [*] en (English) │
│ [ ] es (Spanish) │
│ [ ] et (Estonian) │
│ [ ] eu (Basque) │
│ [ ] fi (Finnish) │
│ [ ] fr (French) │
│ [ ] hr (Croatian) │
│ [ ] hu (Hungarian) │
│ │
│ │
│ <Ok> │
│ │
└───────────────────────────────────────┘
zeile
de (German)
und
zeile
en (English)
angewählt.
bei
<Ok>
bestätigt.
Package configuration
┌────────────────────────┤ Configuring mailman ├─────────────────────────┐
│ The web page will be shown in this language, and in general, Mailman │
│ will use this language to communicate with the user. │
│ │
│ Default language for Mailman: │
│ │
│ de (German) │
│ en (English) │
│ │
│ │
│ <Ok> │
│ │
└────────────────────────────────────────────────────────────────────────┘
von der (vorausgewählte) zeile
en (English)
die zeile
de (German)
angewählt.
bei
<Ok>
bestätigt.
Package configuration
┌─────────────────────────┤ Configuring mailman ├──────────────────────────┐
│ │
│ Missing site list │
│ │
│ Mailman needs a so-called "site list", which is the list from which │
│ password reminders and such are sent out from. This list needs to be │
│ created before mailman will start. │
│ │
│ To create the list, run "newlist mailman" and follow the instructions │
│ on-screen. Note that you also need to start mailman after that, using │
│ service mailman start. │
│ │
│ <Ok> │
│ │
└──────────────────────────────────────────────────────────────────────────┘
bei
<Ok>
bestätigt.
Job for mailman.service failed because the control process exited with error code. See "systemctl status mailman.service" and "journalctl -xe" for details.
"spaßeshalber" mal schauen was bei journalctl -xe so steht:
was mit
mailmanctl[3924]: Site list is missing: mailman
.
find /etc/postfix/
/etc/postfix/ /etc/postfix/postfix-files /etc/postfix/dynamicmaps.cf.d /etc/postfix/main.cf.proto /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf /etc/postfix/sasl /etc/postfix/post-install /etc/postfix/makedefs.out /etc/postfix/postfix-files.d /etc/postfix/master.cf.proto /etc/postfix/master.cf /etc/postfix/postfix-script
find /etc/mailman/ | grep -v mailman\/en
/etc/mailman/ /etc/mailman/postfix-to-mailman.py /etc/mailman/mm_cfg.py /etc/mailman/qmail-to-mailman.py /etc/mailman/apache.conf /etc/mailman/leftover
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
TODO: | grep "\S" "überwindet" die dummen inhaltslosen zeilen, oder?
hostname
srs14
grep -vi ^# /usr/local/etc/postfix/main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
mail_owner = postfix
myhostname = mail.stura.htw-dresden.de
mydomain = stura.htw-dresden.de
smtp_bind_address = 141.56.51.14
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
local_recipient_maps = unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 550
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
alias_maps = hash:/etc/aliases, hash:/etc/aliases.stura, hash:/usr/local/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/etc/aliases.stura
home_mailbox = Mail/
mail_spool_directory = /var/mail
mailbox_command = /usr/local/bin/maildrop -d ${USER}
header_checks = pcre:$config_directory/header_checks
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = /usr/local/share/doc/postfix
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = /usr/local/share/doc/postfix
inet_protocols = ipv4
smtpd_sender_restrictions =
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_rhsbl_sender blackhole.securitysage.com
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
smtpd_helo_restrictions =
permit_mynetworks,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname,
reject_unknown_helo_hostname
smtpd_client_restrictions =
permit_mynetworks,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net
smtpd_relay_restrictions =
permit_mynetworks,
defer_unauth_destination
hostname
test---mail---debian-10---stura
grep -vi ^# /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, localhost.$mydomain, localhost relayhost = mynetworks = 127.0.0.0/8 inet_interfaces = loopback-only recipient_delimiter = + compatibility_level = 2
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
hostname
srs14
grep -vi ^# /usr/local/etc/postfix/master.cf
smtp inet n - n - - smtpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
mailman unix - n n - - pipe
flags=FR user=mailman:mailman argv=/usr/local/mailman/postfix-to-mailman.py ${nexthop} ${user}
hostname
test---mail---debian-10---stura
grep -vi ^# /etc/postfix/master.cf
smtp inet n - y - - smtpd
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
-o syslog_name=postfix/$service_name
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
postlog unix-dgram n - n - 1 postlogd
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
- Beschreibung aktualisiert (Vergleich)
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
- Beschreibung aktualisiert (Vergleich)
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
echo "Is email sending OK..?" | mail -s "Sending email!" vate@stura.htw-dresden.de
-bash: mail: command not found
apt -y install mailutils
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
die zeitzone ist anscheinend (schön) auf utc laufend. (aber vermutlich macht das bei mail "stress". das soll gleich mal vermieden werden.) es wird eine umstellung auf unsere zeitzone vorgenommen.
TODO: in der dokumentation zur verwendung von einem container mit der vorlage für debian (10) sollte das vermerkt sein, dass - obwohl der host eine andere zeitzone hat - erst einmal utc als zeitzone gesetzt ist. (nice! aber vielleicht ergeben sich für die arbeit im container dadurch unerwartete probleme.)
date
Tue May 16 01:37:09 UTC 2023
timedatectl
Local time: Tue 2023-05-16 01:39:29 UTC
Universal time: Tue 2023-05-16 01:39:29 UTC
RTC time: n/a
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
ls -l /etc/localtimelrwxrwxrwx 1 root root 27 May 15 19:38 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC
timedatectl list-timezones
timedatectl set-timezone Europe/Berlin
ls -l /etc/localtime
lrwxrwxrwx 1 root root 35 May 16 03:40 /etc/localtime -> ../usr/share/zoneinfo/Europe/Berlin
dateTue May 16 03:41:00 CEST 2023
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
hostname
srs14
ls -al /usr/local/mailman
drwxrwsr-x 20 mailman mailman 21 Jun 5 2018 . drwxr-xr-x 15 root wheel 15 Feb 9 2018 .. drwxrwsr-x 11 root mailman 72 Jun 5 2018 Mailman drwxrwsr-x 4 root mailman 4 Dec 14 2012 archives drwxrwsr-x 2 root mailman 48 Feb 24 2018 bin drwxrwsr-x 2 root mailman 13 Feb 24 2018 cgi-bin drwxrwsr-x 2 root mailman 13 Jun 5 2018 cron drwxrwsr-x 2 root mailman 30 May 19 11:58 data drwxrwsr-x 2 root mailman 10 Feb 24 2018 icons drwxrwsr-x 421 root mailman 421 May 18 00:27 lists drwxrwsr-x 2 root mailman 93 May 19 12:00 locks drwxrwsr-x 2 root mailman 65 May 11 17:00 logs drwxrwsr-x 2 root mailman 3 Feb 24 2018 mail drwxrwsr-x 40 root mailman 40 Jun 5 2018 messages -rwxr-xr-- 1 root mailman 4650 Feb 23 2018 postfix-to-mailman.py drwxrwsr-x 2 root mailman 2 Feb 24 2018 pythonlib drwxrwsr-x 11 root mailman 11 Feb 23 2018 qfiles drwxrwsr-x 3 root mailman 17 Jun 5 2018 scripts drwxrwsr-x 2 root mailman 4 Nov 22 2019 spam drwxrwsr-x 41 root mailman 41 Jun 5 2018 templates drwxrwsr-x 4 root mailman 19 Feb 24 2018 tests
hostname
test---mail---debian-10---stura
ls -al /var/lib/mailman/
drwxrwsr-x 8 root list 4096 May 15 22:09 . drwxr-xr-x 21 root root 4096 May 15 22:09 .. -rw-r--r-- 1 root list 19 Feb 26 2022 .version lrwxrwxrwx 1 root root 24 Feb 26 2022 Mailman -> /usr/lib/mailman/Mailman drwxrwsr-x 4 root list 4096 May 15 22:09 archives lrwxrwxrwx 1 root root 20 Feb 26 2022 bin -> /usr/lib/mailman/bin lrwxrwxrwx 1 root root 24 Feb 26 2022 cgi-bin -> /usr/lib/cgi-bin/mailman lrwxrwxrwx 1 root root 21 Feb 26 2022 cron -> /usr/lib/mailman/cron drwxrwsr-x 2 root list 4096 May 15 22:10 data lrwxrwxrwx 1 root root 25 Feb 26 2022 icons -> /usr/share/images/mailman drwxrwsr-x 2 root list 4096 Feb 26 2022 lists lrwxrwxrwx 1 root root 17 Feb 26 2022 locks -> /var/lock/mailman lrwxrwxrwx 1 root root 16 Feb 26 2022 logs -> /var/log/mailman lrwxrwxrwx 1 root root 21 Feb 26 2022 mail -> /usr/lib/mailman/mail drwxr-xr-x 41 root list 4096 May 15 22:09 messages drwxrwsr-x 2 list list 4096 Feb 26 2022 qfiles lrwxrwxrwx 1 root root 24 Feb 26 2022 scripts -> /usr/lib/mailman/scripts drwxrwsr-x 2 root list 4096 Feb 26 2022 spam lrwxrwxrwx 1 root root 12 Feb 26 2022 templates -> /etc/mailman
Von PaulRiegel vor mehr als 2 Jahren aktualisiert
less /usr/share/doc/mailman/README.Debian