<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:Arial;">Hi Walter,<br></div>
<div style="font-family:Arial;"><br>The only way to remove attachments is to replace the message with an edited copy of the message. You can't alter emails in an IMAP mailstore once they are delivered.</div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">At FastMail we're using the attached Perl module to strip attachments from emails for our "remove attachments" feature. It's not pretty, but it gets the job done. It needs to be hooked up to some code that actually connects via IMAP and does the work.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Cheers,<br></div>
<div style="font-family:Arial;"><br>Bron.<br></div>
<div><br></div>
<div><br></div>
<div>On Thu, 19 Oct 2017, at 22:10, Walter H. via Info-cyrus wrote:<br></div>
<blockquote type="cite"><div>Hello,<br></div>
<div><br></div>
<div>my energy supplier sends a daily mail about the electricity power<br></div>
<div>consumption of the previous day;<br></div>
<div>these mails have two attachment - one .csv and one .xml<br></div>
<div><br></div>
<div>I'd like to remove the .xml attachments from the mails already stored in<br></div>
<div>the cyrus database, as these are bigger and really not needed;<br></div>
<div>how would I achieve this?<br></div>
<div>(how to delete these from each file in the database is not problem)<br></div>
<div><br></div>
<div>why I would like to do this: saving storage ...<br></div>
<div><br></div>
<div>the directory has these files:<br></div>
<div><br></div>
<div>1.<br></div>
<div>2.<br></div>
<div>3.<br></div>
<div>...<br></div>
<div>10007.<br></div>
<div>10008.<br></div>
<div>cyrus.cache<br></div>
<div>cyrus.header<br></div>
<div>cyrus.index<br></div>
<div>cyrus.squat<br></div>
<div><br></div>
<div>my system: CentOS 6, Cyrus v2.3.16-Fedora-RPM-2.3.16-15.el6<br></div>
<div><br></div>
<div>Thanks,<br></div>
<div>Walter<br></div>
<div><br></div>
<div>----<br></div>
<div>Cyrus Home Page: <a href="http://www.cyrusimap.org/">http://www.cyrusimap.org/</a><br></div>
<div>List Archives/Info: <a href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/">http://lists.andrew.cmu.edu/pipermail/info-cyrus/</a><br></div>
<div>To Unsubscribe:<br></div>
<div><a href="https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus">https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus</a><br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div id="sig56629417"><div class="signature">--<br></div>
<div class="signature"> Bron Gondwana, CEO, FastMail Pty Ltd<br></div>
<div class="signature"> brong@fastmailteam.com<br></div>
<div class="signature"><br></div>
</div>
<div style="font-family:Arial;"><br></div>
</body>
</html>