# Copyright (c) 2009 by Joseph Devietti (devietti@cs.washington.edu).
# This file is part of the tbird2gmail program.
# Tbird2gmail is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Tbird2gmail is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Tbird2gmail. If not, see .
import gdata.apps.migration.service
from optparse import OptionParser
import os, sys, socket, time
import email, mailbox
import pdb
# Google's max upload size is listed as 32MB, but we play it safe
MAX_UPLOAD_SIZE = 31 << 20 # 31 MB
MAX_BACKOFF_SECONDS = 600
OUTPUT_TAG = "tbird2gmail"
FAILURE_REASON_HEADER = 'X-Tbird2gmail-Upload-Failure-Reason'
TEST_EMAIL_MESSAGE = '''Received: by 140.23.6.190 with HTTP; Mon, 16 Jul 2007 10:12:26 -0700 (PDT)\r
Message-ID: \r
Date: Mon, 16 Jul 2007 10:12:26 -0700\r
From: "tbird2gmail script"