Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

FWD As Attachment And .eml extension

Quote Reply
FWD As Attachment And .eml extension
Forward as Attachment causes .eml extension attachment.
.eml could be a filtered type of attachment and could also cause a Reject at SMTP level.

I LOVE YOU type of Viruses with quoted or unquoted filename used this type of extension if i am not worng. This could lead to high possibility of such forwards failing to make it to destination if the destination server rejects at SMTP time.

Any thoughts?

HyTC
Quote Reply
Re: [HyperTherm] FWD As Attachment And .eml extension In reply to
In Reply To:
I LOVE YOU type of Viruses ...

Wasn't that the Barney virus? Or was that the U LOVE ME strain? :)

Anyhow, it looks like that extension is hard coded in GMail::Compose.pm:

Code:
my $write = "$attachdir/";
$write .= ($IN->escape($msg->{msgs_subject}) || 'message') . '.eml';

The problem with chaning the extension is that it most likely won't automagically open in the mail client when you double click the attachment. That may be a (security) feature to some though. Doesn't Outlook and OE send attached forwards as .eml?

~Charlie
Quote Reply
Re: [Chaz] FWD As Attachment And .eml extension In reply to
The documentation of Exim says that it is "I Love You" type of Virus or It's Variants.
On a default install of Exim (not customized individually), these extensions are considered unacceptable and the sender gets a message to pack it up as a zip and them resend.

Nodified with Exiscan Patch and CalmAV included, the message is just rejected at SMTP level.

Outlook (or it's variant) Yes aren't they the biggest source of pain on all virus counts?

HyTC
Quote Reply
Re: [HyperTherm] FWD As Attachment And .eml extension In reply to
Quote:
The documentation of Exim says that it is "I Love You" type of Virus or It's Variants.

Sorry, bad attempt at Barney humor. http://www.barney.com

Quote:
Outlook (or it's variant) Yes aren't they the biggest source of pain on all virus counts?

Outlook is not exactly the problem. It's just one of the many tools that these idiot spammers and script kiddies use to haunt us.

~Charlie
Quote Reply
Re: [Chaz] FWD As Attachment And .eml extension In reply to
Oh sorry for tha Bad Sense Of Humour Phase that i am passing through. Bugs have indeed taken out all sense of humour at this moment.

Yes it's always a fight between Good Guy Vs Bad Guy on the Spammers And Infiltrators so can't afford to leave a door open knowingly :)

HyTC
Quote Reply
Re: [HyperTherm] FWD As Attachment And .eml extension In reply to
Okay then, what would you suggest? The .eml extension is the mostly used extension for an rfc822 email attachment and I couldn't find any other extensions that were used for this purpose. We can't do anything if some virus decides to use the extension - many virii use .txt extension or .zip extension as well, does that mean you're not going to use them in emails too?

If you're really against this, then you can either change the code to use another extension, or remove the forward as attachment functionality.

Adrian
Quote Reply
Re: [brewt] FWD As Attachment And .eml extension In reply to
Fine.
I thought Yahoo's mechanism of handling the same (Sending as Inline or Attachment) was a case of reference and perhaps widely known amongst developers.

Mail from Yahoo Forwarded As Attachment gets thru w/o problems.
Mail from freemail.gossamer-threads.com Forwarded As Attachment Gets Rejected At SMTP level by servers which implement such policies (and many do). There is a bounce Message Lying in Anup's account on freemail.gossamer-threads and is typical of any Exim MTA under cpanel installation.

Unfortunately, it's not a question of personal likes or dislikes, it's a matter which has to get through the tests by and large and reference point is always existing popular services. We cannot blame a user of our's if he complains that the same mail forwarded as attachment from Yahoo to a given account gets through but forwarded from our service (gossamer mail) fails.

Hope i have been more precise this time and been able to express the same beyond the precincts of any *personal opinion*

HyTC
Quote Reply
Re: [HyperTherm] FWD As Attachment And .eml extension In reply to
Although large mail services like Yahoo often do things correctly, this is not always the case. For example, Yahoo's auto response emails use a content type of 'text' instead of 'text/plain'. However, since you say that your mail server is rejecting mail with .eml attachments (though I believe this is not a good thing) and there really is no REAL standard for an extension for emails and since most email clients should still be able to handle the email without the extension, I've decided to remove the extension from the file. Would such a change work with your mail server?

Adrian
Quote Reply
Re: [brewt] FWD As Attachment And .eml extension In reply to
It's not a question of my mailserver vs your mailserver. So please. To quote few cases beyond Yahoo (though i am not aware of what you have mentioned about auto responsder messages from yahoo it sounds completely alien to me at present):

squirellmail : uses .msg extension for fwd as attachments
openwebmail : again uses .msg extension for fwd as attachment

I would not delve into any commercial competing softwares here.

I am not running any home made version of MailServer. It's a standard Exim4.43-Exiscan-acl-Patch cPanel installation with following attachments definitely not treated as acceptable (both quoted or unquoted filename):

"(?:file)?name=(\"[^\"]+\\\\.(?:ad[ep]|ba[st]|chm|cmd|com|cpl|crt|eml|exe|hlp|hta|in[fs]|isp|jse?|lnk|md[be]|ms[cipt]|pcd|pif|reg|scr|sct|shs|url|vb[se]|ws[fhc])\")"

So whatever does not work for Exim-Exiscan-ACL-Patch installs under cpanel would also not work on our server too.

HyTC
Quote Reply
Re: [HyperTherm] FWD As Attachment And .eml extension In reply to
I could live with using the .msg extension as well.

The problem is, what happens when that patch decides to add that to the list of filenames to ban? I don't think that kind of filtering should be done by the mail server itself just based on the attachment's filename. This should be the job of a virus scanner.

Anyways, my point is that I don't mind changing the extension, but I only want to do it once and the change would be to something that would be somewhat standard (and makes sense). .eml is the 'standard' for windows, but most mail clients should be able to handle any filename (or none as yahoo does) as long as the content-type is correctly set.

Adrian
Quote Reply
Re: [brewt] FWD As Attachment And .eml extension In reply to
Choice of alternative etension or no extension would be entirely GT's decision. I go more by emperical testing and reporting back. Since the Fwded Mail From the test account Bounced back i reported the same.

True there could be difference of opinion on what's right and what's wrong with respect to system wide filtering. Googling does reveal that the list of extensions provided are being used system wide by many. To quote an example, what would happen for an attachment like something.exe.eml etc etc .. I know not so i ask this in event of that filtering be left out .. Can a local hard disk wipe out be possible with something like that?

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] FWD As Attachment And .eml extension In reply to
Hi Adrian,

