Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
my postfix can only send email, but cannot receive email
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Tux's lil' helper
Tux's lil' helper

Joined: 01 Nov 2008
Posts: 89

PostPosted: Mon Jan 21, 2013 2:20 pm    Post subject: my postfix can only send email, but cannot receive email Reply with quote

I just installed postfix on my server with dovecot.

I can send email to outside, such as gmail.

I try to send an email from gmail to my server but failed.

The feedback from the gmail is:

This is an automatically generated Delivery Status Notification



Delivery to the following recipient has been delayed:

Message will be retried for 1 more day(s)

Technical details of temporary failure:
The recipient server did not accept our requests to connect. Learn more at
[(1) []:25: Connection timed out]

----- Original message -----

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113;
X-Received: by with SMTP id g7mr23221702paz.45.1358511809584;
Fri, 18 Jan 2013 04:23:29 -0800 (PST)
Return-Path: <>
Received: from [] ([])
by with ESMTPS id e6sm3357909paw.16.2013.
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Fri, 18 Jan 2013 04:23:28 -0800 (PST)
Message-ID: <>
Date: Fri, 18 Jan 2013 20:24:49 +0800
From: Urbain <>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20130104 Thunderbird/10.0.11
MIME-Version: 1.0
Subject: test from google + thunderbird
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

test from google + thunderbird

I worry about it is because I am behind NAT, but it seems that my webserver based on nginx is OK. I also set the MX record in my domain service provider. So now I really don't know why I cannot receive email from my postfix
Back to top
View user's profile Send private message

Joined: 17 Apr 2004
Posts: 4745
Location: Dark side of the mood

PostPosted: Tue Jan 22, 2013 5:02 pm    Post subject: Reply with quote

You need to forward port 25 to your mail server's IP. Also note in general you'll need a SPF (Sender Policy Framework) record to mark your mail server legitimate and prevent it from being denied sending mail. You'll also need to ask your ISP to add a reverse DNS record (i.e. a PTR record) with an IP that points back to . You need that because some mail servers use that information to decide whether to blacklist illegitimate mail servers. Also note that an MX server name may not be an alias.

Just ask back if you need more information.
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message

Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Thu Jan 31, 2013 7:43 am    Post subject: Reply with quote

(Moved from "Installing Gentoo" to "Networking & Security")

some ISP's will block inbound access to port 25 for their residential customers' IP address space
if your postfix is indeed already listening on 25:


netstat -tlnp

AND, you have already set up port forwarding on your router...

Then that would appear to be your problem.

I just tried connecting from my mail server, to your mail server, on port 25, and was not able:


# nmap -sT -p25 -P0 -vv

Starting Nmap 6.01 ( ) at 2013-01-31 01:39 CST
Initiating Parallel DNS resolution of 1 host. at 01:39
Completed Parallel DNS resolution of 1 host. at 01:39, 0.05s elapsed
Initiating Connect Scan at 01:39
Scanning ( [1 port]
Completed Connect Scan at 01:39, 2.00s elapsed (1 total ports)
Nmap scan report for (
Host is up.
Scanned at 2013-01-31 01:39:20 CST for 2s
25/tcp filtered smtp

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 2.14 seconds

So either your ISP, or, your router, or, your server's iptables, are blocking inbound port 25 traffic

*if it's your ISP, there is nothing you can do except for ask them to unblock port 25
*if it's your router, you will have to enable port forwarding for 25, same as youve done for nginx on port 80
*if it's your server's iptables, a basic iptables -I INPUT -p tcp --dport 25 -j ACCEPT should do the job
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message

Joined: 06 Aug 2003
Posts: 782
Location: Toronto

PostPosted: Thu Jan 31, 2013 10:23 pm    Post subject: Reply with quote

Try running this command...


I remember my postfix installation didn't work until I did that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum