这可能是一个奇怪的请求,但我知道必须有办法。这就是我所拥有和想做的事情:
Input:
1) An email is sent with an attachment
2) The attached file is a jpg image
Output:
3) An email should be received with a tiny link in the email body
4) The tiny link should point to the image viewable in a browser
Additional Criteria:
5) The destination email address to which the original message is sent can be altered
6) The format of the original mail cannot be altered; the image is always attached
7) The process must be automated, triggered by the original email
我有gmail帐户和Linux服务器可能会被使用,但不知道从哪里开始。我搜索了很多,发现很多软件做了类似的任务,但没有特别的。这似乎是一项相当复杂的任务,我可以使用一些想法。任何帮助表示赞赏。
答案 0 :(得分:1)
这是一个挑战但我设法完成它。方法如下:
Input:
1) Send the email with attachment to local postfix smtp server
Processing:
2) Have postfix call procmail when email is received
3) Use procmail as a filter to conditionally call a script
Custom script:
4) Use munpack to convert the attachment to file
5) Use a script to upload the image file to imgur
6) Use a script to make the imgur link tiny
Output:
7) Send an email using mutt with the link in the body
我遇到的主要问题是在尝试向本地postfix服务器发送电子邮件的客户端中设置postfix并查找错误。我使用了一系列教程,IRC和工具来调试,但是tcpdump透露了最后的吸烟枪。