Distroname and release: Debian Squeeze
Postfix and submission
It is possible to get postfix to listen on an additional port other than the default port 25.Originally I needed this because my mobile device provider was blocking for port 25, so I was unable sent e-mails from my mobile device when I was on a mobile data network, like 3G.
An easy fix is to add the submission port to postfix.
Add the following line to /etc/postfix/master.cf or edit the line if it is already there.Most likely you should just remove the comment mark (#).
Create it in the service section of master.cf.
Please note that the (n) is replaced with the an (-) in the fith collum.
This is done because we want to have this in chroot as well.
It is important if you just remove the comment mark (#), that you remember to change this.
587 inet n - - - - smtpd
It should be showing something like this afterwards.
/etc/postfix/master.cf
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
587 inet n - - - - smtpd
Restart postfix, after making the changes.
#/etc/init.d/postfix restart
Testing for open relay: (This is quite important)
It is important to also test the submission port for open relay or else you will get some unwanted traffic on your MTA very soon, and most likely get blacklisted or greylisted.
Just test with telnet. It should come up with "250-AUTH=LOGIN PLAIN", and you should be safe.
Example of the test with a successfull result.
#telnet localhost 587 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 mail.example.com ESMTP ehlo mail.example.com 250-mail.example.com 250-PIPELINING 250-SIZE 26214400 250-ETRN 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN