tag 309462 + upstream
thanks

Hi,

John:

I am one of the Debian maintainers for your Swaks program. We got a
feature request from one of the users:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=309462

Marcin is requesting Swaks to have also the functionality to connect
to a pipe instead of opening a socket to conduct the SMTP
transaction. I started working on it - The patch is simple, but quite
invasive - The only way I could implement it is by conditionally
creating either the socket (as currently) with this simple
modification: 

  my $s_tmp   = IO::Socket::INET->new( PeerAddr  => $host, PeerPort => $port,
                                       Proto     => 'tcp', Timeout  => $timeout,
                                       LocalAddr => $lint);
  $s = {rd => $s_tmp, wr => $s_tmp};

If a pipe is requested, instead of the socket we create a pair of
IO::Handle objects, as pipes can only be opened unidirectionally, +-
this way: 

    my ($server_rd,$server_wr) = (IO::Handle->new,IO::Handle->new);
    open2($server_rd,$server_wr,$pipecmd);
    $s = {rd => $server_rd, wr => $server_wr};

Reviewing the code, it is not _that_ invasive - You fortunately have
shielded away all interaction with the socket in transact() - so it
would basically mean checking for the connection type (even forgetting
about the first snippet I wrote, sorry). 

Ok... What does this boil to in the end? I can do the patch... But I'd
rather have it integrated upstream. Do you like the idea? Do you want
me to send you the patch, or is this description enough and you prefer
to roll it out on your own?

(or you don't care about the idea ;-) )

Greetings,

--
Gunnar Wolf - [EMAIL PROTECTED] - (+52-55)1451-2244 / 5623-0154
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to