How To Check Mail Configuration In Linux?

How To Check Mail Configuration In Linux

Here's how to check mail configuration in Linux is very simple if you follow the quick steps given on this page. You can check the SMTP configuration from the command-line interface using telnet, OpenSSL, or ncat (nc) command. Using the command-line interface is the best way to check the SMTP relay.

Steps to check mail configuration using the telnet command:

  • Step : 1 On your Linux computer, click the Unity Dash button and type ‘terminal’ in the search field.
  • Step : 2 From the search result, click the Terminal icon to launch the Terminal app.
  • Step : 3 In the Terminal window, type the ‘telnet’ command and press the Enter key.
  • Step : 4 This command will communicate with another host using the telnet protocol.
  • Step : 5 If telnet is not installed on your computer, enter the ‘sudo yum install telnet’ command and press the Enter key.
  • Step : 6 To check the SMTP servers, enter the ‘telnet smtp.domain_name.com 25 [2525 | 587]’ command in the Terminal window and press Enter.
  • Step : 7 Once verified, quit telnet.

Steps to check mail configuration using the Ncat or NC command:

  • Step : 1 First, open the Terminal app. Type the ‘sudo yum install nmap-ncat -y’ command and press Enter (if ncat or nc is not available on your computer).
  • Step : 2 This is the general-purpose CLI tool used for port scanning, security tool, and monitoring tool.
  • Step : 3 Type the ‘nc -v -u smtp.example.com 587’ command in the Terminal window and press Enter.
  • Step : 4 If it is successfully executed, a confirmation message will be displayed in the window.

Steps to check mail configuration using the OpenSSL command:

  • Step : 1 On your Linux computer, launch Terminal, enter the ‘sudo yum install openssl’ command, and press the Enter key (if you have not yet installed OpenSSL).
  • Step : 2 Type the ‘openssl s_client -connect smtp.domain_name.com: 587 -starttls smtp’ command in the Terminal window and press Enter.
  • Step : 3 This command will check the TLS encrypted connection to an SMTP server.
  • Step : 4 If the connection is successfully established and see how to check mail configuration in Linux, you will notice a 250 DSN.
  • Step : 5 Next, type the EHLO “I am here” command and press Enter to start your SMTP transaction.
mail settings net