Quote:
I could live with using the .msg extension as well.

Do you think it would be overkill to have this as a setting in the admin? Allow it to be blank for no extension? I think removing the extension completely would confuse some people. Setting it to another hard coded value will eventually put you back in the same boast as you already mentioned.

~Charlie

p.s. If not, my vote is for no extension.

Last edited by:

Chaz: Oct 13, 2004, 8:40 PM
Quote Reply
Re: [Chaz] FWD As Attachment And .eml extension In reply to
Here's a patch that will make it not include a filename for forward as attachment emails.

Code:
--- admin/GMail/Compose.pm 16 Oct 2004 00:21:49 -0000 1.132
+++ admin/GMail/Compose.pm 18 Oct 2004 21:00:39 -0000
@@ -143,7 +143,7 @@
if ($USER->{opts}->{compose}->{forward_as_attachment} or $IN->param('as_attach')) {
$message = ''; # Empty message body.
my $write = "$attachdir/";
- $write .= ($IN->escape($msg->{msgs_subject}) || 'message') . '.eml';
+ $write .= 'forwarded_rfc822_email-' . time . '.eml';

my $checksum = $msg->{msgs_checksum};
my $p = substr($msg->{msgdata_filename}, 0, 1) . '/' . substr($msg->{msgdata_filename}, 1, 1) . '/' . substr($msg->{msgdata_filename}, 2, 1);
@@ -706,11 +706,12 @@
for ($IN->param('compose_attachments')) {
my $tmp = $IN->escape($_);
-e "$attach_dir/$tmp" or return $self->error("ATTACHERR_EXIST", "WARN");
- push @attachments, {
- body_path => "$attach_dir/$tmp",
- encoding => '-guess',
- filename => $_
- };
+ my %attachment = (
+ body_path => "$attach_dir/$tmp",
+ encoding => '-guess'
+ );
+ $attachment{filename} = $_ unless /^forwarded_rfc822_email-\d+\.eml$/;
+ push @attachments, \%attachment;
}
if (-d $attach_dir and $fields->{compose_is_html}) {
my $upl = \do { local *FH; *FH };

Adrian