su dnf -y install postfix systemctl start postfix systemctl enable postfix
The following commands are useful to monkey with postfix:
systemctl reload postfix systemctl stop postfix systemctl status postfixLook in /var/log/maillog for messages from Postfix.
Remember, "x" exits and makes no changes. Typing "q" exits but will leave mail marked as "U" (unread) rather thant "N" (new).
dnf -y install mailx
The first thing I do is set myhostname to "casting.as.arizona.edu". This is not the name of the machine I am on, but is the name of the externally visible firewall box that relays port 25 to the machine I am on. We will see if this is correct. This did not work out because of the need to reference this in "inet_interfaces" below. I made sure this FQDN was in /etc/hosts and then set it to:
myhostname = crater.as.arizona.eduDespite things in the main.cf comments that indicate otherwise, I found that I had to make the following change to get postfix to listen to the external network and not just localhost.
#inet_interfaces = localhost inet_interfaces = $myhostname, localhost
Finally we set mynetworks to
mynetworks = 192.168.1.0/24, 127.0.0.0/8
su dnf -y install firewalld systemctl enable firewalld systemctl start firewalldTo open the port for smtp (port 25) do the following. I just want to listen for incoming mail on this host, and don't want to allow other hosts to submit mail, so I leave those lines commented out.
firewall-cmd --permanent --add-service=smtp # firewall-cmd --permanent --add-service=submission # firewall-cmd --permanent --add-service=smtps # firewall-cmd --permanent --add-port=465/tcp firewall-cmd --reload firewall-cmd --list-all
su dnf -y install procmailThen place this in your /home/user/.forward
"|/usr/bin/procmail"And set up a .procmailrc
The email system was set up on thermo using the exim4 package. Here are the steps I needed to perform:
- login as root
- install exim4 package (if not already installed)
- edit /etc/exim4/update-exim4.conf.conf
- change these two parameters:
- dc_eximconfig_configtype='smarthost'
- dc_smarthost='smtpgate.email.arizona.edu'
- I think I also changed this parameter (was it just 'thermo'?):
- dc_other_hostnames='thermo.as.arizona.edu'
- edit /etc/mailname
- Change the line from thermo to thermo.as.arizona.edu
- This sets the name of the sending system in the emails.
- run update-exim4.conf
- This parses the new configuration.
- This is found in /usr/sbin, so it can be called by root from anywhere.
- There should be no response.
- run /etc/init.d/exim4 restart
- This restarts exim4.
- It should respond with:
- [ ok ] Restarting exim4 (via systemctl): exim4.service.
Adventures in Computing / tom@mmto.org