LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fetchmail with multiple mail accounts and local accounts (http://www.linuxquestions.org/questions/linux-software-2/fetchmail-with-multiple-mail-accounts-and-local-accounts-542429/)

lmcilwain 04-01-2007 02:23 PM

Fetchmail with multiple mail accounts and local accounts
 
Hello all,

I am trying to get fetchmail to download from two different mail accounts to two different local accounts. Does anyone know how to do this?

Basically I have one gmail account and one work account and I want to keep them separate (I don't want to combine them in the same inbox).

I created another account on my machine to be able to support separating my mail accounts but when I set up the .fetchmailrc and .procmailrc for the new account, I get the following error when I try to start it.

[user@linux ~]$ fetchmail -c
fetchmail: can't check mail while another fetchmail to same host is running.

I already have fetchmail running on my other account and its working perfectly but I don't seem to understand this message. It seems to be stating that the new fetchmail service Im trying to run is trying to contact the same mail server as my currently running one but its not based on the configuration that I have.

Is it that I can't run two separate fetchmail services? (I thought this was possible). If that is not the case, what are my other options?

acid_kewpie 04-01-2007 02:28 PM

all standard stuff really, just check the fetchmail manpage. you can put as many local and remote accounts as you wish....
Code:

  poll pop.provider.net proto pop3
      user "jsmith", with password secret1, is "jsmith" here;
  poll other.provider.net proto pop2:
      user "John.Smith", with password "My^Hat", is "John.Smith" here;

i'd suggest it's not really a good plan though, why not just use procmail to put all mail from one account into one folder, others in another. that way you only need one local user account.

lmcilwain 04-01-2007 02:47 PM

I guess the other part of my confusion is, if Im running fetchmail from one account, will it be able to right to both mailboxes?

exampl:
If user1 is running the fetchmail services with .fetchmailrc settings for both accounts (user1 and user2) to deliver to their inbox. Will the system allow allow the services running under user1 to write to user2's mailbox?

I am also using procmail for filtering, so I am not sure how to not have it use the wrong .procmailrc file for the second account.

To answer your question: Both mail accounts have a ton of sub folders so it would be pretty confusing to try and combine the two accounts in one mail account (unless I misunderstood your question)

acid_kewpie 04-01-2007 02:58 PM

well my suggestion to have a folder structure within a single account, totally possible if you deliver to a local mta.

Code:

INBOX
+--work
|  +--folder1
|  +--folder2
+--play
  +--folder1
  +--folder2

this way you don't have a fart around with seperate accounts and don't lose and clarity over it.


All times are GMT -5. The time now is 09:35 PM.