Репозитории 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 |
Группа :: Система/Серверы
Пакет: cyrus-imapd
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/usr/bin/perl
#
# Usage: inboxfer inputfile
#
# Purpose: Transfer messages from Berkeley-format inbox to Cyrus inbox
#
# Input: Text file containing one username per line
#
# Warning: Do not use this script to transfer messages into a Cyrus
# mailbox that already contain messages. Existing messages
# will be overwritten.
#
#$Id: AppendixA-03,v 1.1 2000/11/13 00:12:51 root Exp $
$mailstore = "/var/spool/imap"; # Cyrus mailstore
$oldspool = "/var/spool/mail"; # Old mail spool
$cat = "/bin/cat"; # /usr/bin/cat on Solaris
$formail = "/usr/bin/formail";
$pwd = "/usr/lib/cyrus-imapd";
$cpmsg = "cpmsg";
$cmd = "$formail -n 20 -s $pwd/$cpmsg";
$users = "$ARGV[0]";
if (!$users) { die "Usage: $0 $users\n"; }
open(USERS,"$users") || die "can't open $users";
while (<USERS>) {
chop;
$inbox = "$oldspool/$_";
$prefix = substr($_,0,1);
system("$cat $inbox | $cmd $mailstore/$prefix/user/$_");
}