When attempting to run Postfix on macOS Yosemite, many developers encounter the critical error:
postfix/master[39799]: fatal: bind fe80::1 port 25: Can't assign requested address
This occurs because Postfix tries to bind to the IPv6 loopback address (fe80::1) by default, which isn't properly configured in Yosemite's network stack.
macOS Yosemite has known IPv6 implementation quirks. The fe80::1 address is technically a link-local address, not a true loopback like ::1. When Postfix attempts to bind to it, the OS rejects the request with EADDRNOTAVAIL.
Solution 1: Force IPv4 Only
Edit /etc/postfix/main.cf:
inet_protocols = ipv4
inet_interfaces = 127.0.0.1
Then restart Postfix:
sudo postfix stop
sudo postfix start
Solution 2: Proper IPv6 Configuration
If you need IPv6 support, first verify your interface:
ifconfig | grep inet6
Then modify main.cf:
inet_interfaces = localhost
inet_protocols = all
For system-level integration, create /Library/LaunchDaemons/org.postfix.master.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.postfix.master</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/postfix/master</string>
<string>-c</string>
<string>/etc/postfix</string>
<string>-D</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>MAIL_CONFIG</key>
<string>/etc/postfix</string>
</dict>
<key>QueueDirectories</key>
<array>
<string>/usr/libexec/postfix/queue</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>AbandonProcessGroup</key>
<true/>
</dict>
</plist>
Then load it:
sudo launchctl load -w /Library/LaunchDaemons/org.postfix.master.plist
After applying any solution, verify Postfix is running:
sudo lsof -i :25
Check logs for errors:
tail -f /var/log/mail.log
Test SMTP locally:
telnet localhost 25
When attempting to run Postfix on macOS Yosemite, you might encounter the following error in your logs:
*** postfix/master[39799]: fatal: bind fe80::1 port 25: Can't assign requested address
This occurs because Postfix is trying to bind to the IPv6 loopback address (fe80::1) but fails due to system configuration issues.
macOS Yosemite has some peculiarities with IPv6 configuration:
- The fe80::1 address might not be properly assigned to your loopback interface
- IPv6 might be disabled at the system level
- Postfix configuration might be forcing IPv6 when it's not available
Edit your main.cf file:
sudo nano /etc/postfix/main.cf
Add or modify these lines:
inet_protocols = ipv4 inet_interfaces = loopback-only
Then restart Postfix:
sudo postfix stop sudo postfix start
If you need IPv6 support, first verify your interfaces:
ifconfig lo0
You should see something like:
lo0: flags=8049mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
If the IPv6 address is missing, you can add it manually:
sudo ifconfig lo0 inet6 fe80::1 prefixlen 64 alias
After making changes, verify Postfix is listening correctly:
sudo lsof -i :25
You should see output similar to:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME master 12345 root 12u IPv4 0xabcdef123456789 0t0 TCP localhost:smtp (LISTEN)
To make the IPv6 loopback address persistent across reboots, create or edit:
sudo nano /etc/rc.local
Add this line:
ifconfig lo0 inet6 fe80::1 prefixlen 64 alias
Make the file executable:
sudo chmod +x /etc/rc.local
If you're still having issues, try these diagnostic commands:
postconf -n netstat -an | grep 25 sysctl net.inet6.ip6.forwarding