martin f krafft dijo [Wed, May 26, 2010 at 02:42:08PM +0200]: > Package: swaks > Version: 20100211.0-2 > Severity: minor > > I accidentally specified '-p 587-g' instead of '-p 587 -g'. This > caused the error > > Port: Unable to resolve port 587-g > > to be written once for every single line of input, it seems.
I assume you got this when redirecting STDIN, right? I guess it will loop until it reaches a line with a number (or valid port) in it. Interactively, $ swaks -t gw...@iiec.unam.mx -p 587-g -s lafa.iiec.unam.mx Unable to resolve port 587-g Port: foo Unable to resolve port foo Port: bar Unable to resolve port bar Port: boring Unable to resolve port boring Port: 587 === Trying lafa.iiec.unam.mx:587... === Connected to lafa.iiec.unam.mx. <- 220 lafa.iiec.unam.mx ESMTP Postfix - No UCE/spam please. Rate limit: 10 conn/min. (...) I cannot say this behaviour is wrong. Swaks cannot decide where to connect to. Quoting from source (line ~1766): # SMTP port $G::link{port} = $o->{mail_port} || interact("Port: ", '^\w+$') if (defined($o->{mail_port})); $G::link{port} ||= $fconf->{PORT}; if ($G::link{port}) { # in here, the user has either specified a port, or that they _want_ # to, so if it isn't a resolvable port, ,keep prompting for another one my $o_port = $G::link{port}; if ($G::link{port} !~ /^\d+$/) { $G::link{port} = getservbyname($G::link{port}, 'tcp'); while (!$G::link{port}) { $G::link{port} = $o_port = interact("Unable to resolve port $o_port\nPort: ", '^\w+$'); $G::link{port} = getservbyname($G::link{port}, 'tcp') if ($G::link{port} !~ /^\d+$/); } } So this is definitively the upstream intended behaviour. -- Gunnar Wolf • gw...@gwolf.org • (+52-55)5623-0154 / 1451-2244 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org