Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37524301
en ru br
Репозитории ALT
S:3.2.8-alt1
5.1: 2.4.12-alt0.M51.1
4.1: 2.3.13-alt1.M41.1
4.0: 2.3.16-alt0.M40.1
+backports:2.3.11-alt0.M40.1
3.0: 2.2.12-alt3
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: cyrus-imapd

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/usr/bin/perl
#
# Usage: folderxfer inputfile
#
# Purpose: Converts contents of Berkeley-format mail folders
# to Cyrus mailboxes
#
# Input: Output of 'bsd2cyrus'
# (username:Cyrus-folder-name:Berkeley-folder-path)
#
# Warnings: The root mailbox and empty Cyrus folder must
# exist before conversion takes place, and source folders
# should be checked for RFC 822 content before being processed
#
#$Id: AppendixA-05,v 1.1 2000/11/13 00:12:51 root Exp $

$pwd = "/usr/lib/cyrus-imapd";
$mailstore = "/var/spool/imap"; # Cyrus mailstore
$cat = "/bin/cat";
$cmd = "/usr/bin/formail -n 20 -s $pwd/cpmsg";

$folders = "$ARGV[0]";
if (!$folders) { die "Usage: $0 filename"; }

open (MB,"$folders") || die "can't open $folders";

while (<MB>) {

chop;

# Be careful with this split - the last token might have
# whitespace we want to preserve

($user,$cyrusfolder,$folder) = split(/:/,$_,3);
@fields = split(/\./,$cyrusfolder);
$cyrfol = $fields[$#fields];

$fcat = "$cat \"$folder\"";
print $fcat;
$prefix = substr($user,0,1);
system ("$fcat | $cmd '$mailstore/$prefix/user/$user/$cyrfol'");
#print "'$mailstore/$prefix/user/$user/$cyrfol";
}
close MB;


 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin