In Debian 9, just tried with a fresh server, if you omit "libio-socket-inet6-perl", you get
"""
root@jarjar:~# ./imapsync
Can't locate IO/Socket/INET6.pm in @INC (you may need to install the IO::Socket::INET6 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./imapsync line 676.
BEGIN failed--compilation aborted at ./imapsync line 676.
"""
Maybe because my machine has IPv6?