When I configured FreeBSD jails, I added this line to /usr/local/etc/postfix/main.cf:

inet_interfaces = $myhostname, localhost

This stops postfix from listening on all network interfaces on the machine, and means that jail processes can run separate postfix instances.

However, I didn’t use this machine to receive incoming mail at first, only for sending mail out through a relay (mostly from web applications).

I want to start using this machine as my main mail server, and also wanted to have [email protected] deliver mail to the Bugzilla mail interface script, but even though postfix was listening on port 25, as shown by this command and the corresponding output:

socata# lsof -i tcp:25

#OUTPUT:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 1003 root 11u IPv4 0xc505c740 0t0 TCP dk.iaindooley.com:smtp (LISTEN)
master 1330 root 11u IPv4 0xc53fb1d0 0t0 TCP ap.iaindooley.com:smtp (LISTEN)
master 19196 root 11u IPv4 0xc505b570 0t0 TCP localhost.iaindooley.com:smtp (LISTEN)

I was unable to connect on port 25. I couldn’t figure out how to fix it, but adding this line to /usr/local/etc/postfix/master.cf seems to work:

socata.scoastnet.com.au:smtp inet n - n - - smtpd

and I can now see this process listening on port 25:

socata# lsof -i tcp:25

#OUTPUT:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 1003 root 11u IPv4 0xc505c740 0t0 TCP dk.iaindooley.com:smtp (LISTEN)
master 1330 root 11u IPv4 0xc53fb1d0 0t0 TCP ap.iaindooley.com:smtp (LISTEN)
master 19196 root 11u IPv4 0xc505b570 0t0 TCP localhost.iaindooley.com:smtp (LISTEN)
master 19196 root 14u IPv4 0xc5671740 0t0 TCP socata.scoastnet.com.au:smtp (LISTEN)

telnet socata.scoastnet.com.au 25 now works also, so I assume this has done the trick.