Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd February 2006, 09:50
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Exclamation SMTP-server seams tob e down within Postfix

My Debian server is located in a datacenter and the system ports for smtp, ssh, ftp, pop3, http are monitored.
When one of these processes is down, I will receive a sms on my mobile phone.
According my ISPConfig hosting-controlpanel everything is functioning fine.
And I do not have any problems with any of the running processes but …
everytime I receive a message from datacenter that my smtp is down.
Two minutes later or so, I receive a sms again that all running processes are running and that my server is fine. This happens again and again.

I have contacted the company in the datacenter, and they told me that when my smtp-server is not showing the initial greeting within 20 seconds, the monitoring system thinks that my smtp-server is down.

I think it has something to do with a setting within Postfix, I had a look at this problem, but it is not clear to me why this problem occurs.

Can anyone give me advise?

I would be very grateful.
Reply With Quote
Sponsored Links
  #2  
Old 23rd February 2006, 12:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

If you connect to your server with telnet on localhost, how much time does it take if you get the server greeting?

Another possibility might be that your postfix tries to resolve the domain of the monitoring serveice and thsi fails or took longer then 20 seconds.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 23rd February 2006, 14:21
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Post

Quote:
Originally Posted by till
If you connect to your server with telnet on localhost, how much time does it take if you get the server greeting?

Another possibility might be that your postfix tries to resolve the domain of the monitoring serveice and thsi fails or took longer then 20 seconds.
Till,
I have setup a telnet connection.
It took 28 seconds to establish the connection,
which is 8 seconds more then the 20 seconds i mentioned before.

Hans
Reply With Quote
  #4  
Old 23rd February 2006, 14:30
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Till,
I have setup a telnet connection.
It took 28 seconds to establish the connection,
which is 8 seconds more then the 20 seconds i mentioned before.

To be more precise:

It took me 28 sec. to reach my server from my pc at home to the server in the datacenter.
THe command i used was: telnet <ip-address> 25

On my server itself, it took almost no time.
I used the command: telnet localhost 25

Hans
Reply With Quote
  #5  
Old 23rd February 2006, 16:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Anything in the mail log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 23rd February 2006, 19:41
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Arrow logfile

Quote:
Originally Posted by falko
Anything in the mail log?
Falko,

The lines below is a copy of small piece of my /var/log/mail.log file.
As you can see, the first two lines there is a normal behaviour (connect/disconnect).
The next lines look strange to me, but i do not know why this accurs.
I hope you can help me.

Hans

---
Feb 23 07:15:58 server1 postfix/smtpd[4227]: connect from sms-monitor.transip.nl[80.69.67.10]
Feb 23 07:15:58 server1 postfix/smtpd[4227]: disconnect from sms-monitor.transip.nl[80.69.67.10]
Feb 23 07:17:55 server1 courierpop3login: Connection, ip=[::ffff:80.69.67.10]
Feb 23 07:17:55 server1 postfix/smtpd[4269]: unable to get certificate from '/etc/postfix/ssl/smtpd.crt'
Feb 23 07:17:55 server1 postfix/smtpd[4269]: 4269:error:02001002:system library:fopen:No such file or directory:bss_file.c:2$
Feb 23 07:17:55 server1 postfix/smtpd[4269]: 4269:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:280:
Feb 23 07:17:55 server1 postfix/smtpd[4269]: 4269:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:$
Feb 23 07:17:55 server1 postfix/smtpd[4269]: TLS engine: cannot load RSA cert/key data
Feb 23 07:17:55 server1 postfix/smtpd[4269]: connect from sms-monitor.transip.nl[80.69.67.10]
Feb 23 07:17:55 server1 postfix/smtpd[4269]: disconnect from sms-monitor.transip.nl[80.69.67.10]
---
Reply With Quote
  #7  
Old 23rd February 2006, 20:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

I guess the SSL certificates in your postfix configuration where missing. Are there any certificates in /etc/postfix/ssl/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 23rd February 2006, 20:33
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Question directory contents

Quote:
Originally Posted by till
I guess the SSL certificates in your postfix configuration where missing. Are there any certificates in /etc/postfix/ssl/
Till,

hereby i send you the directory contents of /etc/postfix/ssl
server1:/etc/postfix/ssl# dir
cacert.pem cakey.pem smtpd.csr smtpd.key


Is this ok or do i miss smtpd.crt ? If so, how can i correct the problem?

Hans

Last edited by Hans; 23rd February 2006 at 20:58.
Reply With Quote
  #9  
Old 23rd February 2006, 22:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by Hans
If so, how can i correct the problem?

Hans
Run these commands:

Code:
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
Then restart Postfix.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 24th February 2006, 10:39
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
 
Thumbs up

Quote:
Originally Posted by falko
Run these commands:

Code:
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
Then restart Postfix.
Falko,
Thank you so much!
It seems to be working now.

Hans
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Another Problem: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP bluegrass Installation/Configuration 24 8th March 2006 01:41
server blocked/stopped by host Ovidiu Technical 11 14th February 2006 10:50
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 10:01
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 18:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.