Roundcube Community Forum

Release Support => Pending Issues => Topic started by: DigiAngel on November 27, 2014, 10:09:12 AM

Title: Inline images issue (after Ubuntu 12 to 14 upgrade)
Post by: DigiAngel on November 27, 2014, 10:09:12 AM
Hey all.

So I have a DVR...fairly certain it's not RFC compliant when it sends snapshots.  That being said, Roundcube on Ubuntu 12 displayed these images inline just fine.  But this new version, 0.9.5 does not.  Here's a header:

Return-Path: <>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: by mail.domain.net (Postfix, from userid 1001)
id 7EA202C09D0; Thu, 27 Nov 2014 06:57:28 -0700 (MST)
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
gateway.domain.net
X-Spam-Level: **
X-Spam-Status: No, score=2.4 required=5.0 tests=ALL_TRUSTED,
BASE64_LENGTH_79_INF,DATE_IN_PAST_12_24,INVALID_DATE,MISSING_MID autolearn=no
autolearn_force=no version=3.4.0
Received: from localhost (qc444 [192.168.1.221])
by mail.domain.net (Postfix) with SMTP id 0CB1B2C09CE;
Thu, 27 Nov 2014 06:57:28 -0700 (MST)
From: [email protected]
To: [email protected]
Date: Thu, 27 Nov 14 06:54:15 +0800
Subject: =?utf-8?B?RFZSIEFMRVJU?=
MIME-Version: 1.0
Content-type: multipart/mixed; boundary=*****MAIL_BOUNDARY*****
Message-Id: <[email protected]>

--*****MAIL_BOUNDARY*****
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: 8bit

Alarm event: Motion Detect
Alarm input channel No.: 2 
Alarm device name: DVR
Sender IP address: 192.168.1.221

--*****MAIL_BOUNDARY*****
Content-Type: image/jpeg; name=ch02_20141127_065413_E.jpg
Content-Disposition: inline;
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQAAAQABAAD/2


I currently get a line with:
~71 KB Show Download

If I click download I can get the file, if I click show I see:
WARNING! This attachment is suspicious because its type doesn't match the type declared in the message. If you do not trust the sender, you shouldn't open it in the browser because it may contain malicious contents.

Expected: image/jpeg(.jpg); found: application/x-empty


Things I've tried changing...pointing to mime.types and mime.magic...installed ImageMagick and pointed to convert and identify...no luck so var:
$rcmail_config['mime_magic'] = 'null';

$rcmail_config['mime_types'] = null;

$rcmail_config['im_identify_path'] = 'null';

$rcmail_config['im_convert_path'] = 'null';


Is there something else I can do to troubleshoot this?  Thank you.
Title: Re: Inline images issue (after Ubuntu 12 to 14 upgrade)
Post by: alec on November 27, 2014, 01:00:55 PM
null is not the same as 'null'. Try mime_magic = null.
Title: Re: Inline images issue (after Ubuntu 12 to 14 upgrade)
Post by: DigiAngel on November 27, 2014, 01:13:00 PM
Thanks for checking here....in the config I have currently running, none of the null entries have single quotes:

[11:12:14 @gateway:/var/lib/roundcube/config$] sudo grep null main.inc.php
// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null to use
$rcmail_config['imap_auth_type'] = null;
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;
$rcmail_config['imap_auth_cid'] = null;
$rcmail_config['imap_auth_pw'] = null;
$rcmail_config['imap_cache'] = null;
$rcmail_config['smtp_auth_cid'] = null;
$rcmail_config['smtp_auth_pw'] = null;
$rcmail_config['skin_logo'] = null;
$rcmail_config['session_name'] = null;
$rcmail_config['session_auth_name'] = null;
$rcmail_config['session_path'] = null;
$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
$rcmail_config['client_mimetypes'] = null;  # null == default
// Set to null if the default path should be used.
$rcmail_config['mime_magic'] = null;
$rcmail_config['mime_types'] = null;
$rcmail_config['im_identify_path'] = null;
$rcmail_config['im_convert_path'] = null;
$rcmail_config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
$rcmail_config['addressbook_search_mods'] = null;  // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
$rcmail_config['default_addressbook'] = null;
Title: Re: Inline images issue (after Ubuntu 12 to 14 upgrade)
Post by: DigiAngel on November 28, 2014, 11:27:09 AM
After testing with the latest roundcube from source, I still experience this exact same behaviour...the current version with Ubuntu 14 is 0.9.5.  Thank you