Enabling postfix to allow email forwarders

I'm trying to setup postfix to create forwarding accounts for a client who wants emails to their new domain to forward to their existing account on an old domain.

I've configured postfix for this and I know it's running via netstat:

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 9980/master

I've checked the firewall via iptables -L -v -n | grep :25

0 0 ACCEPT tcp – * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25

but when I test it via telnet from my own machine I get:

telnet 176.58.103.165 25

Trying 176.58.103.165…

telnet: connect to address 176.58.103.165: Operation timed out

I've also trying setting it up on port 587 but it just says Connection refused.

What am I doing wrong?

3 Replies

Firstly postfix is only listening on 127.0.0.1 so it won't accept other addresses.

eg

% telnet 176.58.103.165 25
Trying 176.58.103.165...
telnet: Unable to connect to remote host: Connection refused

The timeout you're seeing is because of a firewall. Clearly I didn't hit that firewall when I just did my test. Where did you try to connect from? If a home machine then be aware that many ISPs block outgoing port 25 these days.

Thanks sweh. I managed to get it listening globally rather than just locally by setting: inet_interfaces = all

I'm now nervous about accidentally setting up an open relay. How do I set it up to make forwarder emails for a couple of domains e.g. info@example.com -> example@gmail.com without contributing to spam?

I'm particularly concerned about "mydestination"

@creativetags:

I'm now nervous about accidentally setting up an open relay.
There are plenty of websites you can use to test for an open relay situation. I use http://www.mxtoolbox.com/diagnostic.aspx

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct