Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with sending mail

765 views
Skip to first unread message

karnivpa...@gmail.com

unread,
Jan 13, 2015, 7:43:38 AM1/13/15
to
Hello All

I am using postfix for mail
When i am sending any mail then it's give me error status=bounced & stat=User unknown
Change in /etc/postfix/main.cf
From inet_interfaces = localhost
to inet_interfaces = all

OS : Centos6.4

I was getting the following in /var/log/maillog

Jan 13 07:23:58 XXXX sendmail[18838]: t0DCNwOC018838: from=root, size=221, class=0, nrcpts=1, msgid=<201501131223....@domain.com>, relay=root@localhost
Jan 13 07:23:58 XXXX postfix/smtpd[18839]: connect from localhost[127.0.0.1]
Jan 13 07:23:58 XXXX postfix/smtpd[18839]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <em...@domain.com>: Recipient address rejected: User unknown in local recipient table; from=<ro...@XXXX.com> to=<em...@domain.com> proto=ESMTP helo=<XXXX.com>
Jan 13 07:23:58 XXXX sendmail[18838]: t0DCNwOC018838: to=em...@domain.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30221, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown

[root@XXXX ~]# traceroute -n -T -p 25 gmail-smtp-in.l.google.com
OUTPUT:
traceroute to gmail-smtp-in.l.google.com (74.125.192.27), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *

Waiting for a positive response.
Any kind of help would be appreciated.

Thanks,
Karniv Patel
System Administrator

Burkhard Ott

unread,
Jan 13, 2015, 10:44:19 PM1/13/15
to
On Tue, 13 Jan 2015 04:43:36 -0800, karnivpatel.ocla wrote:


> I was getting the following in /var/log/maillog
>
> Jan 13 07:23:58 XXXX sendmail[18838]: t0DCNwOC018838: from=root,
> size=221, class=0, nrcpts=1,
> msgid=<201501131223....@domain.com>, relay=root@localhost Jan
> 13 07:23:58 XXXX postfix/smtpd[18839]: connect from localhost[127.0.0.1]
> Jan 13 07:23:58 XXXX postfix/smtpd[18839]: NOQUEUE: reject: RCPT from
> localhost[127.0.0.1]: 550 5.1.1 <em...@domain.com>: Recipient address
> rejected: User unknown in local recipient table; from=<ro...@XXXX.com>
> to=<em...@domain.com> proto=ESMTP helo=<XXXX.com>
> Jan 13 07:23:58 XXXX sendmail[18838]: t0DCNwOC018838:
> to=em...@domain.com, ctladdr=root (0/0), delay=00:00:00,
> xdelay=00:00:00, mailer=relay, pri=30221, relay=[127.0.0.1] [127.0.0.1],
> dsn=5.1.1, stat=User unknown

The user email is unknown on the system which handles @domain.com.


> [root@XXXX ~]# traceroute -n -T -p 25 gmail-smtp-in.l.google.com OUTPUT:
> traceroute to gmail-smtp-in.l.google.com (74.125.192.27), 30 hops max,

Why are you check your route to google, you have an MTA config problem
and check your routes?

Byu the way your firewall seems to block traceroute, thats why you see *
and I get the response times :).

> Karniv Patel System Administrator

Seaturtle, sea creature :D


cheers


Patel Karniv

unread,
Jan 20, 2015, 11:58:08 PM1/20/15
to
Hello Burkhard Ott,

Thanks for quick reply.

I got mail within the network, but not getting mail from outside network.
What is the issue?? i don't know,
Please give me proper suggestion.

# tail -f /var/log/maillog
connect to alt1.gmail-smtp-in.l.google.com[64.233.186.26]:25: Connection timed out
connect to alt1.gmail-smtp-in.l.google.com[64.233.186.26]:25: Connection timed out
connect to alt1.gmail-smtp-in.l.google.com[64.233.186.27]:25: Connection timed out
connect to mta5.am0.yahoodns.net[98.138.112.34]:25: Connection timed out
connect to alt1.gmail-smtp-in.l.google.com[64.233.186.27]:25: Connection timed out
connect to alt1.gmail-smtp-in.l.google.com[64.233.186.27]:25: Connection timed out
connect to mta6.am0.yahoodns.net[66.196.118.33]:25: Connection timed out
connect to mta7.am0.yahoodns.net[66.196.118.35]:25: Connection timed out

