1

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

2 Answers2

1

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.

symcbean
  • 19,931
  • 1
  • 29
  • 49
0

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

Chris N
  • 687
  • 3
  • 8