yesterday after a upgrade to the latest ssmtp (compiled with md5sum flag) i noticed that while authenticating on a SMTP server ssmtp exits in segfault. Example: alan@AraXe alan $ cat testt | ssmtp -t -autyler83@email.it -apxxxxxx -d9 [<-] 220 smtp-out2.email.it [->] EHLO AraXe [<-] 250 8BITMIME Segmentation fault I've tried to send a mail with mi isp's smtp (which does not require the AUTH) and worked. Example: alan@AraXe alan $ cat testt | ssmtp -t -autyler83@email.it -apxxxxxx -d9 [<-] 220 smtp-out2.email.it [->] EHLO AraXe [<-] 250 8BITMIME [->] AUTH LOGIN dHlsZXI4M0BlbWFpbC5pdA== .... [<-] 250 Ok: queued as 68A9A1BC3B6 [->] QUIT [<-] 221 Bye I didn't know what to do... so i've tried lot of compilations with safe flags "O2 -march=i686 -fomit-frame-pointer" but nothing happened... always the segfault... so i tried to strip the USE flags... i've stripped the md5sum flag and suddenly the mail was sent :) Example: alan@AraXe alan $ cat testt | ssmtp -t -autyler83@email.it -apxxxxxx -d9 [<-] 220 smtp-out2.email.it [->] EHLO AraXe [<-] 250 8BITMIME [->] AUTH LOGIN dHlsZXI4M0BlbWFpbC5pdA== .... [<-] 250 Ok: queued as 68A9A1BC3B6 [->] QUIT [<-] 221 Bye So i think it's a problem related to the +md5sum flag... cause i can reproduce it always when i try to send a mail with www.email.it smtp server (which requires auth), but if ssmtp's compiled without that flag this clue won't happen... Sorry for my bad english =) Reproducible: Always Steps to Reproduce: 1. compile ssmtp-2.60.7-r1 with +md5sum flag 2. try to send a mail through a smtp server which requires auth 3. look at the nice segfault :) Actual Results: Program exits with segmentation fault Expected Results: auth to the smtp server and queue the mail Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6. 5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 AMD Duron(tm) Processor Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-pipe -O2 -fomit-frame-pointer -fforce-addr -march=athlon-tbird -ffast-math -funroll-loops" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data/logs /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -O2 -fomit-frame-pointer -fforce-addr -march=athlon-tbird -ffast-math -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http: //www.die.unipd.it/pub/Linux/distributions/gentoo-sources/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X alsa apm arts atm avi berkdb cdr crypt cups dvd encode esd foomaticdb gdbm gif gpm gtk imlib jpeg kde ldap libg++ libwww mad maildir mailwrapper mikmod mmx motif mpeg mysql ncurses nls offensive oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd truetype usb x86 xml2 xmms xv zlib"
argh i've just woke up and i've noticed i've paste two times the same output... there's an error... in my second example (the one showing ssmtp compiled with +md5sum that send an email without segfault through a smtp server which doesnt require auth). Here's the right example: alan@AraXe alan $ cat testt | ssmtp -t -d9 [<-] 220 vsmtp4.tin.it ESMTP Service (7.0.027) ready ... [<-] 250 <40ACC5B1004084E7> Mail accepted [->] QUIT [<-] 221 vsmtp4.tin.it QUIT Sorry for the inconvenience...
can you please recompile it without the crazy flags -fforce-addr seems suspicious enough to warrant removal -ffast-math falls into the suspicious category as well. Please remerge this WITHOUT those two flags, and see if it fix0rs this issue.
i've just tried... with CFLAGS="-O2 -march=i686 -fomit-frame-pointer" too, but i always get that horrible segfault
ssmtp-2.61 is on CVS now. Does it fix your problem ? Cheers, Ferdy
ssmtp-2.61 works for me and is stable on x86 right now. I think upstream fixed it. Cheers, Ferdy