LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   local imap server running fetchamil (http://www.linuxquestions.org/questions/linux-software-2/local-imap-server-running-fetchamil-357865/)

lmcilwain 08-28-2005 04:58 PM

local imap server running fetchamil
 
I have installed fetchmail and cyrus imap rpms on my machine in the hopes to be able to configure them so that I can run a local imap server that downloads my remote e mail and then serves it via IMAP on my local machine.

But I can't seem to be able to figure out how to configure them so they work together. I have been trying to do this for months and have not had any success. Can anyone help me configure these to work together?

Thanks,

pnellesen 08-28-2005 07:31 PM

Having just spent the weekend setting up something similar to this, my suspicion is that you would simply point fetchmail to send to the same mailbox/account your imap server is using? I would think they would be completely independent of one another. Understand that I'm just guessing here - I've not yet set up a fetchmail system, but I have my ISP currently auto-forwarding all my POP3 mail to the account my imap server uses on my machine, and it's working just fine.

lmcilwain 08-28-2005 10:51 PM

I would agree with you there. I am right now trying to connect to my IMAP server through my mail client. Right now I am using cyrus IMAP. When I setup my client to connect and try to log in it tells me my connection has failed. The weired part is, I am getting the log in prompt which I don't think I would have gotten if it could connect. When I try to telnet to the IMAP server I get:

[lmcilwain@localhost ~]$ telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK localhost.localdomain Cyrus IMAP4 v2.2.12-Invoca-RPM-2.2.12-6.fc4 server ready

But I am not asked for a username or log in. I think I need to get this problem solved before I can do any debugging with fetchmail or procmail. Can anyone give any ideas?

pnellesen 08-28-2005 11:07 PM

Try some of the imap commands found Here

lmcilwain 08-28-2005 11:16 PM

So I ran some test examples. One was the capability test which seems to have been ok. Response as follows:
[lmcilwain@localhost etc]$ telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK localhost.localdomain Cyrus IMAP4 v2.2.12-Invoca-RPM-2.2.12-6.fc4 server ready
a001 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE STARTTLS LISTEXT LIST-SUBSCRIBED X-NETSCAPE
a001 OK Completed

So then I tried loggin in with my local username and password and that failed. Response below:
[lmcilwain@localhost etc]$ telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK localhost.localdomain Cyrus IMAP4 v2.2.12-Invoca-RPM-2.2.12-6.fc4 server ready
a01 login lmcilwain secret
a01 NO Login failed: generic failure

This is the problem I had when trying to log in with my client, it just failed to log in. Any way around it?

pnellesen 08-28-2005 11:31 PM

Hmmm....

Here's a link that might help:

http://asg.web.cmu.edu/cyrus/imapd/i...-FAQ.html#auth

Edit: Also found this - http://www.monkey.org/openbsd/archiv.../msg00085.html

This is one problem I didn't really run into during my adventures this weekend - I was able to at least get the imap server running, and to connect to it locally from my email client (Slackware's pretty good about that sort of thing ;) )

lmcilwain 08-28-2005 11:42 PM

hmmm this looks like its telling compile cyrus with --with-login=unix_pwcheck but I actually installed this from an rpm. So I am not sure where to check what my authenticate method is. I want this to be able to authentice using my passwd or shadow file if possible.

lmcilwain 08-28-2005 11:50 PM

Well I checked my imapd.conf file and found that I have that option. Here is all I have in my imapd.conf file. I am wondering if my authenticate method is wrong where the password check is specified.

[root@localhost etc]# more imapd.conf
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus root
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_ca_file: /etc/pki/tls/certs/ca-bundle.crt
[root@localhost etc]#

pnellesen 08-28-2005 11:55 PM

Might be something to look at.

One final thing if changing the auth method doesn't work - do you have a POP3 server installed? You might want to at least see if you can login to that to rule out something at a higher level than imap - try the following:

telnet localhost 110
-- stuff here --
USER youruser
-- should see "+OK" --
PASS yourpass
-- should see "+OK" --
LIST
-- a list of all emails ids in your inbox should appear --

If that works, then I'd suspect it's something specific to your imap configuration..

Good Luck! Gotta get to bed now, but maybe some other kind soul with ALOT more experience with this than I have will jump in ;)

lmcilwain 08-29-2005 12:01 AM

well cyrus is also a pop3 server. So I tried that and got the following:

[lmcilwain@localhost etc]$ telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK localhost.localdomain Cyrus POP3 v2.2.12-Invoca-RPM-2.2.12-6.fc4 server ready <3826758048.1125287946@localhost.localdomain>
USER lmcilwain
+OK Name is a valid mailbox
PASS secret
-ERR [AUTH] Invalid login

lmcilwain 08-29-2005 09:19 AM

It looks like my sasl service was not running. Once I started that I was able to log in to the IMAP server using my local username and password via telnet and my mail client. Now I just need see how I can get fetchmail to drop the email that it finds to my mail directory in my ~/ .

pnellesen 09-19-2005 10:45 PM

Just wanted to checkup on your luck w/ fetchmail - I just setup fetchmail on my system to get the mail from an external POP3 account and drop it in a particular mailbox on the server. If you still need any help with this, let me know. (I must say Slackware makes this EASY! Took me all of 20 minutes, most of that downloading/installing the TCL/TK packages needed to use /usr/bin/fetchmailconf...)

lmcilwain 09-20-2005 08:30 AM

Sorry I didn't post my results. I ended up not going with this process because it seemed a bit much for me. I struggled with it for days and days and still with no luck. I ended up using my OS X server for this same process. I used a tool called postfix enabler to enable all of my options via point and click. The sad part is, I don't get the experience of this proces but the good part is, I got what I wanted. I may revisit this sometime in the future since I don't know how long my ancient mac has in terms of life but for the moment I am happy. Thanks for checking up on me.


All times are GMT -5. The time now is 08:26 AM.