Support / KnowledgeBase

 
Search the KnowledgeBase Search

How do I enable an alternate SMTP port?

  • Applies to: (dv) 3.5, (dv) 4.0, (gs)

  • Difficulty: Easy

  • Time needed: 10 minutes

  • Tools needed: Plesk administrator access, root access, SSH, vi knowledge

 
  • Applies to: (gs)
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: None
  • Applies to: (dv) 4.0
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Plesk administrator access
  • Applies to: (dv) 3.5
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: Plesk administrator access, root access, SSH, vi knowledge

Overview

SMTP is an abbreviation for Simple Mail Transfer Protocol, a data transmission format used to send email. The most commonly used SMTP Port is 25. It is becoming more and more common for Internet Service Providers to block outgoing SMTP traffic on Port 25.

Instructions

Alternate SMTP Port 587 is available to all domains on our (gs) Grid-Service hosting platform. You simply need to edit your email configuration to use Port 587. Please see the following article for the walkthrough on your email client.

See also

By default, (dv) Dedicated-Virtual Servers come with Port 25 open for SMTP/outgoing email. However, more and more Internet Service Providers and locations block Port 25, in an effort to reduce spam.

Fortunately, you can open an alternate port on your server. Follow either method below to do this.

Once you've opened the alternate port on the server, you will need to configure your email software to use it. The second section of each article in our collection of third-party email application walkthroughs will show you how to configure the email client to use Port 587, if it doesn't already:

End of Life Warning

This service has a pending End of Life. Please move to a current service as soon as possible. For more information, please see: (dv) Dedicated-Virtual 4.0: Migration Information.

Via Plesk

For the (dv) 4.0

  1. Log into Plesk.
  2. Click Settings.
  3. Click Mail Server Settings.
  4. Check the box labelled Enable message submission.
  5. Click OK.

For the (dv) 3.5

To enable Port 587 for all domains and IP Addresses on your service, follow these steps. Note that if you want to enable a port other than 587, or if you have a (dv) Dedicated-Virtual Server earlier than 3.5, you will need to follow the next section to open the port manually.

  1. Log into Plesk.
  2. Click on Server on the left.

    Plesk server.png

  3. Click on Mail.

    Plesk server mail.png

  4. Check the box for Enable message submission.

    enablemessagesubmission

  5. You can now connect to the server and send mail over Port 587.

Via SSH

Enable any alternate SMTP port

READ ME FIRST

This method is UNSUPPORTED by (mt) Media Temple and Plesk. There is a high probability that this will cease to work or even break your server if you attempt to update Plesk after applying the workaround.

Please take a moment to review the Statement of Support.

  1. Log into your server with a root or sudo user via SSH.
  2. Copy the existing SMTP configuration file to smtp_nonstandard:
    cp /etc/xinetd.d/smtp_psa /etc/xinetd.d/smtp_nonstandard
  3. Open smtp_nonstandard for editing:
    vi /etc/xinetd.d/smtp_nonstandard
  4. Add the following lines to the file (the example opens port 2525; other ports are possible):

    Filename: smtp_nonstandard

    service = smtp_nonstandard
    type = UNLISTED
    port = 2525
    

    vi tip:

    Press i to enter "insert mode" so you can type and copy/paste. Press "Esc" to exit "insert mode" when you are done modifying the file. Type :wq to save and quit.

  5. Note that depending on which version of Plesk you are running, the final file will look different. You must edit the service line and replace smtp with smtp_nonstandard. This line must come before the {, if there is one. Follow the existing file as a guideline.

     

    On the other hand, you will add the type and port lines. It does not matter where they are added in the list of other parameters.

    Sample smtp_nonstandard file:

    Filename: smtp_nonstandard

    service smtp_nonstandard
    	{
    		type		= UNLISTED
    		socket_type     = stream
    		protocol        = tcp
    		port		= 2525
    		wait            = no
    		disable		= no
    		user            = root
    		instances       = UNLIMITED
    		env             =  SMTPAUTH=1  POPLOCK_TIME=20
    		server          = /var/qmail/bin/tcp-env
    		server_args     = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
    	}
    
  6. Restart xinetd:
    /etc/init.d/xinetd restart
  7. You can now connect to the server and send mail over Port 2525. Other ports are possible, although 587 and 2525 are the most common. If you choose a different port, use a high number (higher than 10000) to avoid overriding a port used by a different service.

    To test your connection, try performing a telnet test on your new port from your computer.

See also

Parallels resources:

Link to a customer walkthrough for this same process:


User Comments

No visitor comments posted. Post a comment
Fields marked with an asterisk(*) are required. Comment on this article
Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue