diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2019-11-13 04:16:48 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2019-11-13 06:23:57 +0100 |
commit | dac4ab1c9306bf2035bc1547d2ed27ab09850120 (patch) | |
tree | 39d04c3d9c92ccf05f109b1123e69af407fe7a6d /pullimap | |
parent | 0a2558aabfefd6800fe74c24e5aff2b0d47cc5e2 (diff) |
Test suite: add new test for pullimap(1).
This adds a dependency on Dovecot's LMTPd, which will bind to
to TCP port 10024 on the loopback interface.
Diffstat (limited to 'pullimap')
-rwxr-xr-x | pullimap | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -29,7 +29,7 @@ use Errno 'EINTR'; use Fcntl qw/O_CREAT O_RDWR O_DSYNC F_SETLK F_WRLCK SEEK_SET F_GETFD F_SETFD FD_CLOEXEC/; use Getopt::Long qw/:config posix_default no_ignore_case gnu_getopt auto_version/; use List::Util 'first'; -use Socket qw/PF_INET PF_INET6 SOCK_STREAM/; +use Socket qw/PF_INET PF_INET6 SOCK_STREAM IPPROTO_TCP/; use lib 'lib'; use Net::IMAP::InterIMAP 0.0.5 qw/xdg_basedir read_config compact_set/; @@ -146,8 +146,7 @@ sub sendmail($$) { : $fam == PF_INET6 ? Socket::pack_sockaddr_in6($port, $addr) : die; - my $proto = getprotobyname("tcp") // die; - socket($SMTP, $fam, SOCK_STREAM, $proto) or die "socket: $!"; + socket($SMTP, $fam, SOCK_STREAM, IPPROTO_TCP) or die "socket: $!"; until (connect($SMTP, $sockaddr)) { next if $! == EINTR; # try again if connect(2) was interrupted by a signal die "connect: $!"; |