This page refers to the Mailserver version 4.5
In order to trust that the installation is working properly, that the virus and spam detection is working properly, testing needs to be performed. Listed here are ways to test all basic functionalities of the mailserver.
The following tests will be conducted to verify that the mailserver is functioning properly:
For all of these tests, we'll telnet to the mailserver on port 25 and type the commands directly to the postfix server.
telnet _mailserver_ip_ 25
This displays the mails as they are processed
Pick a valid email address to use as delivery for this testing. In this case, the test domain springfield.com will be used and the email address burns@springfield.com as a valid email address in this domain.
For normal delivery, you can just verify that the email show up in the inbox of the users account:
telnet 10.1.11.14 25 Trying 10.1.11.14... Connected to 10.1.11.14. Escape character is '^]'. 220 mail.springfield.com ESMTP Postfix helo localhost 250 mail.springfield.com mail from: <burns@springfield.com> 250 2.1.0 Ok rcpt to: <burns@springfield.com> 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> subject: test test . 250 2.0.0 Ok: queued as 6EB57BDDE
It's expected that no errors be apparent in the maillog and that the mail is delivered to the users inbox within seconds.
In this test, the email address user@test.com is used as an external email address (the domain test.com is not defined in the mailserver).
telnet 10.1.11.14 25 Trying 10.1.11.14... Connected to 10.1.11.14. Escape character is '^]'. 220 mail.springfield.com ESMTP Postfix helo localhost 250 mail.springfield.com mail from: <burns@springfield.com> 250 2.1.0 Ok rcpt to: <user@test.com> 554 5.7.1 <user@test.com>: Relay access denied
It's expected that the error message “Relay access denied” be presented and that the mail is not accepted for delivery.
In this test, the email address bogus@springfield.com is used as a known non-configured email address in the valid domain springfield.com.
telnet 10.1.11.14 25 Trying 10.1.11.14... Connected to 10.1.11.14. Escape character is '^]'. 220 mail.springfield.com ESMTP Postfix helo localhost 250 mail.springfield.com mail from: <burns@springfield.com> 250 2.1.0 Ok rcpt to: <bogus@springfield.com> 550 5.1.1 <bogus@springfield.com>: Recipient address rejected: User unknown in virtual mailbox table
It's expected that the error message “Recipient address rejected” be presented and that the mail is not accepted for delivery.
In this test, the EICAR test virus pattern is being used to verify that the Antivirus engine is operational.
telnet 10.1.11.14 25 Trying 10.1.11.14... Connected to 10.1.11.14. Escape character is '^]'. 220 mail.springfield.com ESMTP Postfix helo localhost 250 mail.springfield.com mail from: <burns@springfield.com> 250 2.1.0 Ok rcpt to: <burns@springfield.com> 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> subject: test X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* . 250 2.0.0 Ok: queued as 6EB57BDDE
It's expected that the message be accepted for delivery, be deleted and not delivered to any mailbox.
In this test, the GTUBE test spam pattern is being used to verify that the Antispam engine is operational.
telnet 10.1.11.14 25 Trying 10.1.11.14... Connected to 10.1.11.14. Escape character is '^]'. 220 mail.springfield.com ESMTP Postfix helo localhost 250 mail.springfield.com mail from: <burns@springfield.com> 250 2.1.0 Ok rcpt to: <burns@springfield.com> 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> subject: test XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X . 250 2.0.0 Ok: queued as 6EB57BDDE
It's expected that the message be accepted for delivery, be tagged with a SPAM subject line and delivered to the users Spam Detected mailbox.
If all tests where successful, you have now completed basic functionality testing of the Mailserver and know that it can deliver emails to the correct user and correct mailbox.
You also have tested that it will not accept mails from unknown users or domains (relaying), and that spam and antivirus tests works as expected.