<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>musc@> $daniele.rant &#124; Out-Blog &#187; GMail</title>
	<atom:link href="http://www.muscetta.com/category/gmail/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.muscetta.com</link>
	<description>Superior Dedication - Specialization is bullshit.</description>
	<pubDate>Tue, 26 Aug 2008 16:55:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Backup or Store stuff to GMail via IMAP in Ruby</title>
		<link>http://www.muscetta.com/2008/06/10/backup-or-store-stuff-to-gmail-via-imap-in-ruby/</link>
		<comments>http://www.muscetta.com/2008/06/10/backup-or-store-stuff-to-gmail-via-imap-in-ruby/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 18:49:44 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[GMail]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/?p=279</guid>
		<description><![CDATA[Once upon a time, I used to store some automated small backups into GMail just by having the scheduled backup send an email to my GMail account. At one stage they blocked me from doing so, marking those repeated email as SPAM.
After that, I took a different approach: I kept sending the mail on the [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, I used to store some automated <b>small</b> backups into GMail just by having the scheduled backup send an email to my GMail account. <a href="http://www.muscetta.com/2006/10/07/google-has-pissed-me-off-this-week/">At one stage they blocked me from doing so, marking those repeated email as SPAM</a>.</p>
<p>After that, I took a different approach: I kept sending the mail on the SAME server as the backup, and using IMAP I could DRAG-and-DROP the backup attachment from the mailbox on one server to the mailbox on another server (=GMail). They did not mark me as a spammer that way, of course.<br />
So that worked for a while, but then I got tired of doing this manually.</p>
<p>So the following ruby script is the way I automated the &#034;move offsite&#034; part of that backup.<br />
For completeness, I will give the due credits about who set me on the right track: I started off by <a href="http://wonko.com/post/ruby_script_to_sync_email_from_any_imap_server_to_gmail">this example by Ryan</a>.</p>
<pre><span class="comment">#!/usr/bin/env ruby</span>
<span class="ident">begin_</span> <span class="punct">=</span> <span class="constant">Time</span><span class="punct">.</span><span class="ident">now</span>

<span class="comment">#includes</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">net/imap</span><span class="punct">'</span>

<span class="comment">##Source Info</span>
<span class="global">$SRCSERVER</span><span class="punct">="</span><span class="string">mail.muscetta.com</span><span class="punct">"</span>
<span class="global">$SRCPORT</span><span class="punct">=</span><span class="number">143</span>
<span class="global">$SRCSSL</span><span class="punct">=</span><span class="constant">false</span>
<span class="global">$SRCUSERNAME</span><span class="punct">="</span><span class="string">daniele</span><span class="punct">"</span>
<span class="global">$SRCPASSWORD</span><span class="punct">="</span><span class="punct">"</span>
<span class="global">$SRCFOLDER</span><span class="punct">="</span><span class="string">INBOX.Backups</span><span class="punct">"</span>

<span class="comment">##Destination Info</span>
<span class="global">$DSTSERVER</span><span class="punct">="</span><span class="string">imap.gmail.com</span><span class="punct">"</span>
<span class="global">$DSTPORT</span><span class="punct">=</span><span class="number">993</span>
<span class="global">$DSTSSL</span><span class="punct">=</span><span class="constant">true</span>
<span class="global">$DSTUSERNAME</span><span class="punct">="</span><span class="string">muscetta@gmail.com</span><span class="punct">"</span>
<span class="global">$DSTPASSWORD</span><span class="punct">="</span><span class="punct">"</span>
<span class="global">$DSTFOLDER</span><span class="punct">="</span><span class="string">Backup</span><span class="punct">"</span>

<span class="comment">#connect to source</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">connecting to source server <span class="expr">#{$SRCSERVER}</span>... <span class="escape">\n\n</span></span><span class="punct">"</span>
<span class="ident">srcimap</span> <span class="punct">=</span> <span class="constant">Net</span><span class="punct">::</span><span class="constant">IMAP</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="global">$SRCSERVER</span><span class="punct">,</span><span class="global">$SRCPORT</span><span class="punct">,</span><span class="global">$SRCSSL</span><span class="punct">)</span>
<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">login</span><span class="punct">(</span><span class="global">$SRCUSERNAME</span><span class="punct">,</span> <span class="global">$SRCPASSWORD</span><span class="punct">)</span>
<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">select</span><span class="punct">(</span><span class="global">$SRCFOLDER</span><span class="punct">)</span>

<span class="comment">#connect to destination</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">connecting to destination server <span class="expr">#{$DSTSERVER}</span>... <span class="escape">\n\n</span></span><span class="punct">"</span>
<span class="ident">dstimap</span> <span class="punct">=</span> <span class="constant">Net</span><span class="punct">::</span><span class="constant">IMAP</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="global">$DSTSERVER</span><span class="punct">,</span><span class="global">$DSTPORT</span><span class="punct">,</span><span class="global">$DSTSSL</span><span class="punct">)</span>
<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">login</span><span class="punct">(</span><span class="global">$DSTUSERNAME</span><span class="punct">,</span> <span class="global">$DSTPASSWORD</span><span class="punct">)</span>
<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">select</span><span class="punct">(</span><span class="global">$DSTFOLDER</span><span class="punct">)</span>

<span class="comment"># Loop through all messages in the source folder.</span>
<span class="ident">uids</span> <span class="punct">=</span> <span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_search</span><span class="punct">(['</span><span class="string">ALL</span><span class="punct">'])</span>
<span class="keyword">if</span> <span class="ident">uids</span><span class="punct">.</span><span class="ident">length</span> <span class="punct">&gt;</span> <span class="number">0</span>
	<span class="global">$count</span> <span class="punct">=</span> <span class="ident">uids</span><span class="punct">.</span><span class="ident">length</span>
	<span class="ident">puts</span> <span class="punct">"</span><span class="string">found <span class="expr">#{$count}</span> messages to move... <span class="escape">\n\n</span></span><span class="punct">"</span>

	<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_fetch</span><span class="punct">(</span><span class="ident">uids</span><span class="punct">,</span> <span class="punct">['</span><span class="string">ENVELOPE</span><span class="punct">']).</span><span class="ident">each</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">data</span><span class="punct">|</span>
		<span class="ident">mid</span> <span class="punct">=</span> <span class="ident">data</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">ENVELOPE</span><span class="punct">'].</span><span class="ident">message_id</span>

		<span class="comment"># Download the full message body from the source folder.</span>
		<span class="ident">puts</span> <span class="punct">"</span><span class="string">reading message... <span class="expr">#{mid}</span></span><span class="punct">"</span>
		<span class="ident">msg</span> <span class="punct">=</span> <span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_fetch</span><span class="punct">(</span><span class="ident">data</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">UID</span><span class="punct">'],</span> <span class="punct">['</span><span class="string">RFC822</span><span class="punct">',</span> <span class="punct">'</span><span class="string">FLAGS</span><span class="punct">',</span> <span class="punct">'</span><span class="string">INTERNALDATE</span><span class="punct">']).</span><span class="ident">first</span>

		<span class="comment"># Append the message to the destination folder, preserving flags and internal timestamp.</span>
		<span class="ident">puts</span> <span class="punct">"</span><span class="string">copying message <span class="expr">#{mid}</span> to destination...</span><span class="punct">"</span>
		<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">append</span><span class="punct">(</span><span class="global">$DSTFOLDER</span><span class="punct">,</span> <span class="ident">msg</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">RFC822</span><span class="punct">'],</span> <span class="ident">msg</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">FLAGS</span><span class="punct">'],</span> <span class="ident">msg</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">INTERNALDATE</span><span class="punct">'])</span>

		<span class="comment">#delete the msg</span>
		<span class="ident">puts</span> <span class="punct">"</span><span class="string">deleting messsage <span class="expr">#{mid}</span>...</span><span class="punct">"</span>
		<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">uid_store</span><span class="punct">(</span><span class="ident">data</span><span class="punct">.</span><span class="ident">attr</span><span class="punct">['</span><span class="string">UID</span><span class="punct">'],</span> <span class="punct">'</span><span class="string">+FLAGS</span><span class="punct">',</span> <span class="punct">[</span><span class="symbol">:Deleted</span><span class="punct">])</span>
		<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">expunge</span>

	<span class="keyword">end</span>

	<span class="comment">#disconnect</span>
	<span class="ident">dstimap</span><span class="punct">.</span><span class="ident">close</span>
	<span class="ident">srcimap</span><span class="punct">.</span><span class="ident">close</span>
<span class="keyword">end</span>

<span class="ident">total_time</span> <span class="punct">=</span> <span class="constant">Time</span><span class="punct">.</span><span class="ident">now</span> <span class="punct">-</span> <span class="ident">begin_</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">Done. RunTime: <span class="expr">#{total_time}</span> sec. <span class="escape">\n\n</span></span><span class="punct">"</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2008/06/10/backup-or-store-stuff-to-gmail-via-imap-in-ruby/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google has pissed me off this week!</title>
		<link>http://www.muscetta.com/2006/10/07/google-has-pissed-me-off-this-week/</link>
		<comments>http://www.muscetta.com/2006/10/07/google-has-pissed-me-off-this-week/#comments</comments>
		<pubDate>Sat, 07 Oct 2006 08:05:16 +0000</pubDate>
		<dc:creator>Daniele Muscetta</dc:creator>
		
		<category><![CDATA[Blogs]]></category>

		<category><![CDATA[Choice]]></category>

		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Cross Platform]]></category>

		<category><![CDATA[Cross Post]]></category>

		<category><![CDATA[GMail]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Hotmail]]></category>

		<category><![CDATA[ITVC]]></category>

		<category><![CDATA[Integration]]></category>

		<category><![CDATA[Interop]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Networking]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[Risk]]></category>

		<category><![CDATA[SPAM]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[WebSite]]></category>

		<guid isPermaLink="false">http://www.muscetta.com/?p=142</guid>
		<description><![CDATA[Now I pretty much liked GMail and Google in general. But this time they REALLY pissed me off! I will tell you that I am not a google-hater even if I work for a competing company. Of course not everything that Google does is wonderful, but some of their services are really cool and useful [...]]]></description>
			<content:encoded><![CDATA[<p>Now I pretty much liked GMail and Google in general. But this time they REALLY pissed me off! I will tell you that I am not a google-hater even if I work for a competing company. Of course not everything that Google does is wonderful, but some of their services are really cool and useful and I have never denied to say they rocked when I felt they did. <br />In general, people seem to love them, and their stock value shows it (with the launch of &#034;Code Search&#034; this week <a href="http://asert.arbornetworks.com/2006/10/static-code-analysis-using-google-code-search/">they made a lot of people scream &#034;how cool is this&#034;</a> so that they got back from&nbsp;just under 400&nbsp;dollars to 417!). But that&#039;s not the issue. That is cool, that works. It&#039;s ok they make money if they make cool tools. It&#039;s fine for me. </p>
<p>In fact i consider GMail&nbsp;as being&nbsp;one of the best interface for reading mail that exist&nbsp;out there - I love &#034;tagging&#034; (oops: it&#039;s called &#034;labelling&#034; in their syntax), speed of search through messages (even tough Outlook 2007 is faster on indexed content, but still you have to buy it and install it on your PC)&#8230; I also especially love the way it shows THREADING&#8230; so that I moved pretty much EVERY mailing list I read on their account: </p>
<p><a title="Photo Sharing" href="http://www.flickr.com/photos/dani3l3/262797621/"><img height="193" alt="Ma come se fa ?" src="http://static.flickr.com/96/262797621_6754165d10.jpg" width="500"/></a> <br />(ok, they could do better with the localized version of &#034;Re:&#034; in replies&#8230;. in Italian a lot of broken MUA&#039;s translate that into &#034;R:&#034; and that isn&#039;t understood by GMail and will make it think it is another thread&#8230;. but that&#039;s a minor issue, and also one that every MUA handling threading has - including &#034;mutt&#034; - the real problem is the broken MUAs sending the &#034;R:&#034; in the first place. But&nbsp;I digress too much&#8230;.).</p>
<p>I also keep GMail continuosly opened in a browser during the day because a lot of informative mail and that sent by friends goes there.&nbsp;This to say that&nbsp;I <strong>do</strong> get a lot of their ads (that is - the point of having such an application, for them&#8230;). <a href="http://mailcall.spaces.live.com/blog/cns!CC9301187A51FE33!4043.entry?_c11_blogpart_blogpart=blogview&amp;_c=blogpart#permalink">On the contrary, Windows Live Mail reduced its ads to show only one&#8230; not to annoy you too much</a>. <br />But the ads in GMail were not *really* a problem (I don&#039;t read them anyway, I just plain IGNORE THEM).</p>
<p>But&nbsp;this week they REALLY pissed me off. They REALLY have. And here is the reason: <br />I have been using a script for MONTHS to backup my database (the one powering THIS blog) and send it &#034;off-site&#034; to my GMail mailbox. Pretty much something like a lot of other people do, described in various <a href="http://www.varlinux.org/vl/html/modules/stories/article.php?storyid=6920">articles</a> and <a href="http://blog.netnerds.net/2006/04/backup-wordpress-to-gmail/">blog posts</a>. Then I was labelling them with a rule, so that I could access my backups easily in case I needed them.</p>
<p>Now I don&#039;t know if this violates their <a href="http://mail.google.com/gmail/help/terms_of_use.html">terms of use</a> in any way&#8230; because I am not really using it as storage with those programs that circulated at one stage that had &#034;reverse engineered&#034; it. Those were bypassing the web interface altogether so people did use it as storage with a program without having to see their ads. That was the issue, I think.&nbsp;In my case,&nbsp;I am just sending MAILS to myself. One per day. I also delete the old ones every now and then, and they are not even huge in sized (attachments of 40 to 50KB so far!!)&#8230; anyway, I know a lot of people that store documents and all sort of stuff even in their corporate mailboxes in Outlook (then maybe index them with <a href="http://www.microsoft.com/windows/desktopsearch/default.mspx">Windows Desktop Search</a> of Google Desktop to find it back)&#8230; I was only doing the same with GMail. I don&#039;t see the big issue here&#8230;.. they might think otherwise&#8230;. but from what happens I don&#039;t think that&#039;s the issue.</p>
<p>Anyway, now it&#039;s been three or four days that my backup mail gets rejected. My SMTP Server gets told: </p>
<p>host gmail-smtp-in.l.google.com[66.249.83.27] said: <br /><em>550-5.7.1 Our system has detected an unusual amount of unsolicited<br />550-5.7.1 mail originating from your IP address. To protect our <br />550-5.7.1 users from spam, mail sent from your IP address has been <br />550-5.7.1 rejected. Please visit <br />550-5.7.1 <a href="http://www.google.com/mail/help/bulk_mail.html">http://www.google.com/mail/help/bulk_mail.html</a> to review <br />550 5.7.1 our Bulk Email Senders Guidelines. <br /></em></p>
<p>Now for fuck&#039;s sake. You know how much I hate SPAMMERS and <a href="http://www.43things.com/things/view/13248">what I would like to do with them</a>. But I also know that it does happen to end up in RBLs and such sometimes. Fine. But&nbsp;GIVE ME&nbsp;a way to tell you that I am NOT one!&nbsp;If you go to the link above, all you find is a form where you can specify that mail that ended up in your &#034;junk&#034; folder actually wasn&#039;t spam. Yeah, right.&nbsp;In my case it does not even go into my &#034;junk&#034; folder! How am I supposed to give me the original header that arrived to THEM if I only have the one sent by my mailserver ? They just blacklisted my mail server&#039;s IP Address! As they say, I even have an SPF record, I always use the same address, etc&#8230;. <br />So I tried to fill in the form, the day after I also tried to contact their <a href="mailto:abuse@google.com">abuse@google.com</a> and <a href="mailto:abuse@gmail.com">abuse@gmail.com</a> addresses. <br />Still nothing. <br />They even tell you (in the automated reply when you contact &#034;abuse&#034;: <br /><em>&#034;[...] For privacy and security reasons, we may not reveal the final outcome of an abuse case to the person who reported it. [...]&#034;.<br /></em>How great. How am I supposed to know if they even READ my complaint ? </p>
<p>You anti-spam people at GMail: <strong>&#034;I am NOT a fucking spammer!!!!!&#034;</strong>. I &#039;haven&#039;t found a better way to tell ya this, you know, than writing it on my blog&#8230; this is just RIDICULOUS!</p>
<p>But to date my mails still get dropped. I&#039;ll probably have to send my backups somewhere else. At this point they pissed me off so much that I am also seriously considering getting back to use my own mailserver also for receiving and reading my mailing lists. Then I won&#039;t get ads there. <br />Afzetterij! <br />(I hope you have some dutch guy on board at Google, as &#034;Google Translate&#034; does not translate from/to dutch yet&#8230;. )</p>
<p>
<strong>Edited on October, 8th </strong>- While GMail REJECTS those mails (it SAYS it is not accepting them), Hotmail simply DROPS them (that is: it does not even SAY it is not accepting them): </p>
<p><em>to=<dani3l3 @hotmail.com>, relay=mx4.hotmail.com[65.54.245.104], delay=3, status=sent (250  &lt;20061008061010.GA19807@muscetta.com> Queued mail for delivery)</dani3l3></em></p>
<p>This way you THINK it is going to be delivered, but it NEVER shows up in your inbox. I don&#039;t know who&#039;s behaving the worst&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muscetta.com/2006/10/07/google-has-pissed-me-off-this-week/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
