LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Downloading remote POP3 Mail to local mailbox (https://www.linuxquestions.org/questions/linux-newbie-8/downloading-remote-pop3-mail-to-local-mailbox-136969/)

Saffsd 01-21-2004 12:00 AM

Downloading remote POP3 Mail to local mailbox
 
Hello again all.

I would like to do the following:

1) Download all my mail from various POP3 accounts into a single account located on my linux machine.

2) Be able to send mail from my linux machine to external email addresses through any of the SMTP accounts associated with my POP3 boxes.

3) Be able to read all the email that has been centralized onto my linux box from a webmail portal (squirrelmail is my preference).

I have previously been able to set up squirrelmail and courierIMAPd but I don't really understand how to go about step 1) above, getting my remote mail into a local mailbox.

Any help is much appreciated!

rmartine 01-21-2004 12:10 AM

Hmmm. I've used Kmail, Balsa, Ximian, Mozilla Mail, a Super Karamba theme and a couple of others to check my pop mail.

Any one of these shuold allow you to check multiple e-mail accounts. Just plug in your settings and off you go.

And you can send e-mail using SMTP with any of these except maybe the Karamba theme. I never wrote that one.

Good Luck

Saffsd 01-21-2004 05:11 AM

Hmm I think I didn't explain myself too well. What i essentially want to do is to take mail from a remote POP3 mailbox and make it accessible via a local POP3 mailbox. Does that make any sense?

I basically want to do this because my remote mailboxes are of a limited size, so I want to keep mail on my machine where there is plenty of space, but i still want to be able to acces all of my mail from a webmail client.

XavierP 01-21-2004 02:01 PM

Yes. It can be done. Mozilla mail, for instance, will let you receive all of your emails from all of your accounts into one inbox on the client. You can also check the box which says "leave mail on the server" - it will just d/l a copy of the mail. You will then be able to read all your seperate mails on the web. Yahoo and some other sites have the option to check all of your POP3 mailboxes.

If you want to d/l it all to your box and then view them, you will need to set your box up to be seen on the web. I don't know anything about that - but I'm guessing you'll need a domain name and a firewall and some sort of webmail page.

Netizen 01-21-2004 02:07 PM

Sounds like you need to check out fetchmail....

You set the script to run at every 5 minutes if you want and then it will download the mail to your local mailbox.

Netizen

Saffsd 01-26-2004 03:10 AM

Quote:

Originally posted by Netizen
Sounds like you need to check out fetchmail....

You set the script to run at every 5 minutes if you want and then it will download the mail to your local mailbox.

Netizen

Fetchmail does seem to be what I want. Unfortunately, it's not exactly what I want. I've been reading alot about this, and I know exactly what I want to do now. I am still stumped as to how to go about doing it.

I want to:
1) Connect to a remote POP3/IMAP server
2) Download all the messages present to a local .maildir, and delete them from the remote server
3) Make the messages available from my machine via a local IMAP server
4) Give myself a web frontend to read the messages

I know how to do 3 and 4 with courier-imapd and squirrelmail respectively.
What eludes me however is how to do 1 and 2. I'm trying to figure out if I can do this with fetchmail. However, from what I understand fetchmail will pick up the mail but wants to rebroadcast it to a SMTP server. I don't quite know of a SMTP server that will allow me to dump messages into local maildirs. I have ssmtp on my machine, but that only seems good to forward to another machine's MTA. Sendmail seems too much of a behemoth for me to configure. I had postfix installed briefly, but don't quite know how to set it up to do what I want either.

Can anyone help?

Saffsd 01-26-2004 03:21 AM

An additional complication I wish to point out is that this machine resides on a small home network without any domain name of its own, and I don't want to pretend I'm part of the network on which my mail accoun is. Hence I suppose some sort of rewriting has to take place on fetchmail's behalf, so that postfix (which I am trying to configure now) can catch it and not attempt to relay it.

Not having a domain also means my machine can't authenticate itself as an independent SMTP server via reverse-dns. This means I have to somehow convince my machine to log on to an external SMTP server to do the dirty work. Squirrelmail seems to have some form of provision for this, except for the complication that I think it will try to authenticate me with the SMTP server as the user it runs at, which does not correspond to the user the SMTP server expects. I don't know how to go around this either. Any advice?

Saffsd 01-26-2004 10:36 PM

Well I've gotten the inbound part set up. Fetchmail picks up the mails on the remote mailbox, passes them on to a local postfix that slots them into my Maildir, after which Courier-Imap makes them available to Squirrelmail.

All's well? That's not quite the case. The incoming works, but now I'm stumped on the outgoing.
I don't know how to tell squirrelmail to use a username and password I specify when accessing the remote SMTP host.
As an alternative, I've tried to get it to use my local SMTP provided by postfix. No luck there either. Postfix accepts the message and SquirrelMail thinks it's sent, but the message never reaches destination. My guess is that whatever machine postfix is relaying to rejects the message since it comes from a non-authenticated source. I can't confirm this because I don't know where postfix keeps its logs (if any).
I'm trying to understand if SASL is what I want to use. I don't know how to check if my postfix has it compiled in, and I don't understand if SASL is only for incoming connections or also for outgoing.

Please help!


All times are GMT -5. The time now is 02:06 PM.