binary attachment corrupted when RT mails them out

View: New views
4 Messages — Rating Filter:   Alert me  

binary attachment corrupted when RT mails them out

by dalek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

      Let's say someone emails a pdf (or some other kind of binary)
file as an attachment to a ticket through rt. If i access the said
attachment trough the rt web interface it works fine. But if I get the
ticket through email (ticket is being forwarded to the AdminCC:
members) and then download the attachment to see it, a lot of times is
corrupted. FYI, we received a 889K PDF and the copy forwarded to
AdminCC is corrupted. However a 74K .pdf file we received just after
it works fine. I do not know if that is an issue with the attachment
size, but I thought by having the following set on RT_SiteConfig.pm,

Set($MaxAttachmentSize, 26214400);
Set($DropLongAttachments, undef);
Set($TruncateLongAttachments, undef);

I would not have a size issue here. The fact RT has no problems witht
he file *if* you access it using its web interface makes me think
something is going on in the routing that calls to have something mime
encoded. Which function should I be checking?
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: binary attachment corrupted when RT mails them out

by Jesse Vincent :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Thu, Nov 05, 2009 at 03:09:56PM -0500, Mauricio Tavares wrote:

>       Let's say someone emails a pdf (or some other kind of binary)
> file as an attachment to a ticket through rt. If i access the said
> attachment trough the rt web interface it works fine. But if I get the
> ticket through email (ticket is being forwarded to the AdminCC:
> members) and then download the attachment to see it, a lot of times is
> corrupted. FYI, we received a 889K PDF and the copy forwarded to
> AdminCC is corrupted. However a 74K .pdf file we received just after
> it works fine. I do not know if that is an issue with the attachment
> size, but I thought by having the following set on RT_SiteConfig.pm,
>

Can you tell us a bit more about your RT? Often the Configuration ->
Tools -> System Information page is the easiest way to capture the
various bits of metadata we really need to help you figure out what's
going on.

-j
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: binary attachment corrupted when RT mails them out

by dalek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

        Sorry for the delay; I was sidetracked in other non rt-related weidness.

Jesse Vincent wrote:

>
>
> On Thu, Nov 05, 2009 at 03:09:56PM -0500, Mauricio Tavares wrote:
>>       Let's say someone emails a pdf (or some other kind of binary)
>> file as an attachment to a ticket through rt. If i access the said
>> attachment trough the rt web interface it works fine. But if I get the
>> ticket through email (ticket is being forwarded to the AdminCC:
>> members) and then download the attachment to see it, a lot of times is
>> corrupted. FYI, we received a 889K PDF and the copy forwarded to
>> AdminCC is corrupted. However a 74K .pdf file we received just after
>> it works fine. I do not know if that is an issue with the attachment
>> size, but I thought by having the following set on RT_SiteConfig.pm,
>>
>
> Can you tell us a bit more about your RT? Often the Configuration ->
> Tools -> System Information page is the easiest way to capture the
> various bits of metadata we really need to help you figure out what's
> going on.
>
> -j

        I am sending the request info as an attachment. Incidentally, I am
running 3.6.7. I know right now it is rather old on the tooth (thanks
ubuntu!) but since I have not upgraded it since I installed it, I would
think that eliminates those kind of errors.



Loaded perl modules

