Message Attachments not being delivered

When responding to a customer through RT, sometimes we need to attach things.
But it seems that when we do, they don’t get emailed. They DO show up in RT
under the list of emails that have been sent back in forth - but when the
email is delivered, it has no attachment.

The attachements are about 1.5MB - so they should be fitting through MTAs.
We’re not getting bounces.

I saw that bug # 554 has ‘attachemtns’ in the subject, but since I can’t login
I can’t see the details of the bug.

Is this a bug? Is it a configuration issue? Any help would be greatly appreciated.

Phil Dibowitz
Systems Administrator
Stream Exchange
http://www.streamexchange.com/

Phil Dibowitz writes:

When responding to a customer through RT, sometimes we need to attach
things. But it seems that when we do, they don’t get emailed. They DO
show up in RT under the list of emails that have been sent back in
forth - but when the email is delivered, it has no attachment.

RT does not pass attachments by default.

There is an Action in http://www.fsck.com/pub/rt/contrib/2.0/ called
NotifyWithAttachment that will let you pass them on. It may need some
custom tweaking for your particular needs - I know I’ve modified it
substantially for my needs.

-R

I saw that bug # 554 has ‘attachemtns’ in the subject, but since I can’t login
I can’t see the details of the bug.

To log into fsck.com’s RT instance, use a username and password of
’guest’.

Is this a bug? Is it a configuration issue? Any help would be greatly
appreciated.

http://www.fsck.com/rtfm/factoid.html?id=211 ( Just created :wink: )

The default Notify ScripActions that come supplied with RT do not have
the ability to actually Attach anything in outgoing mails. text/plain
works (to be Technical, text/plain is the type of RT::Attachment
returned by RT::Transaction->Content() ).

To overcome this, you can do three things. One is to use the
NotifyWithAttachment contrib ScripAction. This is the reliable method.

Another is to allow end-users to download attachments from RT itself,
and provide links to the attachments from the RT Web Interface in the
outgoing emails. ( this is an easy way out if you don’t want to email
attachments to users outside your site )

Finally, you could always generate the requisite MIME Attachment magic
in the outgoing template, a non-trivial task.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security

Robert Spier wrote:

Phil Dibowitz writes:

When responding to a customer through RT, sometimes we need to attach
things. But it seems that when we do, they don’t get emailed. They DO
show up in RT under the list of emails that have been sent back in
forth - but when the email is delivered, it has no attachment.

RT does not pass attachments by default.

There is an Action in http://www.fsck.com/pub/rt/contrib/2.0/ called
NotifyWithAttachment that will let you pass them on. It may need some
custom tweaking for your particular needs - I know I’ve modified it
substantially for my needs.

What fun.

OK, I’m browsing the docs at fsck.com and I can’t find the part about
installing new Actions… I remember seeing it, but I can’t find it. Ontop of
that, the readme that comes with NotifyWithAttachement contains NO install or
usage instructions. Yeah.

So can someone point me to the appropriate docs on how to install a new
Action? I’ve never needed a non-standard action until now.

Also, Robert, what did you modify? All I want is that attachements end up
getting sent in emails to users. Period. I can’t think of anything else it
could/should/might do… and if it doesn’t do that, what DOES it do? Have you
considered sending in your changes/enhancements to the author?

Phil
Systems Administrator
Stream Exchange
http://www.streamexchange.com/

Robert Spier wrote:

There is an Action in http://www.fsck.com/pub/rt/contrib/2.0/ called
NotifyWithAttachment that will let you pass them on. It may need some
custom tweaking for your particular needs - I know I’ve modified it
substantially for my needs.

What fun.

OK, I’m browsing the docs at fsck.com and I can’t find the part about
installing new Actions… I remember seeing it, but I can’t find it. Ontop of
that, the readme that comes with NotifyWithAttachement contains NO install or
usage instructions. Yeah.

In general, the contrib stuff comes with a basic ‘this is something I’ve
quickly hacked up for my installation, this is what it does, heres the
perl-library.pm file, heres the insert script, have fun’. Its assumed
that if you’re looking at Contrib stuff, you have followed enough of the
rt-devel list to nderstand where they go.

You may find http://www.fsck.com/rtfm/factoid.html?id=133 useful n giving
a brief overview of where to put the basics, and
http://www.fsck.com/rtfm/factoid.html?id=138 for even more gory details.

If its not in RT/FM, we can put it there. Heck, I should write a book on
this :wink:

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security

Bruce Campbell wrote:

In general, the contrib stuff comes with a basic ‘this is something I’ve
quickly hacked up for my installation, this is what it does, heres the
perl-library.pm file, heres the insert script, have fun’. Its assumed
that if you’re looking at Contrib stuff, you have followed enough of the
rt-devel list to nderstand where they go.

You may find http://www.fsck.com/rtfm/factoid.html?id=133 useful n giving
a brief overview of where to put the basics, and
http://www.fsck.com/rtfm/factoid.html?id=138 for even more gory details.

If its not in RT/FM, we can put it there. Heck, I should write a book on
this :wink:

Bruce, you’ve been really helpful. I have one more question…

