Author Topic: Roundcube leaving stray jpg and png in /tmp  (Read 5458 times)

Offline mathog

  • Jr. Member
  • **
  • Posts: 13
Roundcube leaving stray jpg and png in /tmp
« on: December 16, 2013, 12:45:46 PM »
Every once and a while roundcube is leaving a jpg or a png in /tmp/.   These are, I think, attachments on certain html email messages.   I subscribe to a "for sale" list on campus, and these appear to be images from some of those messages - but not images I ever saw.  That is, they were in the message, but they were shown as links, and I never clicked on them since I was not interested in the items.  Unfortunately I have always deleted the email message before I find these left over files, so I'm not at all sure how they were originally encoded.

For instance, roundcube left this image:

Code: [Select]
stat /tmp/19d3b54eb33e4f2c8be875bfed1904e2.png
  File: '/tmp/19d3b54eb33e4f2c8be875bfed1904e2.png'
  Size: 9701            Blocks: 24         IO Block: 4096   regular file
Device: 1dh/29d Inode: 28174758    Links: 1
Access: (0600/-rw-------)  Uid: (  492/  apache)   Gid: (  490/  apache)
Access: 2013-12-16 09:27:08.385092350 -0800
Modify: 2013-12-10 10:37:01.357272647 -0800
Change: 2013-12-10 10:37:01.357272647 -0800
 Birth: -

and the web server logs show near that time:

Code: [Select]
(my client's ip) - - [10/Dec/2013:10:36:48 -0800] "GET /roundcubemail/?_task=mail&_refresh=1&_mbox=INBOX&_action=list&_remote=1&_unlock=loading1386700581648&_=1386700581653 HTTP/1.1" 200 19903
(my client's ip) - - [10/Dec/2013:10:36:48 -0800] "GET /roundcubemail/?_task=mail&_action=getunread&_remote=1&_unlock=0&_=1386700581655 HTTP/1.1" 200 2696
(my client's ip) - - [10/Dec/2013:10:36:54 -0800] "POST /roundcubemail/?_task=mail&_action=moveto HTTP/1.1" 200 1282
(my client's ip) - - [10/Dec/2013:10:36:59 -0800] "GET /roundcubemail/?_task=mail&_action=show&_uid=27096&_mbox=INBOX&_caps=pdf%3D1%2Cflash%3D1%2Ctif%3D0 HTTP/1.1" 200 42544
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/skins/classic/common.css?s=1378470053 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css?s=1378470052 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/skins/classic/mail.css?s=1378470053 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/skins/classic/splitter.js?s=1378470053 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/skins/classic/functions.js?s=1378470053 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/program/js/jquery.min.js?s=1378682364 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/program/js/app.js?s=1378470052 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/program/js/common.js?s=1378470052 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js?s=1378470052 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/skins/classic/images/icons/attachment.png?v=08f7.518 HTTP/1.1" 304 -
(my client's ip) - - [10/Dec/2013:10:37:01 -0800] "GET /roundcubemail/program/resources/blank.tif HTTP/1.1" 200 270
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/?_task=mail&_uid=27096&_mbox=INBOX&_action=get&_part=2&_embed=1&_mimeclass=image&_thumb=1 HTTP/1.1" 200 47060
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/?_task=mail&_uid=27096&_mbox=INBOX&_action=get&_part=3&_embed=1&_mimeclass=image&_thumb=1 HTTP/1.1" 200 33490
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/?_task=mail&_uid=27096&_mbox=INBOX&_action=pagenav&_remote=1&_unlock=loading1386700593771&_=1386700593782 HTTP/1.1" 200 220
(my client's ip) - - [10/Dec/2013:10:37:00 -0800] "GET /roundcubemail/?_task=mail&_uid=27096&_mbox=INBOX&_action=get&_part=4&_embed=1&_mimeclass=image&_thumb=1 HTTP/1.1" 200 9701
(my client's ip) - - [10/Dec/2013:10:37:01 -0800] "GET /roundcubemail/?_task=mail&_action=getunread&_remote=1&_unlock=0&_=1386700593784 HTTP/1.1" 200 2696

This is roundcube 0.9.4.   Is this a known issue?  More generally, is there a switch somewhere to get roundcube to clean up after itself better?

Thanks.

Offline mathog

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube leaving stray jpg and png in /tmp
« Reply #1 on: January 06, 2014, 12:58:38 PM »
I captured an example message that left one of these image files.  The only thing I see that is unusual is that the picture was quite large, putting the entire size over 256K (note the final X-SA-Exim-Scanned message).   That might explain why roundcube breaks it out of the message and stores it in /tmp, but not why it doesn't clean up afterwards.

Here it is in redacted form:

Code: [Select]
From marketplace-bounces@nowhere.com Fri Jan 03 17:59:50 2014
Return-path: <marketplace-bounces@nowhere.com>
Envelope-to: arecipient@amachine.nowhere.com
Delivery-date: Fri, 03 Jan 2014 17:59:50 -0800
Received: from outgoing-mail.its.nowhere.com ([131.215.239.19])
by newamachine.nowhere.com ([131.215.12.41]:25)
with esmtp id 1VzGWk-0004Tz-2j - Using Exim-4.72 (MandrivaLinux) MTA
(return-path <marketplace-bounces@nowhere.com>); Fri, 03 Jan 2014 17:59:50 -0800
Received: by fire-doxen.nowhere.com (Postfix, from userid 60008)
id EC72B3280C2; Fri,  3 Jan 2014 17:59:44 -0800 (PST)
X-Original-To: arecipient@nowhere.com
Received: from shift.nowhere.com (shift [192.168.1.23])
by fire-doxen-postvirus (Postfix) with ESMTP id 64EC4328060;
Fri,  3 Jan 2014 17:59:39 -0800 (PST)
Delivered-To: marketplace@nowhere.com
Received: from fire-doxen.imss.nowhere.com (localhost [127.0.0.1])
by fire-doxen-postvirus (Postfix) with ESMTP id 4062A328049
for <marketplace@nowhere.com>; Fri,  3 Jan 2014 17:59:31 -0800 (PST)
X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new
X-Spam-Flag: NO
X-Spam-Score: -14.3
X-Spam-Level:
X-Spam-Status: No, score=-14.3 tagged_above=-10000 required=5
tests=[ALL_TRUSTED=-3.8, CIT_AUTH_FROM=-4.4, CIT_AUTH_SMTP=-1.5,
CIT_FROM_ADDR=-0.7, CIT_NET_FROM=-3.9] autolearn=disabled
Received: from webmail.nowhere.com (fire-griffen [192.168.1.231])
(Authenticated sender: asender)
by fire-doxen-ssl (Postfix) with ESMTP id 4394B328005
for <marketplace@nowhere.com>; Fri,  3 Jan 2014 17:59:29 -0800 (PST)
Received: from 131.215.220.166 (SquirrelMail authenticated user asender)
by webmail.nowhere.com with HTTP;
Fri, 3 Jan 2014 17:59:29 -0800 (PST)
Message-ID: <7724.131.215.220.166.1388800769.squirrel@webmail.nowhere.com>
Date: Fri, 3 Jan 2014 17:59:29 -0800 (PST)
From: asender@nowhere.com
To: marketplace@nowhere.com
User-Agent: SquirrelMail/1.4.8-5.el5_7.13
MIME-Version: 1.0
Content-Type: multipart/mixed;boundary="----=_20140103175929_87299"
X-Priority: 3 (Normal)
Importance: Normal
Subject: [marketplace] selling lovely lawn chair for $15
X-BeenThere: marketplace@nowhere.com
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "Classifieds at Caltech: sell your books, bikes, furniture, car, etc.;
find a roommate or rideshare" <marketplace.nowhere.com>
List-Unsubscribe: <https://utils.its.nowhere.com/mailman/listinfo/marketplace>,
<mailto:marketplace-request@nowhere.com?subject=unsubscribe>
List-Archive: <https://utils.its.nowhere.com/mailman/private/marketplace>
List-Post: <mailto:marketplace@nowhere.com>
List-Help: <mailto:marketplace-request@nowhere.com?subject=help>
List-Subscribe: <https://utils.its.nowhere.com/mailman/listinfo/marketplace>,
<mailto:marketplace-request@nowhere.com?subject=subscribe>
Errors-To: marketplace-bounces@nowhere.com
X-SA-Exim-Connect-IP: 131.215.239.19
X-SA-Exim-Mail-From: marketplace-bounces@nowhere.com
X-SA-Exim-Scanned: No (on newamachine.nowhere.com); Message bigger than SAmaxbody (256000)
X-UID: 27594                                                 
Status: RO
Content-Length: 978237

------=_20140103175929_87299
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

A normal text message body.

Sender's signature
------=_20140103175929_87299
Content-Type: image/jpeg; name="photo.JPG"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="photo.JPG"

/9j/4Q/+RXhpZgAATU0AKgAAAAgACgEPAAIAAAAGAAAAhgEQAAIAAAAJAAAAjAESAAMAAAABAAYA
(many lines deleted)
3FyRHLhcK7HAx6GjS/8Aj31f/fP9Kpt/yLt39B/OuetSXtOU8yUbQuj/2Q==
------=_20140103175929_87299
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
marketplace mailing list
marketplace@nowhere.com
https://utils.its.nowhere.com/mailman/listinfo/marketplace

------=_20140103175929_87299--


Thanks.