How to set up email on Intranet - no ISP, no internet, no encryption, no spam filters; everything behind my firewall
0
votes
0
answers
41
views
The situation is a Raspberry Pi which is hosting several services. Sometimes, a service may fail, then I need to send an alert to my desktop.
I have done many web searches, most of the results talk about connecting to an external email service, so are not relevant to me.
The desktop has Linux Mint 22. Mail and postfix seem to be already installed. There is a log file (
/var/log/mail.log
) which only has start-up messages.
The Pi (3B with Raspian 12 bookworm) is headless. I have installed sendmail, ssmtp and postfix. I cannot find a mail log file. I have found files /var/mail/NAME
(where NAME can be the sender [the Pi user] or the receiver [the Mint user]). The contents seem to show that the test messages were processed correctly, but I did once see
Diagnostic-Code: X-Postfix; delivery via local: delivers to command: procmail -a "$EXTENSION"
.
I get no error when running this on the Pi
sendmail -v ME@MYMINT
It simply says
Mail Delivery Status Report will be mailed to [user]. mailq
shows nothing.
On the Pi, the file '/etc/postfix/main.cf' contains
smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 3.6
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=maysmtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = MYPI.MYDOMAIN.org
myorigin = MYPI
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, MAIL@MYDOMAIN.org, localhost.localdomain, localhost, MYMINT.MYDOMAIN.org
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/28
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
MYDOMAIN is a made-up name that is only used for this project. MYPI and MYMINT are the host names of my boxes, with IP addresses in the range 192.168.1.x .
Can you help me set up email between these 2 boxes. I think I also need help in reading mail on the Pi.
**Edit - Firewall considerations**
I have tried to eliminate any firewall issues. I have opened port 25 on the Mint box. There is no firewall on the Pi.
Asked by Peter Bill
(526 rep)
Jan 13, 2025, 07:46 PM
Last activity: Jan 14, 2025, 10:31 AM
Last activity: Jan 14, 2025, 10:31 AM