02Postfix - amagerard/Mail GitHub Wiki

HOME

RedHat/Mail

1- Network 2- Postfix 3- Dovecot 4- Postfixadmin 5- PostfixMariaDB 6- DovecotMariaDB
7- RelaySmtp 8- Troubleshoot 9- Selinux 10- GnomeShell 11- Backup

2. Install postfix with local accounts.

2.1 Part one.

Postfix is the smtp server.
It allows you to send emails.
SMTP ports are:
25 (no encryption), 587 (TLS), 465 (SSL).
The procedure resumes the installation of a Xiao Guoan mail server.
Source : https://www.linuxbabe.com/mail-server/postfixadmin-ubuntu
Xiao Guoan gives more detailed information.
It is IMPORTANT to follow the order of installation.

  • Part one: send messages to local accounts.
    SSL is not enabled.
  • Part two: send and receive messages from local accounts.
    SSL is enabled.
  • Part Three: Send and Receive Messages from virtual accounts.
    Local accounts are disabled. SSL is enabled.

2.2 Postfix.

dnf install postfix s-nail
I disabled IPv6.
vi /etc/postfix/main.cf

# Enable IPv4, and IPv6 if supported  
inet_protocols = ipv4  

systemctl enable --now postfix

2.3 Postfix configuration.

Folder where the emails are.
postconf mail_spool_directory

mail_spool_directory = /var/mail  

Change settings for postfix.
vi /etc/postfix/main.cf
and put back to the exact place where these variables are declared.

inet_interfaces = all  
myhostname = mail.ol26modk.com  
mydomain = ol26modk.com  
myorigin = ol26modk.com  
mydestination = ol26modk.com, $myhostname, localhost.$mydomain, localhost  

systemctl restart postfix

2.4 Email Test.

echo "test mail" |mail -s "Hello me again" <username>@ol26modk.com
mail --> you have an email.
ls -l /var/mail/<username> -> you should see see folder <username>.
more /var/mail/<username>

⚠️ **GitHub.com Fallback** ⚠️