fsr / detach Goto Github PK
View Code? Open in Web Editor NEW📬 Detach attachments from moderated mails into a configurable directory and re-send the original mail without attachments.
License: GNU General Public License v3.0
📬 Detach attachments from moderated mails into a configurable directory and re-send the original mail without attachments.
License: GNU General Public License v3.0
The recent mail to fsr@ (14.09.2016, 11:58) links to a correct directory but the file extension of the pdf is broken
Bestellformular akademika 2016.pdf"; size=844052; creation-date="Wed, 14 Sep 2016 09:38:46 GMT"; modification-date="Wed, 14 Sep 2016 09:38:46 GMT
As pointed out in offline discussions, detach does not recognise some attachments from Apple Mail because it inlines them.
This produces something like the following:
--Apple-Mail=_FF297101-ED64-4306-A433-DA2DB722FFB0
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename=171214_Kachel_Campus_Weihnachten.png
Content-Type: image/png;
name="171214_Kachel_Campus_Weihnachten.png"
Content-Id: <[...]@ifsr.de>
[Base64-Blob]
As opposed to normal attachments, the Content-Disposition
field is set to inline, which is unfortunate because detach bases its recognition on this field.
Maybe we could extend the attachment criteria to include any message parts that are inline
, but also of type application/pdf
, image/png
, image/jpg
etc. This would be a kind of hacky solution but better than nothing. What do you think, @cirdeirf?
In line 266, process_mail()
is called with three arguments, but it's only defined with two arguments, causing an error after selecting a mail to process.
found matching mail:
Subject: FSR Veröffentlichung von [redacted] erfordert Bestätigung
nested Subject: [redacted]
Process mail? [Y/n]y
Traceback (most recent call last):
File "detach.py", line 340, in <module>
run(maildir, conn, exclude_seen, dir_pattern)
File "detach.py", line 266, in run
parsed, nested, dir_pattern
TypeError: process_mail() takes 2 positional arguments but 3 were given
If the SMTP server disconnects detach.py due to a timeout (we currently connect immediately to detect problems with the SMTP server configuration as early as possible), mail handling fails.
The ideal solution would be to re-connect if the SMTP server has disconnected the client due to a timeout.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.