Table of Contents

Installation Testing

**This refers to Mailserver Version 4.6, please refer to Mailserver 4.5 installation testing for the previous version.

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.

Greylisting is enabled on default in the mailserver. Please make sure that you perform this test from an internal, or already whitelisted, address.

Testing normal delivery

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

Expected result

It's expected that no errors be apparent in the maillog and that the mail is delivered to the users inbox within seconds.

Testing email relay protection

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

Expected result

It's expected that the error message “Relay access denied” be presented and that the mail is not accepted for delivery.

Testing bogus email address 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

Expected result

It's expected that the error message “Recipient address rejected” be presented and that the mail is not accepted for delivery.

Testing Antivirus setup

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*
.
550 5.7.1 Message Infected with "Eicar-Test-Signature"

Expected result

It's expected that the message be rejected with the: Message Infected with “Eicar-Test-Signature” message.

Testing Antispam setup

In this test, the GTUBE test spam pattern is being used to verify that the Antispam engine is operational. The GTUBE test message, will trigger the spam kill level.

In the Mailserver, mail are treated according to the spam level:

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

Expected result

It's expected that the message be accepted for delivery, but rejected and return to the sender with a “message content rejected” message.

The next test will try to trigger the spam engine, but not enough to trigger the spam kill level. The following test work on a clean system. If the system has been running for a while, and enough spam training has been performed, it could potentially alter the result.

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: urgent business assistance    

bank of nigeria
Dear Friend
100% GUARANTEED
strong buy
.
250 2.0.0 Ok: queued as 6EB57BDDE

Expected result

It's expected that the message be accepted for delivery and stored into the recipients Spam mailbox.

Conclusion

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.