attachment support - inbound mail

Veggieryan - June 13, 2006 - 07:56
Project:Organic groups list manager
Version:4.7.x-1.x-dev
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:needs work
Description

just making sure this is on the list.
if you could autmatically make nodes for images, audio and video that would be amazing! they would be private and assigned to the respective groups of course....

thanks!
ryan..

#1

Amazon - August 30, 2006 - 14:58

I assume this involves posting files locally with Perl and adding a link to incoming messages. Outgoing I assume just includes a link to the file on the server. If possible we should make the files private to the OG.

Kieran

#2

killes@www.drop.org - August 30, 2006 - 17:27

incomign attachements should be treated like any other Drupal attachements. This would require comment_upload module for new comments.

Outgoing mail that is created at the www-frontend already gets a link at the bottom.

#3

Amazon - August 30, 2006 - 23:19

http://drupal.org/project/comment_upload

I assume some some inbound emails are forum topics and some are comments.

How does the file get from mail-in.pl to comment_upload? How does the file get from mail-in.pl to forumtopic attachement?

#4

Amazon - September 6, 2006 - 07:45
Priority:normal» minor
Status:active» postponed

This has been determined to be difficult. For now users can upload content to the website and manually include a link.

#5

hiweed - September 18, 2006 - 03:03

... Has this been given up yet?
Just think how much useful it would be to support attachments in/out! I really need it.

#6

Amazon - September 25, 2006 - 14:51

Attachments can still be added to Drupal manually, and then linked to. The only difference is it's not manually posted to the Drupal site after being send by email. Outbound links to attachments currently works.

#7

Amazon - October 5, 2006 - 16:03
Version:HEAD» 4.7.x-1.x-dev

Moving to 4.7

#8

Amazon - October 24, 2006 - 04:37
Title:attachment support» attachment support - inbound mail
Priority:minor» critical
Status:postponed» active

We are back on for adding inbound mail attachments as posts to the group.

#9

hiweed - October 30, 2006 - 03:09

What a GREAT news!
Thank you sooooo much!

#10

Veggieryan - November 2, 2006 - 01:56

yeee HAW!!!!!

i am from texas and this is important.

#11

galapas - November 14, 2006 - 22:15

The attached patch is the first step toward completing this enhancement request.

It presently extracts the attachment(s) from inbound mail and saves it (them) to /tmp.

Anyone interested in testing should apply their focus to a range of file types to ensure they are recreated correctly.

Shortly, I will apply another patch that will populate the og2list_attachment table (definition below) for each attachment found on a message.

--
-- mail-in.pl removes attachments from incoming mail and
-- populates og2list_attachment using the FK mid from the
-- placement of the actual mail body in og2list_outgoing_content
--
CREATE TABLE og2list_attachment (
-- Seriel ID
fid int(10) unsigned NOT NULL auto_increment,
-- FK for messages in og2list_incoming_content.
mid int(10) unsigned NOT NULL default 0,
filename varchar(255) NOT NULL default '',
content_type varchar(255) NOT NULL default '',
-- Medium Blob allows for 2^24 bytes (16Mb) which
-- is greater than most mail servers will allow
payload MEDIUMBLOB,
-- Disposition may be 'inline' or 'attached'
disposition varchar(255) NOT NULL default '',
PRIMARY KEY (fid)
);

AttachmentSize
mail-in.attachment-save.patch 2.33 KB

#12

Amazon - November 14, 2006 - 23:51

I tested but do not see the attachments added to the /tmp directory. Is it possible it's a write issue for Postfix?

#13

galapas - November 15, 2006 - 15:03

A write issue is a true possibility. If you edit mail-in.pl and look for File::Spec you will see where '/tmp' is specified. You could try changing this to a directory owned by Postfix. I will have the patch available shortly for the database write; however, I will leave the file write as a debug option.

#14

galapas - November 15, 2006 - 19:09

This is the next step toward completing the enhancement to support attachments.

The patch mail-in.save2db will save inbound attachments to the table og2list_attachment table defined previously.

Additionally, if mail-in.pl is run in debug mode ('-d'), the attachment will be saved to '/tmp' unless a file of the same name already exists there.

Shortly I will post the update to mail-out.pl to complement the attached.

AttachmentSize
mail-in.save2db.patch 4.46 KB

#15

Amazon - November 15, 2006 - 19:59

I am getting this error:

Nov 15 11:45:59 beta2 pipe[92415]: fatal: pipe_comand: execvp /home/og2list/mail-in.pl: Permission denied

Any ideas?

#16

Amazon - November 15, 2006 - 20:31
Status:active» reviewed & tested by the community

Tested successfully.

#17

killes@www.drop.org - November 15, 2006 - 20:32
Status:reviewed & tested by the community» active

applied, leaving at "active" since the module part needs to be done.

#18

Amazon - November 17, 2006 - 03:13

Here's patch in progress.

AttachmentSize
og2list.attachment.patch 650 bytes

#19

galapas - November 28, 2006 - 15:38

The _install function has been augmented in og2list.install to create the og2list_attachment table during installation.

As previously posted, the update function for this new table is provided as well.

AttachmentSize
og2list.install.attachment-a.patch 1.96 KB

#20

galapas - December 12, 2006 - 16:13

This patch corrects an error with the update method in og2list.install responsible for creating the og2list_attachment table.

AttachmentSize
og2list.install.attachment-b.patch 2 KB

#21

killes@www.drop.org - December 15, 2006 - 12:06
Status:active» needs work

since the other path already got applied the neew patch should be agsint the current version in cvs.

#22

coltrane - December 19, 2006 - 21:34

I'm not clear on the extent of what this patch does but any chance of attachment acceptance being optional?

Please see my feature request about this: http://drupal.org/node/104306

 
 

Drupal is a registered trademark of Dries Buytaert.