Perl v5.10.0 under linux
  Apache2::Access v2.000004;
  Apache2::Connection v2.000004;
  Apache2::Const v2.000004;
  Apache2::Filter v2.000004;
  Apache2::Log v2.000004;
  Apache2::Module v2.000004;
  Apache2::RequestIO v2.000004;
  Apache2::RequestRec v2.000004;
  Apache2::RequestUtil v2.000004;
  Apache2::Response v2.000004;
  Apache2::ServerRec v2.000004;
  Apache2::ServerUtil v2.000004;
  Apache2::Status v4.00;
  Apache2::SubRequest v2.000004;
  Apache2::URI v2.000004;
  Apache2::Util v2.000004;
  Apache::DBI v1.07;
  Apache::Session v1.87;
  Apache::Session::Generate::MD5 v2.11;
  Apache::Session::Lock::MySQL v1.01;
  Apache::Session::MySQL v1.01;
  Apache::Session::Serialize::Storable v1.01;
  Apache::Session::Store::DBI v1.02;
  Apache::Session::Store::MySQL v1.04;
  APR v0.009000;
  APR::Brigade v0.009000;
  APR::Bucket v0.009000;
  APR::Const v0.009000;
  APR::Date v0.009000;
  APR::Pool v0.009000;
  APR::Table v0.009000;
  APR::URI v0.009000;
  APR::Util v0.009000;
  AutoLoader v5.63;
  base v2.13;
  bytes v1.03;
  Cache::Simple::TimedExpiry v0.27;
  Carp v1.08;
  CGI v3.29;
  CGI::Cookie v1.28;
  CGI::Util v1.5_01;
  Class::Container v0.12;
  Class::Data::Inheritable v0.08;
  Class::ReturnValue v0.55;
  Clone v0.30;
  constant v1.13;
  Convert::ASN1 v0.22;
  Cwd v3.2501;
  Data::Dumper v2.121_14;
  Date::Format v2.22;
  Date::Parse v2.27;
  DBD::mysql v4.008;
  DBI v1.607;
  DBIx::SearchBuilder v1.54;
  DBIx::SearchBuilder::Union v0;
  DBIx::SearchBuilder::Unique v0.01;
  Devel::StackTrace v1.20;
  Devel::StackTraceFrame v1.20;
  Digest::base v1.00;
  Digest::MD5 v2.36_01;
  DynaLoader v1.08;
  Encode v2.23;
  Encode::Alias v2.07;
  Encode::Config v2.04;
  Encode::Encoding v2.05;
  Errno v1.1;
  Exception::Class v1.26;
  Exception::Class::Base v1.2;
  Exporter v5.62;
  Exporter::Heavy v5.62;
  Fcntl v1.06;
  File::Basename v2.76;
  File::Glob v1.06;
  File::Path v2.04;
  File::Spec v3.2501;
  File::Spec::Unix v3.2501;
  File::Temp v0.18;
  FileHandle v2.01;
  HTML::Element v3.23;
  HTML::Entities v3.57;
  HTML::Formatter v2.04;
  HTML::FormatText v2.04;
  HTML::Mason v1.39;
  HTML::Mason::ApacheHandler v1.69;
  HTML::Mason::Exception v1.1;
  HTML::Mason::Exception::Abort v1.1;
  HTML::Mason::Exception::Compilation v1.1;
  HTML::Mason::Exception::Compilation::IncompatibleCompiler v1.1;
  HTML::Mason::Exception::Compiler v1.1;
  HTML::Mason::Exception::Decline v1.1;
  HTML::Mason::Exception::Params v1.1;
  HTML::Mason::Exception::Syntax v1.1;
  HTML::Mason::Exception::System v1.1;
  HTML::Mason::Exception::TopLevelNotFound v1.1;
  HTML::Mason::Exception::VirtualMethod v1.1;
  HTML::Mason::Exceptions v1.43;
  HTML::Parser v3.59;
  HTML::Scrubber v0.08;
  HTML::Tagset v3.20;
  HTML::TreeBuilder v3.23;
  HTTP::Date v5.810;
  I18N::LangTags v0.35;
  I18N::LangTags::Detect v1.03;
  integer v1.00;
  IO v1.23_01;
  IO::File v1.14;
  IO::Handle v1.27;
  IO::InnerFile v2.110;
  IO::Lines v2.110;
  IO::ScalarArray v2.110;
  IO::Seekable v1.1;
  IO::Select v1.17;
  IO::Socket v1.30_01;
  IO::Socket::INET v1.31;
  IO::Socket::SSL v1.18;
  IO::Socket::UNIX v1.23;
  IO::WrapTie v2.110;
  IPC::Open2 v1.02;
  IPC::Open3 v1.02;
  lib v0.5565;
  List::Util v1.19;
  Locale::Maketext v1.12;
  Locale::Maketext::Fuzzy v0.10;
  Locale::Maketext::Lexicon v0.75;
  Locale::Maketext::Lexicon::Gettext v0.16;
  Log::Dispatch v2.22;
  Log::Dispatch::Base v1.09;
  Log::Dispatch::File v1.22;
  Log::Dispatch::Output v1.26;
  Log::Dispatch::Screen v1.17;
  Log::Dispatch::Syslog v1.18;
  Mail::Address v2.04;
  Mail::Field v2.04;
  Mail::Field::AddrList v2.04;
  Mail::Field::Date v2.04;
  Mail::Field::Generic v2.04;
  Mail::Header v2.04;
  Mail::Internet v2.04;
  Mail::Util v2.04;
  MIME::Base64 v3.07_01;
  MIME::Body v5.427;
  MIME::Decoder v5.427;
  MIME::Decoder::NBit v5.427;
  MIME::Entity v5.427;
  MIME::Field::ContDisp v5.427;
  MIME::Field::ConTraEnc v5.427;
  MIME::Field::ContType v5.427;
  MIME::Field::ParamVal v5.427;
  MIME::Head v5.427;
  MIME::Parser v5.427;
  MIME::QuotedPrint v3.07;
  MIME::Tools v5.427;
  MIME::Words v5.427;
  mod_perl v2.000004;
  mod_perl2 v2.000004;
  ModPerl::Const v2.000004;
  Module::Versions::Report v1.06;
  Net::LDAP v0.39;
  Net::LDAP::ASN v0.08;
  Net::LDAP::Bind v1.03;
  Net::LDAP::Constant v0.07;
  Net::LDAP::Entry v0.24;
  Net::LDAP::Extension v1.02;
  Net::LDAP::Filter v0.15;
  Net::LDAP::Intermediate v0.02;
  Net::LDAP::Message v1.11;
  Net::LDAP::Search v0.13;
  Net::LDAP::Util v0.11;
  Net::LibIDN v0.07;
  Net::SSLeay v1.35;
  overload v1.06;
  Params::Validate v0.91;
  PerlIO v1.04;
  PerlIO::scalar v0.05;
  POSIX v1.13;
  re v0.08;
  Regexp::Common v2.122;
  Regexp::Common::delimited v2.106;
  RT v3.6.7;
  RT::FM v2.2.1;
  RT::Interface::Email v2;
  Scalar::Util v1.19;
  SelectSaver v1.01;
  Socket v1.80;
  Storable v2.18;
  strict v1.04;
  Symbol v1.06;
  Sys::Syslog v0.22;
  Text::Autoformat v1.14.0;
  Text::Quoted v2.05;
  Text::Reform v1.12.2;
  Text::Tabs v2007.1117;
  Text::Template v1.44;
  Text::Wrapper v1.02;
  Tie::Hash v1.02;
  Time::HiRes v1.9711;
  Time::JulianDay v2003.1125;
  Time::Local v1.18;
  Time::ParseDate v2006.0814;
  Time::Timezone v2006.0814;
  Time::Zone v2.22;
  Tree::Simple v1.18;
  UNIVERSAL v1.04;
  UNIVERSAL::require v0.11;
  URI v1.37;
  URI::Escape v3.29;
  URI::URL v5.03;
  URI::WithBase v2.19;
  utf8 v1.07;
  vars v1.01;
  version v0.74;
  warnings v1.06;
  warnings::register v1.01;
  XSLoader v0.08;



