|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: "Advanced" header filtering with TCP map
From: Michael Tokarev (mjt
tls.msk.ru)
Date: Tue May 13 2003 - 16:08:06 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Vivek Khera wrote:
>>>>>>"MT" == Michael Tokarev <mjt
tls.msk.ru> writes:
>
> MT> cleanup may be "hacked" to request e.g. "start"
> MT> word at the beginning of headers, and empty value
> MT> at the end.
>
> This would force a 1-to-1 mapping of clients to servers. Having state
> could be useful, but it seems it would impose significant cost on the
> system to have one server per client during this transaction.
>
> Perhaps you could distinguish each session by the remote socket ID and
> postfix only hold the connection open during a single message?
Vivek, this is already here. Each cleanup does one TCP connection to
the map handler, and passes something like this as one stream (or,
rather, series of lines):
get Received: from hobbit.corpit.ru (hobbit.corpit.ru [217.23.134.194])%0A%09by paltus.tls.msk.ru (Postfix) with ESMTP id EEA6812ED6%0A%09for <deo
corpit.ru>; Tue, 13 May 2003 20:29:07 +0400 (MSD)%0A%09(envelope-from cygwin-return-74110-deo=corpit.ru
cygwin.com)\n
get Received: from sources.redhat.com (sources.redhat.com [66.187.233.205])%0A%09by hobbit.corpit.ru (Postfix) with SMTP id 664D37C10%0A%09for <deo
corpit.ru>; Tue, 13 May 2003 20:29:04 +0400 (MSD)%0A%09(envelope-from cygwin-return-74110-deo=corpit.ru
cygwin.com)\n
get Received: (qmail 16979 invoked by alias); 13 May 2003 16:26:33 -0000\n
get Mailing-List: contact cygwin-help
cygwin.com; run by ezmlm\n
get Precedence: bulk\n
...
get Date: Tue, 13 May 2003 12:26:31 -0400 (EDT)\n
get From: Igor Pechtchanski <pechtcha
cs.nyu.edu>\n
get Reply-To: cygwin
cygwin.com\n
get To: Randall R Schulz <rschulz
sonic.net>\n
get Cc: cygwin
cygwin.com\n
get Subject: RE: HELP: with sshd/multi-user \n
get In-Reply-To: <5.2.1.1.2.20030513090902.00fedda0
pop.sonic.net>\n
get Message-ID: <Pine.GSO.4.44.0305131222190.393-100000
slinky.cs.nyu.edu>\n
get Importance: Normal\n
get Content-Type: TEXT/PLAIN; charset=US-ASCII\n
..new message here..
get Received: from hobbit.corpit.ru (hobbit.corpit.ru [217.23.134.194])%0A%09by paltus.tls.msk.ru (Postfix) with ESMTP id 2C15912ED6%0A%09for <mjt+proxy
corpit.ru>; Tue, 13 May 2003 20:30:05 +0400 (MSD)%0A%09(envelope-from mjt
corpit.ru)\n
get Received: by hobbit.corpit.ru (Postfix, from userid 1000)%0A%09id 485B57C10; Tue, 13 May 2003 20:30:02 +0400 (MSD)\n
get To: mjt+proxy
corpit.ru\n
get Subject: proxy 2003-05-13 16:30\n
get Message-Id: <20030513163002.485B57C10
hobbit.corpit.ru>\n
get Date: Tue, 13 May 2003 20:30:02 +0400 (MSD)\n
get From: mjt
corpit.ru (Michael Tokarev)\n
..new message here..
get Received: from hobbit.corpit.ru (hobbit.corpit.ru [217.23.134.194])%0A%09by paltus.tls.msk.ru (Postfix) with ESMTP id 1725A12ED6%0A%09for <deo
corpit.ru>; Tue, 13 May 2003 20:30:59 +0400 (MSD)%0A%09(envelope-from cygwin-return-74111-deo=corpit.ru
cygwin.com)\n
...
this is one stream. it's TRIVIAL to keep state assotiated with
each open connection (accepted socket) - provided we can see where
one set of headers ends and another begins, AND when we may reply
to end of headers too. Ditto for body - almost - esp. when all
headers/mime/body checks are done in the same stream (and indeed
that's the case as postfix opens only one map instance).
/mjt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]