WebProWorld IT Forum |
How do u convert word doc to pdf Anyone know how to convert word doc to pdf? Someone has given me a word doc in Thai language and wants to covert it to pdf and I have never converted doc - pdf. Need help.
Server woes Well I’m looking for a new server for my personal business that is about to launch but weighing the pros and cons I will require mass storage down the road...
Instant Messenger as Communication? There is an ongoing debate in our office about the use of Instant Messenger as a form of legitimate, useful, appropriate, and professional communication.
|
| Recent Articles | Basic DNS: PTR Records and Why You Care A PTR record is what lets someone do a "reverse" DNS lookup - that is, they have your IP address and want to know what your host/domain is. At any Unix/Linux command line, you can use "dig -x" to do a reverse lookup:
SME Server Software Raid Failure, Grub 0x10 error An SME customer called this morning saying that his system had apparently stopped working (web pages and mail were unavailable) and therefore he had rebooted.
Creating ext3 File Systems The ext3 filesystem is a journaled file system that is compatible with ext2 (an ext3 filesystem can be mounted as ext2 if necessary).
Waiting Too Long to Upgrade had related at Another Raid Failure that an initial attempt to rebuild the raid had failed, and left the story with fresh drives on order and winging their way toward us.
Another RAID failure There must be something in the air. I've had another RAID failure. This time, it was a hardware RAID, specifically a seven year old DPT controller (DPT was subsequently bought by Adaptec).
F-Secure SSH for Unix 5.0 WRQ announced the availability of F-Secure SSH (Secure Shell) for UNIX 5.0, providing customers a solid solution for priority security needs including reliability, broad platform support, manageability, and usability.
Unix for Higher Education Higher education institutions using HP servers and workstations for teaching or research can now receive the HP-UX 11i operating system at no charge through the HP Campus Investment Program Academic Offer.
Unix VS. Windows VS. Linux This first ever Yankee Group workshop will examine whether or not Linux delivers significantly better performance, reliability, manageability and ultimately lower total cost of ownership... |
| |
| 01.21.05
Transferring Mail To A New Mail Server
By A.P. Lawrence
Sometimes we just have to move on. Your current mail server may just not be meeting your needs, so you've put up something new. But what about old mail? If your servers are identical (Sendmail to Sendmail, etc.) or use the same mailbox storage format, you may be able to just transfer files directly. If not, read on..
If everyone uses POP, there's usually not much to transfer, and if you can shut off incoming mail and just wait long enough for everyone to pop their mail, there won't be anything. But many people now use IMAP.
It's actually sometime useful NOT to transfer anything. Many users let their mailboxes build up without ever deleting unneeded messages. If you can leave the old server on the network, they can always access their old mail if they need to, but they (and you) may find after a year or so that nobody ever has. You might then archive the messages "Just in case" and take down the old server.
If you do want to transfer messages, it can be as simple as running command line tools. The first thing to do is to set the old server to forward all mail to the new server. Exactly what you do to accomplish that depends on your server, but it should be easy. For sendmail, you'd set SMART_HOST and MAIL_HUB, or edit the aliases file and forward each user. For SME server, set the "Delegate Mail Server" in the Server Manager.
Transferring existing mail depends on the format it now uses. For example, Qmail stores messages in individual files. On an SME server (which uses Qmail) you could transfer "tony"'s current mail with just this:
cd /home/e-smith/files/users/tony/Maildir
for i in *
do
cat $i | /var/qmail/bin/qmail-inject
done
Repeating that for each directory would move all mail to the new server. However, it all ends up in the user's INBOX unless that server can apply rules to determine where to file it. To assist that, you may want to use a perl program instead. Something like this:
#!/usr/bin/perl
use Mail::Mailer;
@stuff=<>;
foreach (@stuff) {
$from=$_ if /^From:/;
$to=$_ if /^To:/;
$subject=$_ if /^Subject:/;
last if $subject;
}
$from=~ s/From: //;
$from=~ s//;
$from=~ s/>//;
$to=~ s/To: //;
$to=~ s//;
$to=~ s/>//;
$subject=~ s/^/*** FILE ME IN CUSTS ***/;
$mailer=Mail::Mailer->new();
$mailer->open({From =>$from,
     To => $to,
     Subject => $subject,
     }) or die "Can't open $!\n";
foreach (@stuff) {
   print $mailer $_;
}
$mailer=>close();
You'd adjust the modification to Subject appropriately, or add entirely new headers if desired.
If your mail is stored in Unix mailbox fashion, you need something to read the messages and break them up. While you could read the mailboxes directly, it's more portable to use tools like POP:
#!/usr/bin/perl
use Net::POP3;
$pop=Net::POP3->new('10.1.36.237') or die "$!";
$pop->login("tony","password");
$messages=$pop->list;
foreach $msg(keys %$messages) {
$message=$pop->get($msg);
foreach (@$message) {
#same basic idea as above,
}
}
You may need to get Net::POP3 from CPAN. There are similar modules for IMAP.
Bruce Garlock suggested that Mailsync might also be useful here.
*Previously published at APLawrence.com
About the Author: A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com |