Linux Howtos
Statusmeldungen vom Raspberry Pi an deine Email Adresse senden
Voraussetzung:
Raspberry Pi 3 oder 4
USB Netzteil für Raspberry Pi 3 oder 4
Gehäuse für Raspberry Pi 3 oder 4
SD-Card oder USB Stick¹ mit mindestens 16 GB
Ethernet-Kabel
Raspberry Pi OS with desktop or Lite
Download: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit
Dokumentation: https://www.raspberrypi.com/documentation/computers/getting-started.html#setting-up-your-raspberry-pi
1:= Das Booten vom USB Stick ist nicht immer möglich.
Meldungen von einem Raspberry Pi bekommt man gut über sendmail. Sendmail kann Mails versenden. Das kann nützlich sein, um Statusmeldungen per Email zu bekommen.
sudo apt-get install mailutils ssmtp sendmail sudo nano /etc/ssmtp/ssmtp.con
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.example.org:465
AuthMethod=LOGIN
AuthUser=franz@example.org
AuthPass=<Password>
#TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt
UseTLS=Yes
#UseSTARTTLS=YES
# Where will the mail seem to come from?
#rewriteDomain=
# The full hostname
hostname=nextcloudpi
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
sudo nano /etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:franz@example.org:smtp.example.org:465
franz:franz@example.org:smtp.example.org:465
wie man Emails sendet kann man hier lesen:
https://wiki.archlinux.org/title/SSMTP#Sending_email
