开发者

email attachments to server

I want someone to be able to email something (image, video, text) and then have that data be saved on my server in a special directory (the one representing the email address) and if possible take the text wi开发者_如何学Pythonth the email and put the data into a database (tags, title, etc).

What is the best way to do this?


The best way to do this is to run a mail server on the server, and have it output email to a particular address to a command. This command will then parse the email and handle saving the attachment and writing to the database.

Try the Postfix mail server and a | foo.sh alias. The script can be written in whatever language you like. Choose something which will make decoding the email easy.


What is the best way to do this?

If you've no idea where to start then I'd recommend posting a question somewhere like Stack Overflow, providing the relevant information needed for people to suggest a solution, including:

  1. the OS where the mail server resides
  2. whether php can be run on this box or if it needs to be located elsewhere
  3. the software in use for the email service - and whether this could be changed easily
  4. the relevance of timing between delivering an email and content being available

Peering into my crystal ball, the best solution would be a php script triggered via procmail

C.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