Configuring Postfix for Incoming Connections Using a FreeBSD Jail

12th November, 2006Insights

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 bugmail@workingsoftware.com.au 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.

Read More Posts

BYOD and Cybersecurity: An In-Depth Analysis

BYOD and Cybersecurity: An In-Depth Analysis

Bring Your Own Device (BYOD) policies have become increasingly prevalent in Australian businesses, offering flexibility and cost savings. However, they also introduce complex cybersecurity challenges. In this article, we explore the cybersecurity implications of BYOD...

Using a Second Phone Number for Personal Use: Benefits and Risks

Using a Second Phone Number for Personal Use: Benefits and Risks

In today's connected world, balancing personal and professional life is more challenging than ever. One solution gaining popularity is the use of a second phone number for personal use. This approach, especially with solutions like BenkoPhone, offers several benefits...

Want to try BenkoPhone?