How about simply being a worthwhile mental exercise? I have found the conversation interesting, and it has made me think a bit. Seems like a sufficient purpose in and of itself.What is the goal of this discussion?
Stopping Spam Idea
Moderator: General Moderators
- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
Re: Stopping Spam Idea
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Stopping Spam Idea
I hadn't chimed into this thread until now but just in case you're not aware of it, RFC 2046 defines a "message/external" content type.
The standard content-type is message/rfc822 since it renders a message according to RFC 822 (or more recently 2822). message/external actually "downloads" the message from a remote source which can be a remote mailbox, a file on disk or an FTP site for example. Other sources could be implemented easily enough. The way it works is by sending only the headers and when opened the mail client downloads the content from the remote source.
The standard content-type is message/rfc822 since it renders a message according to RFC 822 (or more recently 2822). message/external actually "downloads" the message from a remote source which can be a remote mailbox, a file on disk or an FTP site for example. Other sources could be implemented easily enough. The way it works is by sending only the headers and when opened the mail client downloads the content from the remote source.
Re: Stopping Spam Idea
I wonder how many mail clients actually support that.Chris Corbyn wrote:I hadn't chimed into this thread until now but just in case you're not aware of it, RFC 2046 defines a "message/external" content type.
The standard content-type is message/rfc822 since it renders a message according to RFC 822 (or more recently 2822). message/external actually "downloads" the message from a remote source which can be a remote mailbox, a file on disk or an FTP site for example. Other sources could be implemented easily enough. The way it works is by sending only the headers and when opened the mail client downloads the content from the remote source.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Stopping Spam Idea
Never tested it, but I'm going toastions wrote:I wonder how many mail clients actually support that.Chris Corbyn wrote:I hadn't chimed into this thread until now but just in case you're not aware of it, RFC 2046 defines a "message/external" content type.
The standard content-type is message/rfc822 since it renders a message according to RFC 822 (or more recently 2822). message/external actually "downloads" the message from a remote source which can be a remote mailbox, a file on disk or an FTP site for example. Other sources could be implemented easily enough. The way it works is by sending only the headers and when opened the mail client downloads the content from the remote source.
EDIT | RFC 2046 is not a small-time non-important RFC by the way... it's the second in a series of 5 major RFCs which define MIME message structures.
-
mpetrovich
- Forum Commoner
- Posts: 55
- Joined: Fri Oct 19, 2007 2:02 am
- Location: Vancouver, WA, USA
Re: Stopping Spam Idea
RFC 2046 defines a "message/external" content type.
I wonder how many mail clients actually support that?
Well this is pretty fascinating. So, after a few hours of research, I sent myself a message using using "message/external" headers. I sent this to Thunderbird and a SquirrelMail Webmail account. What I got was the text file with the parameters for the "message/external" header. In Thunderbird and SquirrelMail, it came in as an attachment. In this case I used an Anonymous FTP as the access-type, although my test target did not really exist. I was wanting to see if I would get an error or it would try to find it, or give me a notice. Either this might not be supported yet, or my headers were not correct.Never tested it, but I'm going to
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Stopping Spam Idea
If you post here I'd be willing to help you outmpetrovich wrote:Either this might not be supported yet, or my headers were not correct.
-
mpetrovich
- Forum Commoner
- Posts: 55
- Joined: Fri Oct 19, 2007 2:02 am
- Location: Vancouver, WA, USA
Re: Stopping Spam Idea
Here is the code I used, with the php mail function. I started with using anon-ftp as the access type as a test. The first example gives me the name, site, access-type, and directory as a text attachment.
There is also an access-type="URL" which actually might be better to use (RFC 2017). I have been trying that as well. If I could use URL="http://mysite.com/messages/message.php?m=messageid" I could do some cool stuff. As configured, this just gives me the same thing. Although, the URL is rendered as a link by the e-mail program.
Code: Select all
$MailCR = "\n";
$headers = 'From: Me <me@mydomain.com>'.$MailCR;
$headers .= 'MIME-Version: 1.0'.$MailCR;
$headers .= 'Content-Type: Message/External-body'.$MailCR;
$headers .= 'name="myfile.txt"'.$MailCR;
$headers .= 'site="mydomain.com"'.$MailCR;
$headers .= 'access-type="anon-ftp"'.$MailCR;
$headers .= 'directory="testmail"'.$MailCR;
$mymail = mail('dest@yourdomain.com', "Test External Mail", '', $headers);
Code: Select all
$headers = 'From: Me <me@mydomain.com>'.$MailCR;
$headers .= 'MIME-Version: 1.0'.$MailCR;
$headers .= 'Content-Type: Message/External-body'.$MailCR;
$headers .= 'access-type=URL'.$MailCR;
$headers .= 'URL="http://mysite.com/messages/test.txt"'.$MailCR;
$headers .= 'size=748'.$MailCR;
$mymail = mail('dest@yourdomain.com', "Test External Mail", '', $headers);
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Stopping Spam Idea
Without studying your headers any closer than structurally, they're invalid
When lines wrap in a singe headers they need some linear whitespace in front of the wrapped sections, and semi-colons before each parameter.
I'd be a bit jubious as to whether the mail() function won't screw with those headers too.
Code: Select all
$MailCR = "\n";
$headers = 'From: Me <me@mydomain.com>'.$MailCR;
$headers .= 'MIME-Version: 1.0'.$MailCR;
$headers .= 'Content-Type: message/external-body;'.$MailCR;
$headers .= ' name="myfile.txt";'.$MailCR;
$headers .= ' site="mydomain.com";'.$MailCR;
$headers .= ' access-type="anon-ftp";'.$MailCR;
$headers .= ' directory="testmail"'.$MailCR;
$mymail = mail('dest@yourdomain.com', "Test External Mail", '', $headers);-
mpetrovich
- Forum Commoner
- Posts: 55
- Joined: Fri Oct 19, 2007 2:02 am
- Location: Vancouver, WA, USA
Re: Stopping Spam Idea
I fixed the headers per your instructions. I get the same response, so it must have been forgiving. I am wondering if the email programs simply display the message/external-body parameters and that is all there is.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Stopping Spam Idea
Yeah I tried a few approaches and couldn't get it working. You still had it a bit wrong according to the RFC (you need the content-type and a content-id header on the body headings). It sends the body as an attachment if you use external-body on the main message headers, but if you do this it just gives a blank screen:
Code: Select all
From: Chris Corbyn <chris@w3style.co.uk>
To: chris@w3style.co.uk
MIME-Version: 1.0
Subject: External body test
Content-Type: multipart/mixed; boundary="_=_foo_=_"
--_=_foo_=_
Content-Type: message/external-body; access-type=anon-ftp; name="/test.txt";
site=ftp.swiftmailer.org
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-ID: <foobar123456@swiftmailer.org>
--_=_foo_=_--