Archive for the tag 'SMTP'

Enable Alternate Port other than 25 or 587 (via SSH) in Plesk

Make a copy of /etc/xinetd.d/smtp_psa. For this walkthrough the new filename created is smtp_nonstandard. A command like this should work:

cp /etc/xinetd.d/smtp_psa /etc/xinetd.d/smtp_nonstandard

Add these lines to the copy you just made:

vi /etc/xinetd.d/smtp_nonstandard

type = UNLISTED
port = 2525

and change the service name to match the name of the file. A sample smtp_nonstandard looks like this:

service = smtp_nonstandard
type = UNLISTED
socket_type = stream
protocol = tcp
port = 2525
wait = no
disable = no
user = root
instances = UNLIMITED
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

# Restart xinetd:

/etc/init.d/xinetd restart

# You should now be able to send mail through your server on port 2525. You may pick a different port if you use this method. We suggest choosing a high port number to avoid using commonly used ports on the internet.

Change SMTP source IP address in sendmail

1. Edit sendmail.cf search for ClientPortOptions

2. Change

#O ClientPortOptions=Family=inet, Address=x.x.x.x

to

O ClientPortOptions=Family=inet, Address=

3. Restart sendmail

4. Verify by sending a mail and checking the full header

CLIENT_OPTIONS(`field1=value1,field2=value2,…’) in sendmail.mc file is equivalent to ClientPortOptions in the sendmail.cf file.

SB-Shibu

How to change SMTP port in postfix

How to change SMTP port in postfix

The default SMTP port is 25. In Postfix we can change it to some other port (say 6000) using the following steps.

Open the file master.cf.

$ vi /etc/postfix/master.cf

Add the following line to the file.

6000 inet n - n - - smtpd

Restart postfix.

$ /etc/init.d/postfix restart

You can check the connection to the new port using telnet. Also make sure that the new port is not blocked in the server firewall.