I copied the pm file into the Action directory, and I ran the perl script and
it said it created 13 ScripActions successfully.

When I go into RT though, I’m assuming what I want to do is “Modify Global
Scripts” and add
Condition: OnComment
Do: NotifyWithAttachment
Template: Correspondence

Unfortunately “NotifyWithAttachment” isn’t one of the options there… So I’m
quite confused. Any help would be much appreciated. Thanks again.

Phil
Systems Administrator
Stream Exchange
http://www.streamexchange.com/

To overcome this, you can do three things. One is to use the
NotifyWithAttachment contrib ScripAction. This is the reliable method.

Does anyone rely on this ‘reliable’ method?

I’ve been using it for months and a non-trivial number of users receiving
email from our RT instance seem unable to read the attachments. They come
through as base-64 inline, or some other messy representation which seems to
suggest broken MIME.

We seem to be able to reproduce the problem with any Eudora user … they’re
never able to read attachments we send using the RT interface which are
mailed using the NotifyWithAttachment contrib ScripAction. Ms LookOut! users
can read our attachments, so that’s most of the world, but I’m thinking
that’s just because MS built a very forgiving MIME parser.

Anyone else seeing this?

-Darren

Also, Robert, what did you modify? All I want is that attachements end
up getting sent in emails to users. Period. I can’t think of anything
else it could/should/might do… and if it doesn’t do that, what DOES

I think the biggest change I made was to set a MIME-Version header –
many mailers were very unhappy without it.

Most of my other changes were to the Template and a custom Element so
that attachments could be download by those people who had trouble
with MIME.

It includes a string like this in the message for each attachment.

– attachment 1 ------------------------------------------------------
url: http://rt.my.org/rt2/attach/32436/26776/63f47e/t_op_string.t.diff

Clicking on that URL downloads the file.

(I decided I wanted both worlds - MIME attachments, and URLs.)

-R

Bruce, you’ve been really helpful. I have one more question…

I copied the pm file into the Action directory, and I ran the perl script and
it said it created 13 ScripActions successfully.