# ping alt1.gmail-smtp-in.l.google.com
PING alt1.gmail-smtp-in.l.google.com (64.233.186.26) 56(84) bytes of data.
64 bytes from 64.233.186.26: icmp_seq=1 ttl=47 time=164 ms
64 bytes from 64.233.186.26: icmp_seq=2 ttl=47 time=164 ms
64 bytes from 64.233.186.26: icmp_seq=3 ttl=47 time=164 ms
^C
--- alt1.gmail-smtp-in.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2488ms
rtt min/avg/max/mdev = 164.629/164.663/164.688/0.024 ms

# ping mta7.am0.yahoodns.net
PING mta7.am0.yahoodns.net (66.196.118.33) 56(84) bytes of data.
64 bytes from mta-v1.mail.vip.bf1.yahoo.com (66.196.118.33): icmp_seq=1 ttl=47 time=44.1 ms
64 bytes from mta-v1.mail.vip.bf1.yahoo.com (66.196.118.33): icmp_seq=2 ttl=47 time=44.1 ms
^C
--- mta7.am0.yahoodns.net ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1696ms
rtt min/avg/max/mdev = 44.163/44.179/44.195/0.016 ms


# traceroute alt1.gmail-smtp-in.l.google.com
traceroute to alt1.gmail-smtp-in.l.google.com (64.233.186.26), 30 hops max, 60 byte packets
1 1-164-111-65.serverpronto.com (65.111.164.1) 0.540 ms 1.324 ms 1.619 ms
2 GW-10G-WEST-MIA.serverpronto.com (69.60.96.97) 108.715 ms 108.753 ms 108.796 ms
3 xe-10-0-0.edge4.Miami1.Level3.net (4.59.90.89) 0.405 ms 0.389 ms 0.368 ms
4 ae-2-52.edge1.Miami2.Level3.net (4.69.138.107) 0.371 ms 0.406 ms 0.385 ms
5 4.68.70.118 (4.68.70.118) 0.394 ms 0.382 ms 0.464 ms
6 209.85.253.74 (209.85.253.74) 0.475 ms 209.85.253.118 (209.85.253.118) 2.573 ms 2.576 ms
7 209.85.250.111 (209.85.250.111) 109.610 ms 209.85.245.55 (209.85.245.55) 109.050 ms 209.85.250.111 (209.85.250.111) 111.657 ms
8 209.85.255.88 (209.85.255.88) 116.936 ms 209.85.245.50 (209.85.245.50) 110.486 ms 112.308 ms
9 216.239.43.47 (216.239.43.47) 166.998 ms 166.971 ms 64.233.175.5 (64.233.175.5) 153.821 ms
10 72.14.234.185 (72.14.234.185) 157.091 ms 157.083 ms 154.443 ms
11 * * *
12 64.233.186.26 (64.233.186.26) 153.663 ms 153.458 ms 153.450 ms

Burkhard Ott

unread,
Jan 21, 2015, 9:06:32 PM1/21/15
to
On Tue, 20 Jan 2015 20:58:06 -0800, Patel Karniv wrote:

> onnect to alt1.gmail-smtp-in.l.google.com[64.233.186.26]:25: Connection
> timed out

IPtables?

Check if you can 'telnet 64.233.186.26 25' from that host.
If it's not iptables, check if (assuming you have a firewall in between)
the fw after the mta allows smtp to google.

cheers

Patel Karniv

unread,
Jan 22, 2015, 12:00:27 AM1/22/15
to
On Tuesday, January 13, 2015 at 6:13:38 PM UTC+5:30, Patel Karniv wrote:
Thanks for your Reply,

# /etc/init.d/iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]

# /etc/init.d/iptables status
iptables: Firewall is not running.

# telnet 64.233.186.26 25
Trying 64.233.186.26...
telnet: connect to address 64.233.186.26: Connection timed out

# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 domain.com ESMTP Postfix
421 4.4.2 domain.com Error: timeout exceeded
Connection closed by foreign host.

# tail -f /var/log/maillog
postfix/smtp[21730]: 61E0A3583CC: to=<mbi...@yahoo.co>, relay=none, delay=410337, delays=410217/0.03/120/0, dsn=4.4.1, status=deferred (connect to yahoo.co[98.137.236.150]:25: Connection timed out)
postfix/smtp[21984]: connect to gmail-smtp-in.l.google.com[2607:f8b0:4002:c05::1b]:25: Connection timed out

There is no any firewall.

Thanks,
Karniv Patel

Burkhard Ott

unread,
Jan 22, 2015, 9:22:52 PM1/22/15
to
On Wed, 21 Jan 2015 21:00:25 -0800, Patel Karniv wrote:

> # /etc/init.d/iptables status iptables: Firewall is not running.
>
> # telnet 64.233.186.26 25 Trying 64.233.186.26...
> telnet: connect to address 64.233.186.26: Connection timed out
>
> # telnet localhost 25 Trying ::1...
> Connected to localhost.
> Escape character is '^]'.
> 220 domain.com ESMTP Postfix 421 4.4.2 domain.com Error: timeout
> exceeded Connection closed by foreign host.
>
> # tail -f /var/log/maillog postfix/smtp[21730]: 61E0A3583CC:
> to=<mbi...@yahoo.co>, relay=none, delay=410337,
> delays=410217/0.03/120/0, dsn=4.4.1, status=deferred (connect to
> yahoo.co[98.137.236.150]:25: Connection timed out)
> postfix/smtp[21984]: connect to
> gmail-smtp-in.l.google.com[2607:f8b0:4002:c05::1b]:25: Connection timed
> out
>
> There is no any firewall.

Not locally.

> # telnet 64.233.186.26 25 Trying 64.233.186.26...
> telnet: connect to address 64.233.186.26: Connection timed out

Doesn't ring a bell?
If you can't use the servers port via telnet, how is postfix supposed to
do that?
You could check with traceroute how far you come.

Patel Karniv

unread,
Jan 23, 2015, 1:41:50 AM1/23/15
to
On Tuesday, January 13, 2015 at 6:13:38 PM UTC+5:30, Patel Karniv wrote:
Hello Burkhard Ott,
Thanks for your quick reply,
It's connecting to localhost on port 25

# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 domain.com ESMTP Postfix
ehlo localhost
250-inextrix.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:root
250 2.1.0 Ok
rcpt to:karniv
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as 3DCA2374183
quit
221 2.0.0 Bye
Connection closed by foreign host.

You can check also
# traceroute google.com
traceroute to google.com (216.58.219.174), 30 hops max, 60 byte packets
1 1-164-111-65.serverpronto.com (65.111.164.1) 0.542 ms 1.144 ms 1.440 ms
2 GW-10G-WEST-MIA.serverpronto.com (69.60.96.97) 0.307 ms 0.350 ms 0.394 ms
3 xe-10-0-0.edge4.Miami1.Level3.net (4.59.90.89) 23.859 ms 23.858 ms 23.837 ms
4 * * *
5 4.68.70.118 (4.68.70.118) 0.454 ms 0.464 ms 0.438 ms
6 209.85.253.118 (209.85.253.118) 25.273 ms 25.194 ms 0.509 ms
7 72.14.235.211 (72.14.235.211) 0.607 ms 0.626 ms 0.564 ms
8 mia07s27-in-f14.1e100.net (216.58.219.174) 0.521 ms 0.484 ms 0.541 ms

# traceroute gmail.com
traceroute to gmail.com (216.58.219.69), 30 hops max, 60 byte packets
1 1-164-111-65.serverpronto.com (65.111.164.1) 0.599 ms 1.208 ms 1.518 ms
2 GW-10G-WEST-MIA.serverpronto.com (69.60.96.97) 0.284 ms 0.332 ms 0.383 ms
3 xe-10-0-0.edge4.Miami1.Level3.net (4.59.90.89) 21.006 ms 20.994 ms 20.978 ms
4 ae-1-51.edge1.Miami2.Level3.net (4.69.138.75) 23.451 ms 23.442 ms 23.464 ms
5 4.68.70.118 (4.68.70.118) 0.440 ms 0.375 ms 0.425 ms
6 209.85.253.74 (209.85.253.74) 0.515 ms 0.478 ms 0.482 ms
7 72.14.233.233 (72.14.233.233) 0.582 ms 0.578 ms 0.540 ms
8 mia07s24-in-f5.1e100.net (216.58.219.69) 0.463 ms 0.462 ms 0.461 ms

# traceroute yahoo.com
traceroute to yahoo.com (98.139.183.24), 30 hops max, 60 byte packets
1 1-164-111-65.serverpronto.com (65.111.164.1) 13.222 ms 13.509 ms 13.810 ms
2 GW-10G-WEST-MIA.serverpronto.com (69.60.96.97) 0.305 ms 0.348 ms 0.394 ms
3 te0-0-1-0.nr11.b015452-0.mia01.atlas.cogentco.com (38.104.90.49) 0.787 ms 0.931 ms 0.977 ms
4 te0-0-1-1.agr12.mia01.atlas.cogentco.com (154.24.31.61) 0.857 ms te0-0-1-1.agr11.mia01.atlas.cogentco.com (154.24.31.57) 0.861 ms te0-0-1-1.agr12.mia01.atlas.cogentco.com (154.24.31.61) 0.903 ms
5 te0-4-1-0.ccr22.mia01.atlas.cogentco.com (154.54.3.173) 0.704 ms te0-4-1-0.ccr21.mia01.atlas.cogentco.com (66.28.4.217) 0.801 ms te0-4-0-0.ccr22.mia01.atlas.cogentco.com (154.54.1.169) 0.712 ms
6 be2055.ccr21.mia03.atlas.cogentco.com (154.54.24.234) 1.077 ms te0-6-0-0.ccr22.mia03.atlas.cogentco.com (154.54.80.50) 0.898 ms be2055.ccr21.mia03.atlas.cogentco.com (154.54.24.234) 0.958 ms
7 te7-1.mag01.mia03.atlas.cogentco.com (154.54.47.154) 40.886 ms te4-2.mag01.mia03.atlas.cogentco.com (154.54.6.57) 40.578 ms te7-1.mag01.mia03.atlas.cogentco.com (154.54.47.154) 40.607 ms
8 yahoo.mia03.atlas.cogentco.com (154.54.13.250) 0.800 ms 0.700 ms 0.759 ms
9 so-0-0-0.pat1.dce.yahoo.com (216.115.96.22) 27.599 ms 27.596 ms 27.572 ms
10 ae-4-0.pat1.nyc.yahoo.com (216.115.104.121) 33.518 ms 33.467 ms 33.728 ms
11 ae-5.pat2.bfz.yahoo.com (216.115.96.67) 41.641 ms ae-2.pat1.bfz.yahoo.com (216.115.100.26) 43.940 ms ae-5.pat2.bfz.yahoo.com (216.115.96.67) 41.553 ms
12 ae-4.msr1.bf1.yahoo.com (216.115.100.25) 61.342 ms ae-3.msr1.bf1.yahoo.com (216.115.100.29) 46.444 ms ae-4.msr1.bf1.yahoo.com (216.115.100.25) 41.852 ms
13 xe-2-0-1.clr1-a-gdc.bf1.yahoo.com (98.139.130.5) 44.278 ms UNKNOWN-98-139-128-X.yahoo.com (98.139.128.19) 46.766 ms xe-11-1-1.clr1-a-gdc.bf1.yahoo.com (98.139.128.17) 46.621 ms
14 et-17-1.fab6-1-gdc.bf1.yahoo.com (98.139.128.47) 44.590 ms UNKNOWN-98-139-128-X.yahoo.com (98.139.128.83) 46.761 ms et-18-25.fab2-1-gdc.bf1.yahoo.com (98.139.128.55) 46.950 ms
15 po-9.bas1-7-prd.bf1.yahoo.com (98.139.129.145) 45.057 ms po-11.bas1-7-prd.bf1.yahoo.com (98.139.129.177) 42.423 ms po-13.bas1-7-prd.bf1.yahoo.com (98.139.129.209) 42.783 ms

# netstat -ntpul | grep master
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 1461/postmaster
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 19100/master
tcp 0 0 :::5432 :::* LISTEN 1461/postmaster
tcp 0 0 :::25 :::* LISTEN 19100/master

# netstat -ntpul | grep dovecot
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 19114/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 19114/dovecot
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 19114/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 19114/dovecot
tcp 0 0 :::110 :::* LISTEN 19114/dovecot
tcp 0 0 :::143 :::* LISTEN 19114/dovecot
tcp 0 0 :::993 :::* LISTEN 19114/dovecot
tcp 0 0 :::995 :::* LISTEN 19114/dovecot

All are working fine otherwise i got "status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1a]:25: Connection timed out)"

Burkhard Ott

unread,
Jan 23, 2015, 9:43:29 PM1/23/15
to
On Thu, 22 Jan 2015 22:41:48 -0800, Patel Karniv wrote:

> All are working fine otherwise i got "status=deferred (connect to
> alt2.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1a]:25: Connection
> timed out)"
>
> Waiting for a positive response.
> Any kind of help would be appreciated.

Ok, the traceroute shows you that you reach the host, but the connection
timeout tells you that you can't connect to port 25 there.
Did you test if you can connect to another MTA on port 25?
Google is not blocking it, that's why I think you have after your MTA a
portfilter which just drops the packets.

Trying 2607:f8b0:400d:c00::1b...
Connected to alt2.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP x5si442834qad.71 - gsmtp
quit


I know that a few stupid ISP's do that in the belleive it reduces spam,
just check with your ISP. If that's the case I generally recommend to
either cut the price by 50% (you can only use half of the internet and
they filter your traffic) or switch to an ISP who understands what the
obligations of an ISP are.

Your localhost connection wil always work, except if your MTA is stopped.

cheers hope it helps.
0 new messages