Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501248 - net-mail/fetchmail-6.3.26-r2 USE=socks - fetchmail: Connection errors for this poll: name 0: connection to [IPv4 address] failed: Network is unreachable.
Summary: net-mail/fetchmail-6.3.26-r2 USE=socks - fetchmail: Connection errors for thi...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
Depends on:
Reported: 2014-02-13 20:31 UTC by grey dot
Modified: 2019-10-27 08:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description grey dot 2014-02-13 20:31:31 UTC
Fetchmail with socks support compiled in can't connect to any server except for those in LAN. The poll fails like this:

fetchmail: Connection errors for this poll:
name 0: connection to [] failed: Network is unreachable.
name 1: connection to [] failed: Network is unreachable.
name 2: connection to [2a00:1450:4010:c03::6c/995] failed: Network is unreachable.
POP3 connection to failed: Network is unreachable
fetchmail: Query status=2 (SOCKET)

If I enable IPv6 in my system, fetchmail successfully grabs mail through it, but connection through IPv4 still fails. Everything works fine if socks flag is disabled.

Reproducible: Always

Steps to Reproduce:
1. compile fetchmail with +socks
2. try to fetch your mail
3. ???
Comment 1 grey dot 2014-02-13 20:34:05 UTC
> emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/no-multilib, gcc-4.8.2, glibc-2.18-r1, 3.8.13-rt15-glow x86_64)
System uname: Linux-3.8.13-rt15-glow-x86_64-AMD_FX-tm-8120_Eight-Core_Processor-with-gentoo-2.2
KiB Mem:     8124616 total,   6315084 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of tree: Wed, 12 Feb 2014 01:00:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo crossdev-local gentoo-haskell lisp lobotomy sunrise udev
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe "
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe "
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j17 -l8"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/crossdev /var/lib/overlays/haskell /var/lib/overlays/lisp /var/lib/overlays/lobotomy /var/lib/overlays/sunrise /var/lib/overlays/udev"
USE="aac acl alsa amd64 berkdb bzip2 cli cpudetection cracklib crypt cxx device-mapper dri exif flac gdbm iconv ipv6 jpeg kvm libkms lua mmx mmxext modules mp3 mp4 ncurses nptl ogg openmp pcre png readline session socks5 sse sse2 sse3 sse4_1 ssl ssse3 theora threads unicode vim-syntax vorbis wma x264 xinerama zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="crypt dmraid dm lvm" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="multiboot pc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python3_3 python2_7" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm armeb alpha" QEMU_USER_TARGETS="x86_64 i386 arm armeb alpha" RUBY_TARGETS="ruby20 ruby19" USERLAND="GNU" VIDEO_CARDS="fglrx radeonsi radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 2 grey dot 2014-02-13 20:47:41 UTC
809 ### use option --with-socks=DIR to point at SOCKS library
810 AC_ARG_WITH(socks,
811     [  --with-socks[=DIR]      add built-in SOCKS firewall access],
812 [
813 if test "$with_socks" != no
814 then
815     if test "$with_socks" != yes
816     then
817         LDFLAGS="$LDFLAGS -L$with_socks"
818     else
819         AC_CHECK_LIB(socks, Rconnect,,
820                AC_MSG_ERROR([could not find libsocks which is needed for built-in SOCKS support]))
821     fi
822     AC_DEFINE(HAVE_SOCKS,1,Define if you want built-in SOCKS support)
823     CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
824     LIBS="-lsocks $LIBS"
825 fi])

And yet fetchmail binary isnt linked to libsocks. I suppose this is the source of the problem. I also think that whoever wrote this brilliant piece of autoconf crap deserves to get his hands cut off and shoved up his ass.
Comment 3 grey dot 2014-02-14 10:09:48 UTC
I'm also told that lftp has the same bug.