Web Hosting Talk







View Full Version : import emails to cpanel mailboxes?


Bashar
06-23-2004, 11:45 PM
I've tried fetchmail to connect to any remote pop3 mailbox say enom pop3 service and download the emails to move the inbox/mbox file to the user who is switching from any external service to cpanel hosting.

the idea is correct but for some reason i couldn't do it, fetchmail always gives errors return email root@localhost unroutable address.:

root@localhost
unrouteable mail domain "localhost"

any idea why this is happening or if there is other way of importing external pop3 emails into inbox file to move it to the respective users?

NICguy
06-24-2004, 12:13 PM
Are you able to transfer the external mail file over to the new server...using FTP?

When we move over mailboxes like this from another server, we FTP the previous inbox over to the new server and save as "old_inbox."

We then move that file into the mail folder of the user and then use cat to combine:

Example:

cat old_inbox >> inbox

This will combine the old box with the new one, and preserve the permissions on the new inbox.

(Doing this from memory, so please confirm correct syntax for cat command.)

Bashar
06-25-2004, 02:01 PM
i know that, but the old box is windows and its not possible to connect other than POP3

i tried all means in fetchmail but no use.. if i can find a way to import emails via pop3 and save them in a file as inbox format it would do the job

dan_erat
06-25-2004, 03:29 PM
I posted a Perl script a while back to pop a mailbox and reinject the messages to a different address. You could use that, or change it so it writes directly into the mailbox file.

Bashar
06-26-2004, 04:43 AM
found it, thanks :)