On Thu, 2 May 2002, at 7:58pm, Karl J. Runge wrote:
> Is it possible to "cat" an Exchange/Outlook mailbox from a unix shell?
Locally, Outook uses a PST/OST (Personal/Offline Folder Store) format,
which even Exchange and Outlook people don't like. It is a single, large,
binary file, and prone to corruption. Exchange Server uses a full-blown
database engine. Neither are even remotely useful in their uninterpreted
forms.
> I'm thinking along the lines of being able to view (but not download)
> ones POP/IMAP email via fetchmail like:
> % fetchmail -k -m cat <mailhost> | more
Exchange Server supports both POP and IMAP. Port fetchmail to Windows,
and you're done.
Alternatively, see attached Perl scripts "lspop" and "popcat".
--
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or |
| organization. All information is provided without warranty of any kind. |
#!/usr/bin/perl
use Mail::POP3Client;
die "wrong number of args" if @ARGV != 3;
$server = $ARGV[0];
$username = $ARGV[1];
$password = $ARGV[2];
$pop = new Mail::POP3Client($username, $password, $server);
die "connection failed" if not $pop->Alive;
$max = $pop->Count;
print "ID# FROM SUBJECT\n";
print "--- -------------------------------------
-------------------------------------\n";
for ($i = 1; $i <= $max; $i++) {
undef $subj;
undef $from;
foreach ($pop->Head($i)) {
$from = $1 if m/^From: (.*)/;
$subj = $1 if m/^Subject: (.*)/;
}
printf ("%3d %-37.37s %-37.37s\n", $i, $from, $subj);
}
$pop->Close;
#!/usr/bin/perl
use Mail::POP3Client;
die "wrong number of args" if @ARGV != 4;
$server = $ARGV[0];
$username = $ARGV[1];
$password = $ARGV[2];
$msg = $ARGV[3];
$pop = new Mail::POP3Client($username, $password, $server);
die "connection failed" if not $pop->Alive;
die "msg number out of range" if ($msg > $pop->Count) or ($msg < 1);
foreach ($pop->Retrieve($msg)) { print "$_\n"; };
$pop->Close;