bincimap

Log | Files | Refs | LICENSE

tomaildir++ (876B)


      1 #! /usr/bin/perl
      2 
      3 # This program is free software; you can redistribute it and/or modify
      4 # it under the terms of the GNU General Public License as published by
      5 # the Free Software Foundation; either version 2 of the License, or
      6 # (at your option) any later version.
      7 
      8 # You should have received a copy of the GNU General Public License
      9 # along with this program; if not, write to the Free Software
     10 # Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307,
     11 # USA.
     12 
     13 # This file is a part of Binc IMAP.
     14 
     15 # Convert file entries to corresponding IMAPdir mailbox names.
     16 # Use this script like this to add all IMAPdir entries to the
     17 # subscription file:
     18 #
     19 # ls -a IMAPdir | toimapdir > IMAPdir/.bincimap-subscribed
     20 
     21 while (<>) {
     22     unless (/^[^\.]/ or /^\.$/ or /\.\./) {
     23 	chomp;
     24 	s|\.|/|g;
     25 	s|\\\.|\.|g;
     26 	s|\\\\|\\|g;
     27 	s|^/|\.|;
     28 	s|^\.(.*)|INBOX/$1|;
     29 	print "$_\n";
     30     }
     31 }