depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. Change Postfix port number

    March 31, 2015 by The Man

    Sometimes you want to send out but not have every spammer try and send you rubbish on port 25 so changing to a non standard port helps with automated spammers.

    First edit the config file

    sudo nano etc/postfix/master.cf

    and find the line

    smtp inet n – n – – smtpd

    and change to

    9876 inet n – n – – smtpd

    and then save and restart Postfix

    sudo service postfix restart

    then if you need to check simply grep

    netstat -tanp | grep 9876

    which should give you at least a line like this

    tcp 0 0 0.0.0.0:9966 0.0.0.0:* LISTEN