importing mail into sendmail mailbox via pop3 from account on remote server
am 15.11.2007 20:23:04 von Todd
Newbie here, with what I thought would be an uncomplicated question. Guess
not.
I am moving a friend's domain/site/mail onto my host. DNS and the site and
new mailboxes are created, but I need to migrate his email, which I have POP
access to, into his new sendmail mailbox on my host. His old host uses a
3rd party for mail hosting, and has only black box access to the mailserver.
Although I'm familiar enough with putzing around a Linux box, and I have SSH
to my box, I have not used fetchmail, mutt, pine, or any other command line
tool that might facilitate migrating the contents of a POP3 account straight
into the sendmail, and my host hasn't installed anything either.
I know it is oxymoronic, but does sendmail have this capability? I trolled
some groups, Googled the topic, and skimmed the manual, but no luck. Anyone
written a Python, PHP or Perl script that can do this? I trolled for that
too and couldn't find anything.
Theoretically I supppose it would look like:
[user@account /]$ programtofetchpop3mail pop3=mail.someotherhost.com
user=oldmailbox pass=1234 box=/var/spool/mail/newmailbox
cache=/var/spool/mail/newmailbox.cache
or
[user@account /]$ programtofetchpop3mail.py/php/pl
pop3=mail.someotherhost.com user=oldmailbox pass=1234
box=/var/spool/mail/newmailbox cache=/var/spool/mail/newmailbox.cache
I'd write my own script, but I'm not familiar enough with sendmail files to
not botch the job.
If anyone could help, please email directly at todd_drain@yahoo.com. I'll
see the answer faster there. Thanks in advance. I'll make the response
into a static page on one of my domains for people to troll for in the
future... can't be the only one whose had a hard time importing remote pop3
accounts into sendmail via pop instead of having physical files.
Todd
Re: importing mail into sendmail mailbox via pop3 from account on remote server
am 15.11.2007 21:32:03 von gtaylor
On 11/15/07 13:23, todd wrote:
> Although I'm familiar enough with putzing around a Linux box, and I
> have SSH to my box, I have not used fetchmail, mutt, pine, or any
> other command line tool that might facilitate migrating the contents
> of a POP3 account straight into the sendmail, and my host hasn't
> installed anything either.
Ok...
> I know it is oxymoronic, but does sendmail have this capability? I
> trolled some groups, Googled the topic, and skimmed the manual, but
> no luck. Anyone written a Python, PHP or Perl script that can do
> this? I trolled for that too and couldn't find anything.
No, Sendmail does not have this capability. Sendmail is an SMTP server
(amongst other types of email servers) for sending and receiving emails.
Sendmail its self does not go out and fetch emails off another server.
> Theoretically I supppose it would look like:
>
> [user@account /]$ programtofetchpop3mail pop3=mail.someotherhost.com
> user=oldmailbox pass=1234 box=/var/spool/mail/newmailbox
> cache=/var/spool/mail/newmailbox.cache
>
> or
>
> [user@account /]$ programtofetchpop3mail.py/php/pl
> pop3=mail.someotherhost.com user=oldmailbox pass=1234
> box=/var/spool/mail/newmailbox
> cache=/var/spool/mail/newmailbox.cache
You really have answered your own question with out realizing it. You
want to use something like fetchmail. Fetchmail is intended to go and
fetch email off of other servers and do something useful with it.
As far as appending the new emails directly in to the mail spool, you
don't really need to do that. You would have fetchmail go and fetch the
messages and then re-inject them in to the SMTP interface of Sendmail
which will then deliver them locally just like it would do for any other
message.
> I'd write my own script, but I'm not familiar enough with sendmail
> files to not botch the job.
You can re-invent the wheel that has been re-invented many many times
over if you want to. However from what you've asked for I see no reason
to do so unless you really just want to. Use the tried and (proven)
true tools that already exist to solve the very problem that you are
asking to solve.
> If anyone could help, please email directly at todd_drain@yahoo.com.
> I'll see the answer faster there. Thanks in advance. I'll make the
> response into a static page on one of my domains for people to troll
> for in the future... can't be the only one whose had a hard time
> importing remote pop3 accounts into sendmail via pop instead of
> having physical files.
Read up on fetchmail and try it. I think you will find that it will do
exactly what you are wanting to do.
Grant. . . .
P.S. I'm sending this reply back to the news group for archival reasons
and CCing you as you requested.