Sending a test message from the command line
This article describes how you can send test messages from the command line to test an F-Secure Messaging Secure Gateway (FSMSG) appliance installation. The steps are also similar for any server using SMTP.
Note: This article assumes technical understanding of the SMTP protocol.
After the installation of an FSMSG or any other mail appliance, the mail flow should be tested. Since the MX records necessary for mail delivery take time to update, sending mail from the command line to and from the machine in question is a valid test method.
These instructions are also valid for other SMTP installations in principle. For this reason, the term "mail appliance" is used in the below instructions:
- From a command prompt, telnet to port 25 on the mail appliance. If connecting from another machine, you should use the IP address of the mail appliance; from the same machine, use "localhost":
telnet localhost 25
- Acknowledge the connection to the Mail Transfer Agent:
helo example.com. This is the address that you are using as the source of the message.
- Enter the email address from whom the message is coming. It is recommended that you always use a valid From address in case something goes wrong and the message bounces:
mail from: firstname.lastname@example.org
- Enter the email address to whom the message is going:
rcpt to: email@example.com
- Identify the end of the envelope (address) information:
- Start the body of the message but identify the header information first:
Subject: Test message
- Continue the body text, typing in text for the message:
This is a test message. Testing 1, 2, 3.
- End the body of the message by typing a single period alone on a line (.) and then by pressing ENTER.
- If successful, you should see a line similar to the following:
250 2.0.0 i2QJcnKX015870 Message accepted for delivery.
quitto go back to the command prompt.