Re: importing mail into sendmail mailbox via pop3 from account on remote server
- From: Grant Taylor <gtaylor@xxxxxxxxxxxxxxxxx>
- Date: Thu, 15 Nov 2007 14:32:03 -0600
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@xxxxxxxxxx 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.
.
- References:
- Prev by Date: sendmail suddenly stops using popauth.db in pop-before-smtp??
- Next by Date: Re: sendmail suddenly stops using popauth.db in pop-before-smtp??
- Previous by thread: importing mail into sendmail mailbox via pop3 from account on remote server
- Next by thread: Re: Email, Linux and procmail for children
- Index(es):
Relevant Pages
|
|