E-Mail/Server/Setup/Testing

Aus Foxwiki
Version vom 28. März 2023, 10:24 Uhr von Dirkwagner (Diskussion | Beiträge) (Textersetzung - „[[Kategorie:/“ durch „[[Kategorie:“)

Testing

  1. To send and receive test emails to your mail server, install the Mailutils package:
# apt-get install mailutils
  1. Send a test email to an email address outside of your mail server, like a Gmail account.
  • Replace email1@example.com with an email address from your mail server:
echo "Email body text" |  # mail -s "Email subject line" recipient@gmail.com -aFrom:email1@example.com
  1. Log in to the test email account and verify that you have received the email from the specified mail server email address.
  2. Send a test email to your mail server from an outside email address.
  • Log back in and check that the email was received; substitute in the username and domain you sent the mail to:
# mail -f /var/mail/vhosts/example.com/email1

When prompted, enter the number corresponding to the email you would like to view:

"/var/mail/vhosts/example.com/": 9 messages 5 new 4 unread
U   1 John Doe     Wed Jun 27 16:00  57/2788  Test email 1
U   2 John Doe     Wed Jun 27 16:02  56/2761  Test email 2
U   3 John Doe     Wed Jun 27 16:35  15/594   Test email 3
U   4 John Doe     Wed Jun 27 16:42  71/3535  Test email 4
>N   5 John Doe     Mon Jul  2 10:55  13/599   Subject of the Email
?

The email message header and body should display.

  • Consider adding spam and virus filtering and a webmail client.

See Troubleshooting problems with Postfix, Dovecot, and MySQL for debugging steps.