Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: How to create a folder using IMAPLib? Date: Thu, 19 Nov 2015 07:35:36 +1100 Lines: 14 Message-ID: References: <564CD930.9000005@cajuntechie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de w2UglDtAhFAfLL/LZq+Xjwj6MS5WNnUxDwx5b/U9QvMw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'subject:How': 0.09; 'spec': 0.09; 'subject:create': 0.09; 'subject:using': 0.09; 'thu,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:folder': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'command': 0.26; 'message- id:@mail.gmail.com': 0.27; 'host': 0.28; "i'm": 0.30; 'folder': 0.30; 'anyone': 0.32; 'another': 0.32; 'source': 0.33; 'machine.': 0.33; "i'll": 0.33; 'server': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'nov': 0.35; 'quite': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'delete': 0.38; 'sure': 0.39; 'does': 0.39; 'called': 0.40; 'here.': 0.62; "they're": 0.66; 'special': 0.73; 'obvious': 0.76; 'chrisa': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=Yswf69eSgYJ//eThdMMLx9+Ehojfq1doBQPN3KQPuPo=; b=QsoarRxOcKhlxPdIg4Sgh5RHtiy2daV0uvjjCrVIVQebs9YlPj/hbmzDjFDwDD83iR 1TVBy3zvecho10ZTxxj6EvmuSUUV3lFPIxtJO8rzmCoyIai5ettSXvRHZmCT1xY8A0rn MKbJDIrugncWBIfRHQfrGRCL6pIeDK0V/GJ6bfpSQZy4XzVN2yMYG/ozUlPh16vYsV67 NlqGUu4X++4HbL31CVrIAoh7XKPrnIFp9jnj/kZYwnpNcrr7HlKlf1KCEaqhZ2dsFD6Y IQJfMA50YLn+bs20SSGVgbMdABSBERYrsq5WkbZu+cHrP0VhxfZzQSdvn657hVh2/IjI NOCg== X-Received: by 10.50.93.72 with SMTP id cs8mr5206084igb.13.1447878937024; Wed, 18 Nov 2015 12:35:37 -0800 (PST) In-Reply-To: <564CD930.9000005@cajuntechie.org> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98998 On Thu, Nov 19, 2015 at 7:01 AM, Anthony Papillion wrote: > I'm writing a program to help migrate mail from one host to another > with a few special circumstances. I'm able to get a list off of the > source IMAP server using the .list() command but I'm not quite sure > how to create a folder on the target machine. > > Does anyone know how to create a folder using IMAPlib? They're called "mailboxes", which I'll admit is not the most obvious name, but imaplib is following the IMAP spec here. You can create them with .create() and delete them with .delete(). ChrisA