( Well, it created ScripAction #13 )

When I go into RT though, I’m assuming what I want to do is “Modify Global
Scripts” and add
Condition: OnComment
Do: NotifyWithAttachment
Template: Correspondence

Unfortunately “NotifyWithAttachment” isn’t one of the options there… So I’m
quite confused. Any help would be much appreciated. Thanks again.

The name supplied in the insert_action script creates
’NotifyAllWatchersWithAttach’. You probably want to be using
’OnCorrespond’ as well.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security

hi phil,

the button attach: attaches files to the ticket in rt. it is not ment to
sent attachments in e-mails, like one would suspect.
to change this you need to get and install the “NotifyWithAttachment” script
from the download area.

http://www.fsck.com/pub/rt/contrib/2.0/NotifyWithAttachment.tgz

cu
andreas

Andreas Wahlfeldt
subshell GmbH
Weidenallee 1
20357 Hamburg

t +49.40. 431 362-25
f +49.40. 431 362-29
e awahlfeldt@subshell.com

Message: 7
Date: Thu, 01 Aug 2002 12:36:38 -0700
From: Phil Dibowitz phil@streamexchange.com
Organization: Stream Exchange
To: rt-users@lists.fsck.com
Subject: [rt-users] Message Attachments not being delivered

When responding to a customer through RT, sometimes we need to attach
things.
But it seems that when we do, they don’t get emailed. They DO show up in
RT
under the list of emails that have been sent back in forth - but when the
email is delivered, it has no attachment.

The attachements are about 1.5MB - so they should be fitting through MTAs.
We’re not getting bounces.

I saw that bug # 554 has ‘attachemtns’ in the subject, but since I can’t
login
I can’t see the details of the bug.

Is this a bug? Is it a configuration issue? Any help would be greatly
appreciated.

Phil Dibowitz

Systems Administrator
Stream Exchange
http://www.streamexchange.com/

Andreas Wahlfeldt
subshell GmbH
Weidenallee 1
20357 Hamburg

t +49.40. 431 362-25
f +49.40. 431 362-29
e awahlfeldt@subshell.com

hi phil,

the perl script didn’t work for me too.
i decided to insert it manualy into the mysqldb
you might want to do anything like

insert into ScripActions values (13,‘NotifyAllWatchersWithAttachment’,‘Sends mail to all watchers with attachments’,‘NotifyWithAttachment’,‘All’,‘4’,‘2002-07-19 13:30:00’,1,‘2002-07-19 13:30:00’);

Liebe Gruesse aus der Weidenallee

cu
andreas

Andreas Wahlfeldt
subshell GmbH
Weidenallee 1
20357 Hamburg

t +49.40. 431 362-25
f +49.40. 431 362-29
e awahlfeldt@subshell.com

Robert Spier wrote:

Also, Robert, what did you modify? All I want is that attachements end
up getting sent in emails to users. Period. I can’t think of anything
else it could/should/might do… and if it doesn’t do that, what DOES

I think the biggest change I made was to set a MIME-Version header –
many mailers were very unhappy without it.

That would be a very useful change… care to share?
That would just be a small change to the .pm file, right? So something in here:

$self->TemplateObj->MIMEObj->attach(Data => $message->Content,
Type => $message->ContentType,
Encoding => “base64”,
Description => $fname,
Disposisiton => “attachment”,
Filename => $fname);

You added a …

Version => “…”

? I don’t know enough about MIME… I really should learn more. I’m sure
there’s a good FAQ somewhere.

Most of my other changes were to the Template and a custom Element so
that attachments could be download by those people who had trouble
with MIME.

It includes a string like this in the message for each attachment.

– attachment 1 ------------------------------------------------------
url: http://rt.my.org/rt2/attach/32436/26776/63f47e/t_op_string.t.diff

That’s not bad… I like that. You should definitely submit it to the original
author. All good changes.

Systems Administrator
Stream Exchange
http://www.streamexchange.com/

Does anyone rely on this ‘reliable’ method?

We are trying to, but it does need some fixing.

We seem to be able to reproduce the problem with any Eudora user … they’re
never able to read attachments we send using the RT interface which are
mailed using the NotifyWithAttachment contrib ScripAction. Ms LookOut! users
can read our attachments, so that’s most of the world, but I’m thinking
that’s just because MS built a very forgiving MIME parser.

You are right, the problem is that there is no MIME-Version header in
the mail (which is mandatory according to the RFC). You can easily hack
around this by inserting a single line near the end of the scrip:

  $self->TemplateObj->MIMEObj->attach(Data => $message->Content,
                                      Type => $message->ContentType,
                                      Encoding => "base64",
                                      Description => $fname,
                                      Disposition => "attachment",
                                      Filename => $fname);

  $self->TemplateObj->MIMEObj->head->replace('MIME-Version','1.0');

(The last line above is what you should insert.) However, we have an
even bigger problem, that can be seen above as well: the encoding is
fixed to base64. When a multipart (or message/*) attachment is about to
be sent out, NotifyWithAttachment sets the encoding to base64, and then
MIME::Entity croaks that you can’t have base64 encoding with this type.
Result: no mail gets sent out, although the transaction appears in the
database and on the web.

Does anybody have a solution for this?

Akos

Akos Szalkai szalkai@2f.hu
IT Consultant, CISA
2F 2000 Szamitastechnikai es Szolgaltato Kft.
Tel: (+36-1)-4887700 Fax: (+36-1)-4887709 WWW: http://www.2f.hu/

                                              However, we have an

even bigger problem, that can be seen above as well: the encoding is
fixed to base64. When a multipart (or message/*) attachment is about to
be sent out, NotifyWithAttachment sets the encoding to base64, and then
MIME::Entity croaks that you can’t have base64 encoding with this type.
Result: no mail gets sent out, although the transaction appears in the
database and on the web.

Does anybody have a solution for this?

Sorry to follow up my own email, but I did some dirty hacking to solve
this problem. I attach a slightly modified version of
NotifyWithAttachment.pm, which seems to work much better in our
environment (please remember that it is still very far from perfect).
You can use the insert script from the original version.

Akos

Akos Szalkai szalkai@2f.hu
IT Consultant, CISA
2F 2000 Szamitastechnikai es Szolgaltato Kft.
Tel: (+36-1)-4887700 Fax: (+36-1)-4887709 WWW: http://www.2f.hu/

NotifyWithAttachment.pm.gz (897 Bytes)

As I was following this thread, I got a request from a user for the
ability to send attachments out with replies to tickets. Lucky me, I
grabbed the NotifyWithAttachment scrip action and got it installed. All
was working well until another user tried to send out a .pdf with a
reply. For some reason pdf files are not getting sent out with the
reply. I’ve tested things, and this looks to be the only file type
having a problem. Word docs, excel spreadsheets, text files etc, etc
work. Is there something I need to add to the code in order to have
pdf’s get sent out with replies?

Any help is appreciated.

Thanks
SeanOn Mon, 2002-08-05 at 10:55, Akos Szalkai wrote:

                                              However, we have an

even bigger problem, that can be seen above as well: the encoding is
fixed to base64. When a multipart (or message/*) attachment is about to
be sent out, NotifyWithAttachment sets the encoding to base64, and then
MIME::Entity croaks that you can’t have base64 encoding with this type.
Result: no mail gets sent out, although the transaction appears in the
database and on the web.

Does anybody have a solution for this?

Sorry to follow up my own email, but I did some dirty hacking to solve
this problem. I attach a slightly modified version of
NotifyWithAttachment.pm, which seems to work much better in our
environment (please remember that it is still very far from perfect).
You can use the insert script from the original version.

Akos


Akos Szalkai szalkai@2f.hu
IT Consultant, CISA
2F 2000 Szamitastechnikai es Szolgaltato Kft.
Tel: (+36-1)-4887700 Fax: (+36-1)-4887709 WWW: http://www.2f.hu/

Sean Lutner
Senior Systems & Network Administrator
TechTarget, Inc.
117 Kendrick St, Suite 800
Needham, MA 02494
P: 781-657-1337
F: 781-657-1100
E: sean@techtarget.com W: http://www.techtarget.com

“Imagination is more important than knowledge.” – Albert Einstein