Share

acmemail

Tracker: Bugs

5 sending attachments has a bug - ID: 631813
Last Update: Comment added ( jdanielmit )

Reopening bug 204210.
That bug was closed because it was fixed in 2.2.3.
I am running 2.2.3 and still have the problem.
I am running perl version 5.6.1 under Solaris 7 on the acmemail
server and I generally access my mail with IE running on a
MacOSX box.

Problem synopsis:
When sending attachments the attachment's name is lost.
The attachment is renamed no-name.
Decoding the attachment on the other side can fail.
The reason is the decoded file begins with the lost filename.
For example:
Let's say I have a doc called test.pdf.
If I "head -1" it, it starts with "%PDF-1.3".
Now I attach it and send it to myself.
I then get an an email with an attachment called no-name
I save the attachment to my hard drive and of course rename it.
I then "head -1" the file and see it starts with
"test.pdf%PDF-1.3"

Depending on the file type and the application that views it this
may not be a problem.
Of course, I can always edit the file with vi and remove the
filename but I rarely get mail from an acmemail server.
It is the people I send files to that can't open them.


Nobody/Anonymous ( nobody ) - 2002-11-01 00:10

5

Open

None

Nobody/Anonymous

Main source

None

Public


Comments ( 4 )




Date: 2003-07-08 17:59
Sender: jdanielmit

Logged In: YES
user_id=125882

I ran into the problem on my server too and was about to try
to patch it when I found this. Thanks for the patch,
unfortunately the lines got wrapped when you sent it so I had
to clean it up a bit before I could apply it.

I also would like to encourage the developers to take the
patch.


Date: 2003-01-16 21:32
Sender: nobody

Logged In: NO

I fixed the bug on my server.
Here is the bug fix:
# diff -c acmemail_orig.cgi acmemail.cgi
*** acmemail_orig.cgi Thu Jan 16 12:56:29 2003
--- acmemail.cgi Thu Jan 16 13:00:43 2003
***************
*** 122,128 ****
my $bcc = $q->param('bcc');
my $subject = $q->param('subject');
my $body = $q->param('body');
! my $attachment = $q->param('attachment');
my $reply = $q->param('reply');
my $replytoall = $q->param('replytoall');
my $forward = $q->param('forward');
--- 122,130 ----
my $bcc = $q->param('bcc');
my $subject = $q->param('subject');
my $body = $q->param('body');
! # changed by dsweet@tgd-inc.com on 20030116
! #my $attachment = $q->param('attachment');
! my $attachname = $q->param('attachment');
my $reply = $q->param('reply');
my $replytoall = $q->param('replytoall');
my $forward = $q->param('forward');
***************
*** 252,257 ****
--- 254,260 ----


# Let's worry about the attachment now...
+ my $attachment=""; # added by dsweet@tgd-inc.com on 20030116
my $attachment_type;
{
my $fh = $q->upload('attachment');
***************
*** 678,683 ****
--- 681,688 ----
$attachment, $attachment_type, $body) }
elsif (defined $send) { mail($q, $cclient, $mailbox, $offset,
$username,
$to, $cc, $bcc, $inreplyto, $subject, $attachment,
+ # following added by dsweet@tgd-inc.com on 20030116
+ $attachname,
$attachment_type, $body) }
elsif (defined $forward) { forward($q, $cclient, $forward)
}
elsif (defined $reply) { reply($q, $cclient, $reply, $replytoall)
}
***************
*** 1207,1213 ****

sub mail($$$$$$$$$$$$$) {
my($q, $cclient, $mailbox, $uid,
! $username, $to, $cc, $bcc, $inreplyto, $subject, $attachment,
$attachment_type, $body) = @_;

if (not $to) {
print qq|<b>Please enter a recipient for this
message</b><br>|;
--- 1212,1220 ----

sub mail($$$$$$$$$$$$$) {
my($q, $cclient, $mailbox, $uid,
! # following changed by dsweet@tgd-inc.com on 20030116
! # $username, $to, $cc, $bcc, $inreplyto, $subject, $attachment,
$attachment_type, $body) = @_;
! $username, $to, $cc, $bcc, $inreplyto, $subject, $attachment,
$attachname, $attachment_type, $body) = @_;

if (not $to) {
print qq|<b>Please enter a recipient for this
message</b><br>|;
***************
*** 1241,1246 ****
--- 1248,1255 ----
if (defined $attachment && (length($attachment) > 0)) {
$top->attach(Data => $attachment,
Type => $attachment_type,
+ Filename => $attachname, # added by dsweet@tgd-inc.com on
+ # 20030116
Encoding => '-SUGGEST');
}
#

I encourage the acmemail team to incorporate the bug fix into a new
release of the stable version of acmemail and close this bug.

--dsweet@tgd-inc.com


Date: 2003-01-15 23:23
Sender: nobody

Logged In: NO

Just in case the bug may have been fixed in 2.2.4, I thought I would
upgrade. No joy though.

--dsweet


Date: 2002-11-01 00:12
Sender: nobody

Logged In: NO

My email address is dsweet@tgd-inc.com.


Log in to comment.




Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.