RT Variables
RT::AmbiguousDayInPast 1
RT::AutoCreateNonExternalUsers 1
RT::BasePath /usr/share/request-tracker3.6
RT::BinPath /usr/bin
RT::CORE_CONFIG_FILE /etc/request-tracker3.6/RT_Config.pm
RT::CommentAddress support-comment@...
RT::CorrespondAddress support@...
RT::DatabaseHost localhost
RT::DatabaseName rt3
RT::DatabasePassword Password not printed
RT::DatabaseRTHost localhost
RT::DatabaseType mysql
RT::DatabaseUser rtuser
RT::DateDayBeforeMonth 1
RT::DefaultSearchResultFormat '<B><A HREF="/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#', '<B><A HREF="/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject', Status, QueueName, OwnerName, Priority, '__NEWLINE__', '', '<small>__Requestors__</small>', '<small>__CreatedRelative__</small>', '<small>__ToldRelative__</small>', '<small>__LastUpdatedRelative__</small>', '<small>__TimeLeft__</small>'
RT::DefaultSummaryRows 30
RT::EmailOutputEncoding utf-8
RT::EtcPath /etc/request-tracker3.6
RT::ExternalServiceUsesSSLorTLS 1
RT::FriendlyFromLineFormat "%s" <%s>
RT::FriendlyToLineFormat "%s of domain support Ticket #%s":;
RT::LocalEtcPath /usr/local/share/request-tracker3.6/etc
RT::LocalLexiconPath /usr/local/share/request-tracker3.6/po
RT::LocalPath /usr/local/share/request-tracker3.6
RT::LogDir /tmp/
RT::LogToFile debug
RT::LogToFileNamed rt.log
RT::LogToScreen error
RT::LogToSyslog debug
RT::LogoURL /NoAuth/images/bplogo.gif
RT::LoopsToRTOwner 1
RT::MailCommand sendmailpipe
RT::MasonComponentRoot /usr/share/request-tracker3.6/html
RT::MasonDataDir /var/cache/request-tracker3.6/mason_data
RT::MasonLocalComponentRoot /usr/local/share/request-tracker3.6/html
RT::MasonSessionDir /var/cache/request-tracker3.6/session_data
RT::MaxAttachmentSize 26214400
RT::MaxInlineBody 13456
RT::MessageBoxWidth 72
RT::MessageBoxWrap HARD
RT::MinimumPasswordLength 5
RT::OldestTransactionsFirst 1
RT::Organization domain.com
RT::OwnerEmail root
RT::ParseNewMessageForTicketCcs 1
RT::RTAddressRegexp ^(support|rt)(-comment)?\@(domain|old-domain).com$
RT::RecordOutgoingEmail 1
RT::RedistributeAutoGeneratedMessages privileged
RT::SITE_CONFIG_FILE /etc/request-tracker3.6/RT_SiteConfig.pm
RT::SendmailArguments -oi -t
RT::SendmailBounceArguments -f "<>"
RT::SendmailPath /usr/sbin/sendmail
RT::ShowTransactionImages 1
RT::StrictLinkACL 1
RT::Timezone America/New_York
RT::UseFriendlyFromLine 1
RT::VERSION 3.6.7
RT::VarPath /var/cache/request-tracker3.6
RT::WebBaseURL https://tickets.internal.domain.com
RT::WebDefaultStylesheet 3.5-default
RT::WebFlushDbCacheEveryRequest 1
RT::WebImagesURL /NoAuth/images/
RT::WebPort 80
RT::WebURL https://tickets.internal.domain.com/
RT::rtname domain support
Perl configuration

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.6.24-23-server, archname=x86_64-linux-gnu-thread-multi
    uname='linux crested 2.6.24-23-server #1 smp wed apr 1 22:14:30 utc 2009 x86_64 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.0 -Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.3.3', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.9.so, so=so, useshrplib=true, libperl=libperl.so.5.10.0
    gnulibc_version='2.9'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'





_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: binary attachment corrupted when RT mails them out

by dalek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

     Here is an update in my sending corrupt attachments issue:

o We got a 3MB test image and made a 600K and a 1.6G version of it. The
600K went fine but the 1.4G one got corrupted all the time.

o So, we wrote a wrapper to make a copy of the email that is being sent
from RT to the mail program we were using, ssmtp. The attachment at this
point was fine down to matching MD5 checksums. But the one sent by ssmtp
had issues.

Therefore, the problem is not on RT but on ssmtp. It seems it cannot
handle larger attachments for whatever reason. Maybe that is the price
for using so light weight program. I guess we now need to find a good
replacement for it today. I like postfix but think for this application
it is a bit of an overkill. But, I do not know what else to do. Suggestions?

At least now we know where the problem is. =)

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@...


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com