Package: ssmtp Version: 2.62-1 Severity: normal Tags: patch X-Debbugs-CC: jensdietrich.moel...@auerswald.de
Hello *, I am using ssmtp to send emails from an embedded system. So I grabbed that ssmtp_2.62.orig.tar.gz from your debian package server and compiled it on my own. What I do with it is to send emails containing attachements of several megabytes. Well, I already found at least one problem: If the base64 encoded attachement data is NOT split into lines of less than 2048 characters, the buffer-handling in ssmtp looses data. So I applied the following patch: diff -u -r -N ssmtp/ssmtp.c ssmtp-neu/ssmtp.c --- ssmtp/ssmtp.c 2008-03-06 21:01:22.000000000 +0100 +++ ssmtp-neu/ssmtp.c 2009-05-19 14:01:17.000000000 +0200 */ ssize_t smtp_write(int fd, char *format, ...) { - char buf[(BUF_SZ + 1)]; + char buf[(BUF_SZ + 3)]; va_list ap; ssize_t outbytes = 0; va_start(ap, format); - if(vsnprintf(buf, (BUF_SZ - 2), format, ap) == -1) { + if(vsnprintf(buf, (BUF_SZ + 1), format, ap) == -1) { die("smtp_write() -- vsnprintf() failed"); } va_end(ap); With this, I do not need to split the attachement into small lines and slow down the transmission. BTW: Do you know the original author of this code? Whom do I have to contact for code contribution? Thanks so far, Jens Möller To: ani...@debian.org santi...@debian.org