33.9 Testing Postfix
An easy way to test the postfix configuration is to send an email message between local users on the system. To perform a quick test, use the mail tool as follows (where name and mydomain are replaced by the name of a user on the system and your domain name respectively):
# mail name@mydomain.com
If the mail tool is not available, it can be installed as follows:
# apt install mailutils
When prompted, enter a subject for the email message and then enter message body text. To send the email message, simply press Ctrl-D. For example:
# mail demo@mydomain.com
Subject: Test email message
This is a test message.
EOT
Run the mail command again, this time as the other user and verify that the message was sent and received:
"/var/mail/demo": 1 message 1 new
>N 1 demo Wed Apr 15 15:30 13/475 Test email message
?
If the message does not appear, check the log file (/var/log/mail.log) for errors...