DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th November 2012
comet--berkeley comet--berkeley is offline
Real Name: Richard
Package Pilot
 
Join Date: Apr 2009
Location: California
Posts: 163
Default OpenSMTPD MTA error: 150 connection timeout

A mail server that I frequently send to decided to make all incoming connections wait
for 40 seconds before replying. (to slow down spammers?)

This broke the alpine MTA as well as breaking OpenSMTPD on OpenBSD 5.1-stable.

Alpine was fixed by adding a parameter to the .pinerc configuration:

tcp-open-timeout=50

This allowed the initial tcp connection from alpine to socket 25 to wait for 50
seconds before giving up.

Unfortunately I have no similar solution for OpenSMTPD.

I would like to be able to change a parameter in the smtpd.conf file and set the
mta tcp connection timeout to 50 seconds.

(RFC 5321 section 4.5.3.2 states "Timeouts SHOULD be easily reconfigurable, preferably without recompiling the SMTP code.")

From looking at the OpenSMTPD source code it appears that 10 seconds is hard coded for the timeout.
( function mta_enter_state(), io_set_timeout(&s->io, 10000); )

I will probably go back to using sendmail on OpenBSD where I can change a configuration parameter to fix the problem...
Reply With Quote
  #2   (View Single Post)  
Old 24th November 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I recommend sending a note to gilles@ and eric@ regarding this.

OpenSMPTD is in development, and your requirement may already be on their to-do list.
Reply With Quote
  #3   (View Single Post)  
Old 25th November 2012
comet--berkeley comet--berkeley is offline
Real Name: Richard
Package Pilot
 
Join Date: Apr 2009
Location: California
Posts: 163
Default

Thanks jggimi.

I got a response from Gilles that he recognizes the problem and is trying to figure out the best way to allow for a configuration change.
Reply With Quote
  #4   (View Single Post)  
Old 28th November 2012
comet--berkeley comet--berkeley is offline
Real Name: Richard
Package Pilot
 
Join Date: Apr 2009
Location: California
Posts: 163
Smile

I was able to fix the problem on my own.

While upgrading to 5.2-stable, I changed one line of code.

In /usr/src/usr.sbin/smtpd/mta_session.c:

old: io_set_timeout(&s->io, 10000);
new: io_set_timeout(&s->io, 300000);

So the timeout is 5 minutes instead of 10 seconds and it works fine.
Reply With Quote
Reply

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
Working dial-up connection - No Client Connection vigol FreeBSD General 5 22nd November 2009 10:59 PM
uw-imap connection timeout andrewm OpenBSD Packages and Ports 4 22nd October 2009 11:03 AM
Openbsd 4.5 network connection timeout andrewm OpenBSD General 4 11th September 2009 02:32 AM
ILLEGAL REQUEST, PCI Error, SET_MULTI timeout - boot errors help kTk FreeBSD General 1 26th July 2008 03:34 AM
Error 504 gateway timeout bsdbsd FreeBSD General 0 15th June 2008 01:06 PM


All times are GMT. The time now is 03:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick