From: Michelle K. <lin...@ta...> - 2008-09-30 15:51:05
|
Am 2008-09-22 17:59:18, schrieb Stefano Toni: > Hello Rob, I would like to know if exist an automatic retrieved. I cannot > known all the subfolder of all users. The only way to do this is to use a smapp perl script using "libnet-imap-simple-perl" (Debian Package) to get a list of packages and then add them dynamicaly to the command- line. This is, what I do if I have to migrate a Winsuck server to a Linux one. ----[ '~/bin/get_imap_folders' ]---------------------------------------- #!/usr/bin/perl use Net::IMAP::Simple; use strict; my $PASS=""; my $USER=""; my $HOST=""; my $SEPARATOR=","; my $imap = Net::IMAP::Simple->new($HOST) || die $Net::IMAP::Simple::errstr."\n"; unless($imap->login($USER, $PASS)){ die "Login failed: " . $imap->errstr() . "\n"; } my @mb=$imap->mailboxes; foreach (@mb){ print "$_$SEPARATOR"; } $imap->quit; ------------------------------------------------------------------------ So the command fetchmail --folder $(get_imap_folders) should do the trick. Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ ##################### Debian GNU/Linux Consultant ##################### Michelle Konzack Apt. 917 ICQ #328449886 +49/177/9351947 50, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) |