Setting up IMAP server for home network


Results 1 to 10 of 10

Thread: Setting up IMAP server for home network

  1. #1
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8

    Setting up IMAP server for home network

    I would like to set up an IMAP server on my Redhat 7.3 Linux server at home so it can poll the POP accounts on my ISP and store the messages for retrieval from my laptop at a later time.

    My Linux server connects to the internet via a cable modem so I don't need the complications of dialing up or anything. However, it's not quite like I'm directly connected either, since my ISP only provides a dynamic IP address and five POP email accounts.

    I think I can set things up this way, but I'm not really sure: Use fetchmail to pull the E-mail out of the POP accounts at the ISP and pass them on to IMAP (somehow -- there, I said the magic word so it should now be possible). Then I can configure my laptop to use my Linux server as the mail server instead of the ISP's POP server. I'd also need to configure sendmail or postfix to forward nonlocal outgoing mail to the ISP SMTP server.

    Anyway, that is the outline of my plan. Am I on the right track?

    Thanks.

    patkc66

  2. #2
    Join Date
    Oct 2000
    Location
    Calgary, Alberta, Canada
    Posts
    8,116
    you won't need to forward outgoing mail to the isp's smtp server. you can use sendmail on your server to do it. (you may even have to do it as your isp most likely does not relay mail)

  3. #3
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8
    Originally posted by Cybr099
    you won't need to forward outgoing mail to the isp's smtp server. you can use sendmail on your server to do it. (you may even have to do it as your isp most likely does not relay mail)
    Wow. Thanks for the quick reply.


    Hmm. That sounds like an interesting possibility. But wouldn't I need an official domain name or something for that?

    Like I said, I'm sort of halfway between a server that's a full-fledged member of the internet and one that has to dial up using PPP to its ISP to get whatever it needs. In many ways, it looks like the main difference between my configuration and that of someone that connects using PPP is that I don't have to keep reconnecting. That seems like something I need to keep in mind. Is it as big of a trouble as it looks to me right now? Or am I just being paranoid? ;-)

    On another note, is there anything special I need to do to get fetchmail to pass the messages it pulls from the ISP on to my IMAP server instead of a local mailbox? The documentation didn't seem to quite match what I'm trying to do, but maybe I just missed the part that I needed to see.

    Thanks again.

    patkc66

  4. #4
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8
    Sigh...

    The idea of using my own sendmail server to send the mail out to its destination isn't working.

    As I feared, the messages are bouncing because my hostname and domain are not registered in the DNS so any SMTP servers that try to look it up to see if it really exists reject my connection (not that I blame them, given the proliferation of spammers.)

    On to the next plan, trying to configure sendmail to forward all non-local messages to my ISP's SMTP server and hope it takes it.

    Anyone have any other suggestions?

    patkc66

  5. #5
    Join Date
    Jun 2001
    Location
    Evansville, IN
    Posts
    430
    I'm running into a similar problem, however I'm having a little more luck than you are. I can send mail out with Sendmail, but it has my hostname. However, I'm not having any trouble with my mail being delivered, so far all my test messages have gone through. The only snag I hit was on 1 of my friend's hotmail, my message got forwarded to his junk folder.

    I would prefer to use my ISP's SMTP server so I'll be watching this thread for help.

    My original post on my problem is here

  6. #6
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8
    Originally posted by i_like_peanut_butter
    ... The only snag I hit was on 1 of my friend's hotmail, my message got forwarded to his junk folder.
    ...
    I think that's just the way he has his Hotmail account set up. I have mine set up the same way since it gets spammed heavily. Basically, you can set those accounts up so that unless the message comes from an address in a specific list you set up yourself, it goes into the junk pile. I don't think there is anything you can do from your end to prevent that other than tell your friend to add your address to his safe list.

    As for my little project, I've made a little progress. I modified my sendmail.cf file (I know, I know, I should have used the macro files instead, but this one little change seemed relatively harmless... ;-)) and set the DS line to be DSmy.isp.smtp.host and restarted the machine. After a couple of test messages, I saw that the messages really were going through so that part seems to be working too now.

    So to recap, here's where I've gotten so far:
    fetchmail is set up so I can manually poll my ISP for my email messages. I'll set it up as a daemon in a little while, once I get the other things running I think.

    sendmail is sending any off-site messages to my ISP's SMTP server to forward on to the rest of the world as needed. (I think my ISP only allows this because the messages are being sent from a known IP address on its own network, so your mileage is almost certain to vary.) Anyway, I can send messages as well. I do have to be sure to include a Reply-to field in the headers though since the From address is pretty useless anywhere except on my local network here. Oh well...

    Now I need to figure out how to get the IMAP server up and see if I'm able to read my messages from the laptop. Then I think I'll be done with this one for now.

    It would be nice if the From addresses weren't mangled, but I think this is about all I'm going to be able to do so I guess it's good enough.

    patkc66

  7. #7
    Join Date
    Nov 2000
    Location
    Unmarked grave next to Arch Stanton
    Posts
    637
    If you want to handle your own mail, why not get a free domain name from a free dns service like dyndns? That way you can handle your own outbound/inbound mail, as well as host your own web page. You can then run something like cyrus imap in conjunction with sendmail or exim and set your mail client to look for mail on the imap account and also whatever pop accounts you have. I just use mozilla to do that. Nothing fancy. I'm sure there are posts here that will clue you in on how to do it. Do a search on the forums here.

    If you're only interested in doing mail using fetchmail and your isp's mail server, then check out mandrakeuser.org. They have a writeup on how to do what you want. It's called "Mail The Unix Way".
    Last edited by Radar; 08-15-2002 at 06:53 PM.
    We all work for machines

  8. #8
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8
    Originally posted by Radar
    If you want to handle your own mail, why not get a free domain name from a free dns service like dyndns? That way you can handle your own outbound/inbound mail, as well as host your own web page. You can then run something like cyrus imap in conjunction with sendmail or exim and set your mail client to look for mail on the imap account and also whatever pop accounts you have. I just use mozilla to do that. Nothing fancy. I'm sure there are posts here that will clue you in on how to do it. Do a search on the forums here.

    If you're only interested in doing mail using fetchmail and your isp's mail server, then check out mandrakeuser.org. They have a writeup on how to do what you want. It's called "Mail The Unix Way".
    Thanks for the ideas, Radar. I'd like to be able to do just that but I can't figure out how I'd get around the dynamically assigned IP address problem.

    I looked into trying to get a subdomain in the east-brunswick.nj.us domain, but the template form for the application requires me to give them the IP addresses of two name servers to manage the subdomain. I don't have those, but I suppose I could get some outside providers to give them.

    Still, they would have to provide an MX record for my email addresses that would point to my mail server here, again requiring me to have a static IP address here, something my cable provider isn't willing to give me, so I'm still stuck with relying on someone else to provide the primary mail connectivity to the Internet and then pull things from them.

    Or at least that's what I've been able to figure out so far. Maybe if I was able to attack the problem from a different direction I might see the problem differently. Any ideas on what that other direction might be? I think I've been staring at it from this side for so long now, that any direction I look at it looks the same right now, so any ideas might be helpful.

    Oh, as for wanting to just use my ISP's mail server, I'm sort of in between. I guess what I'm really trying to set up is kind of like a caching mail proxy that pulls the mail regularly from the ISP using the machine that is constantly connected to the internet and storing it all in a convenient place until I get around to reading it from the laptop. (I have an aunt that has this habit of sending bunches of pictures to us in E-mail and when she goes on one of her sprees, along with her pictures, I also get messages from the ISP reminding me of the 10Mb storage quota. ;-)) So I'd kind of like to be able to pull things down onto my own server on a regular basis even though I might not be able to read it on the same schedule. IMAP sounded like it might provide what I wanted to do.

    Anyway, is there another angle I might not have looked at this from that might give me what I'm looking for?

    Thanks again.

    patkc66

  9. #9
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8

    Thumbs up

    Hey Radar, Thanks for the pointer to dyndns.org . I hadn't seen something like that before. It might be what I need after all. Definitely worth a closer look at least.

    patkc66

  10. #10
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    8

    Angry

    Very large sigh...

    Well, I went and set up a domain at dyndns.org, reset my machine to use static IP addresses instead of relying on DHCP from the firewall router, punched a hole in the firewall for TCP port 25 and set it to forward those packets on to the linux box and reconfigured the host name and domains.

    A quick reboot (to be sure everything was reset, I know, it's terrible overkill. Oh well...) and I sent an email to one of my POP accounts to test sendmail from here. Well, that works fine now. Unfortunately though, when I telnet to port 25 on my firewall, it never makes it that far. My ISP is blocking port 25. Grr...

    So again, I can send stuff out, but if someone tries to reply to the address the message looks like it came from, things are gonna bounce. Oh well... I guess that's as far as I can go for tonight. I guess I should get some sleep.

    patkc66

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •