LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2014, 08:45 AM   #1
anon112
Member
 
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116

Rep: Reputation: 17
postfix keeps timing out all of a sudden


I've been using postfix for almost a year now automatically sending notifications to my email address regarding some startup statistics. For some reason, a couple of weeks ago, it stopped sending the emails and they just started accumulating in the queue. When I run mailq, I notice that it complains about the connection timing out. This happens on all three computers that postfix is running on. One of these machines has had literally nothing change in the past three months except for some security updates. Below is a copy of the script that I have the machine run to send the email on login.

Code:
#NOTE: my email has been removed from this code and replaced with <MY EMAIL ADDRESS@gmail.com>.
COMPUTER="mycomputer"
ping -c 1 -q 208.67.222.222;
NetStat=$?;
if [ $NetStat == 0 ]; then
    #<collect statistical information> (removed)
    #Send Information to ME:
    echo -e "The following information is related to $COMPUTER: \n <system startup statistics>" | mailx -s "Information for $COMPUTER" <MY EMAIL ADDRESS@gmail.com>
    fi
EDIT: here's some additional info that may be of use:
Code:
TERMINAL$ postconf -n
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/bin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydomain = HHHHHHcomputers
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix
sample_directory = /etc/postfix/sample
sendmail_path = /usr/bin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

Last edited by anon112; 11-16-2014 at 08:47 AM. Reason: more information
 
Old 11-18-2014, 06:39 AM   #2
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
If you do the following command on any of the machines having this issue, what does it tell you ?

mail -v youremail@gmail.com < /dev/null

It should give you the error which might help us further to help you

Also, if you do the following command, does it open the connection streem as well ?

telnet gmail-smtp-in.l.google.com 25

It MUST open up the TCP connection like :

[root@fw1 ~]# telnet gmail-smtp-in.l.google.com 25
Trying 74.125.206.27...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP ec1si20918507wib.101 - gsmtp
quit
221 2.0.0 closing connection ec1si20918507wib.101 - gsmtp
 
Old 11-18-2014, 09:40 AM   #3
anon112
Member
 
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116

Original Poster
Rep: Reputation: 17
output from mail -v **@gmail.com < /dev/null:

Quote:
--AEC66204190.1416324729/archmain.HHHHHHcomputers
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; archmain.HHHHHHcomputers
X-Postfix-Queue-ID: AEC66204190
X-Postfix-Sender: rfc822; USER@archmain.HHHHHHcomputers
Arrival-Date: Tue, 18 Nov 2014 10:29:38 -0500 (EST)

Final-Recipient: rfc822; <myemail>@gmail.com
Action: delayed
Status: 4.4.1
Diagnostic-Code: X-Postfix; connect to
alt4.gmail-smtp-in.l.google.com[74.125.24.27]:25: Connection timed out

--AEC66204190.1416324729/archmain.HHHHHHcomputers
Content-Description: Message Headers
Content-Type: text/rfc822-headers

Return-Path: <USER@archmain.HHHHHHcomputers>
Received: by archmain.HHHHHHcomputers (Postfix, from userid 1000)
id AEC66204190; Tue, 18 Nov 2014 10:29:38 -0500 (EST)
Date: Tue, 18 Nov 2014 10:29:38 -0500
To: <myemail>@gmail.com
User-Agent: mail v14.7.8
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <20141118152938.AEC66204190@archmain.HHHHHHcomputers>
From: USER@archmain.HHHHHHcomputers (USER)

--AEC66204190.1416324729/archmain.HHHHHHcomputers--
output from telnet:

Quote:
Trying 64.233.182.26...
Connection failed: Connection timed out
Trying 2607:f8b0:4001:c0a::1b...
telnet: Unable to connect to remote host: Network is unreachable
Although I'm not running telnet as root.
 
Old 11-20-2014, 01:49 AM   #4
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
Quote:
Originally Posted by kev717 View Post
output from mail -v **@gmail.com < /dev/null:



output from telnet:


Although I'm not running telnet as root.
With the telnet command, did you add the 25 at the end of the command, very important ?

Something is blocking outbound port 25 connections on your side.
DO you have a firewall on the server itself or between you and the internet ?
 
Old 11-20-2014, 05:36 AM   #5
anon112
Member
 
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116

Original Poster
Rep: Reputation: 17
Yes, my telnet command is for port 25 (I made sure of it).

Like I've said, nothing has specifically changed from when it stopped working. I have a testing machine (with no firewall) that I only do security updates to and it also has this issue. I've tried adding new rules to iptables, however nothing seems to change.

All I really have between my computer and the internet (aside from internal firewall, which I checked) is an old belkin router, but it has never been an issue for me.

Last edited by anon112; 11-20-2014 at 05:43 AM.
 
Old 11-27-2014, 04:04 AM   #6
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
Has this been solved yet buddy ?

You definitely have a "firewall" somewhere blocking your connections.

If you do a iptables -L -n on the postfix server, does it have rules running? If it does, should it ?
 
Old 11-27-2014, 06:51 AM   #7
anon112
Member
 
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116

Original Poster
Rep: Reputation: 17
I've tried disabling all security features (iptables, firewalls, etc) and it doesn't help. I'm thinking that perhaps my ISP is doing something (although they've assured me that they aren't)
 
  


Reply

Tags
mailx, postfix, sendmail, timeouts


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix connection is timing out? trying to send email to my network to yahoo address cyberdome Linux - Server 1 04-01-2014 12:55 PM
timing in c adixon Programming 11 11-16-2010 08:15 PM
Postfix: postfix: fatal: chdir(/usr/libexec/postfix) Micro420 Ubuntu 2 07-13-2008 12:21 PM
how to start timing and print the timing result on portions of java codes ?? alred Programming 2 05-15-2006 10:00 AM
timing in c++ deveraux83 Programming 2 04-20-2004 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration