Such a simple question yet I can't seem to find an answer. I'm trying to use fetchmail to retrieve from a POP3 account. The POP3 server includes mail in the server name (mail.domain.com). The email accounts do not include mail. Unfortunately fetchmail seems to take the supplied username and add the mail server name. So I get foobar@mail.domain.com instead of foobar@domain.com. (Or foobar@domain.com@mail.domain.com if I try to specify the server name.) Is there an option I need to specify (or maybe upgrade fetchmail)? Dennis Payne dulsi@identicalsoftware.com
Dennis> Such a simple question yet I can't seem to find an answer. Dennis> I'm trying to use fetchmail to retrieve from a POP3 account. Ok, that's certainly doable. Dennis> The POP3 server includes mail in the server name Dennis> (mail.domain.com). The email accounts do not include mail. What do you mean here? Can you post your .fetchmailrc file so we can look at it? And some logs from when you try to run it? As I read it above, the POP3 server's hostname is 'mail.domain.com'. Email is sent to 'user@domain.com', with all email for user1, user2, etc, going to one emailbox on the POP3 server, correct? Dennis> Unfortunately fetchmail seems to take the supplied username Dennis> and add the mail server name. So I get foobar@mail.domain.com Dennis> instead of foobar@domain.com. (Or Dennis> foobar@domain.com@mail.domain.com if I try to specify the Dennis> server name.) Is there an option I need to specify (or maybe Dennis> upgrade fetchmail)? I assume what you're trying to do here is download all the email from the POP3 server and then split it up to the local different users? Have you read the section in the fetchmail man page on "The Use and Abuse of Multidrop Mailboxes"? I *htink* this is what you're asking for help with, but it's not clear to me what you are really asking for. John
Nope. I'm not talking about one account that collects a bunch of emails and dropping them in the appropriate mailbox. The POP3 server is mail.domain.com. The login account is foobar@domain.com. Fetchmail allows you to specify the username of foobar to which it adds @mail.domain.com. This fails because the login account doesn't include "mail.". (Or at least that is my read of the document they provide for grabbing the email.) So I want to stop or change what it adds to the username. Dennis Payne dulsi@identicalsoftware.com
Dennis> Nope. I'm not talking about one account that collects a bunch Dennis> of emails and dropping them in the appropriate mailbox. Ok, that's clearer. It would still help if you could show us your existing .fetchmailrc file... Dennis> The POP3 server is mail.domain.com. The login account is Dennis> foobar@domain.com. Fetchmail allows you to specify the Dennis> username of foobar to which it adds @mail.domain.com. This Dennis> fails because the login account doesn't include "mail.". (Or Dennis> at least that is my read of the document they provide for Dennis> grabbing the email.) Ok, here's what I would try: fetchmail -c -v -u foobar@domain.com mail.domain.com and see what happens. You could also put the following in our .fetchmailrc file: poll mail.domain.com protocol pop3 username "foobar@domain.com" \ password "secret1" All on one line. Then do: fetchmail -v -c and see what happens. Sending us the logs would be helpful. Sanitize them of course, but at least let us see how the protocol negotiation goes, otherwise we're not going to be able to help you. John
fetchmail -c -v -u foobar@domain.com mail.domain.com
I did try that without the -v and got this for the password prompt: Enter password for foobar@domain.com@mail.domain.com: I assumed that the reason it failed was that it was sending that as the user name. Turns out that ther verbose information shows that it is sending the appropriate information despite what the prompt shows. It also now succeeds so I must need to wait a little bit after creating the email account through the web administration. Thanks for the help. (Should have checked for a verbose option myself.) Dennis Payne dulsi@identicalsoftware.com
fetchmail -c -v -u foobar@domain.com mail.domain.com
Dennis> I did try that without the -v and got this for the password prompt: Dennis> Enter password for foobar@domain.com@mail.domain.com: This is possibly a fetchmail thing, I'd check to make sure you're running the latest version. Dennis> I assumed that the reason it failed was that it was sending Dennis> that as the user name. Turns out that ther verbose Dennis> information shows that it is sending the appropriate Dennis> information despite what the prompt shows. It also now Dennis> succeeds so I must need to wait a little bit after creating Dennis> the email account through the web administration. The verbose option is the key when using fetchmail. It's a great tool which works wonders, but can be a pain to get going right sometimes. Of course, that's all the various protocols fault, not fetchmails. John
From: Dennis Payne <dulsi@identicalsoftware.com>
Nope. I'm not talking about one account that collects a bunch of emails and dropping them in the appropriate mailbox.
The POP3 server is mail.domain.com. The login account is foobar@domain.com.
Surely you log in as just "foobar", no? You have to have gotten through the domain name system and be connected to a definite port on a definite IP address before you even get the login prompt.
Fetchmail allows you to specify the username of foobar to which it adds @mail.domain.com. This fails because the login account doesn't include "mail.". (Or at least that is my read of the document they provide for grabbing the email.)
So I want to stop or change what it adds to the username.
I don't know why it would add anything. The POP server knows who you are because you tell it USER <name>. The RFC (rfc 1939) doesn't say much about how you spell your name, but in my experience it's just the part before the "@". If the server has mail for you, it should give it to you, no matter what the name or alias of the machine that accepted it from the SMTP server. To get mail for me (kwright on this machine) from mail.speakeasy.net (kawright on that machine, which belongs to the ISP), I put the following in .fetchmailrc. It does not matter if that mail came to me via speakeasy.net or an alias like free-comp-shop.com. skip spk via mail.speakeasy.net protocol pop3 username "kawright" password "****", is "kwright" here limit 20000 The "skip" means it is not automatic, I have to ask for it by name. I do this because I have accounts on more than one machine and like to control which one I fetch from. Thus: /usr/bin/fetchmail -v gis spk -- Keith
Surely you log in as just "foobar", no? You have to have gotten through the domain name system and be connected to a definite port on a definite IP address before you even get the login prompt.
I agree it should just be "foobar" but that doesn't work. All the instructions say to use the foobar@domain.com. Since they didn't ask me when designing the system, I have to live with what I got. Dennis Payne dulsi@identicalsoftware.com
participants (3)
-
Dennis Payne
-
John Stoffel
-
Keith Wright