Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does anyone know of FOSS solutions (or general information) on setting up a Linux-bases SMTP mail relay that can do the following:

  • Detect if a message has an attachment
  • if so, save the attachment to a web-based storage solution
  • remove the attachment from the message and insert a link to the file

Thanks

share|improve this question

2 Answers 2

up vote 1 down vote accepted

The Python Milter package comes bundled with a sample script which removes attachments deemed as dangerous and inserts a message - should be simlpe to adapt.

share|improve this answer

I've used Ruby to do something similar. In my case I was trying to process MMS/SMS. There are some solutions out there for this.

Here's a good starting point, which is useful in general up to at least the point where they describe implementing a filter in postfix, which is probably the best method for actually handling mail programatically on linux without writing your own SMTP server.

http://railsmagazine.com/articles/3

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.