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
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
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
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
This has been determined to be difficult. For now users can upload content to the website and manually include a link.
#5
... Has this been given up yet?
Just think how much useful it would be to support attachments in/out! I really need it.
#6
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
Moving to 4.7
#8
We are back on for adding inbound mail attachments as posts to the group.
#9
What a GREAT news!
Thank you sooooo much!
#10
yeee HAW!!!!!
i am from texas and this is important.
#11
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)
);
#12
I tested but do not see the attachments added to the /tmp directory. Is it possible it's a write issue for Postfix?
#13
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
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.
#15
I am getting this error:
Any ideas?
#16
Tested successfully.
#17
applied, leaving at "active" since the module part needs to be done.
#18
Here's patch in progress.
#19
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.
#20
This patch corrects an error with the update method in og2list.install responsible for creating the og2list_attachment table.
#21
since the other path already got applied the neew patch should be agsint the current version in cvs.
#22
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