LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2003, 12:48 PM   #1
debest
LQ Newbie
 
Registered: Aug 2003
Location: Toronto, ON
Distribution: RedHat 9
Posts: 8

Rep: Reputation: 0
IMAP on home network - HOWTO?


Hi, I've searched Google, no luck, so here I go!

I'm a relative newbie, with no experience with IMAP. I'm running RH9. The service "imapd" is installed and running properly (so says RedHat). I am connected to the Net via a cable modem. I have a Linksys WiFi router and IPTABLES firewall running on my desktop. I also have a laptop (Win98SE) connected on the LAN via wireless.

What I would like to do is set up a server on the RH desktop that would POP my ISP's mail accounts (5 of them) every so often, say every 10 minutes. Then I would like to have my mail clients on the two machines be able to access mail on this service. This would enable all users to maintain one single mailbox for each account, accessable from either computer.

Is there a comprehensive HOWTO anywhere on how to accomplish this feat? Everything I've found so far goes into how to install IMAP on the server, but very little on the niceties of setting it up in an environment such as mine.

Here are some of the issues that I want to address (off the top of my head):

- What "flavour" of IMAP is installed by RH9 (UW, Courier, Cyrus)? What's the differences, and which is appropriate for me?

- Which of the "mbox" (flat file) or "maildir" (directory / files) formats is appropriate?

- How do I migrate my existing mailbox files to the server?

- If "maildir" is better, how do I convert my existing "mbox" (Mozilla) files to this format?

- How do I configre the IMAP server to actually do the checking/downloading of POP mail off the ISP? Is there a GUI interface?

- How do I configure my clients to access / syncronize with the IMAP server? Which clients work / don't work / have difficulty with IMAP?

- Are there security issues with running imapd? Since I am only accessing the server internally, how do I make sure that I can see it inside the firewall, but not accessed outside?

- Finally, is my approach completely wrong? Is there another, better solution for my problem?

I'm sure there are other things, too.

Has any document been created for this line of questions? If not, anyone want to give a crack at my questions above? Thanks.

Darren Best
 
Old 08-21-2003, 08:25 PM   #2
cnjohnson
Member
 
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
Re: IMAP on home network - HOWTO?

Quote:
Originally posted by debest
Hi, I've searched Google, no luck, so here I go!

[edited]

What I would like to do is set up a server on the RH desktop that would POP my ISP's mail accounts (5 of them) every so often, say every 10 minutes. Then I would like to have my mail clients on the two machines be able to access mail on this service. This would enable all users to maintain one single mailbox for each account, accessable from either computer.

Is there a comprehensive HOWTO anywhere on how to accomplish this feat? Everything I've found so far goes into how to install IMAP on the server, but very little on the niceties of setting it up in an environment such as mine.

[edited]

I'm sure there are other things, too.

Has any document been created for this line of questions? If not, anyone want to give a crack at my questions above? Thanks.

Darren Best
Well, lets break the problem into its logical pieces.

To retrieve the mail from your ISP accounts, you use fetchmail.

fetchamil hands the mail to a mail transport agent (MTA) like sendmail, or exim, or qmail (UGH!), or postfix.

sendmail (say) checks to see who gets what, and hands the mail off to procmail (the mail delivery agent MDA) which drops it in a user's mail box. procmail can be configured to run with spamassassin to filter the mail before delivery.

Now then, you run mozilla mail (say) it connects to your server which runs either IMAP, or pop3. These programs retrieve your mail from your linux mail box and hand it to your e-mail proggy (mozilla mail, etc).

Each one of these programs has an extensive, if ocassionally mysterious, howto somewhere on the net; often several of them. You are wanting to do exactly what I do:

fetchmail...sendmail...procmail...spamassassin...pop3...mozilla-mail.

Cheers--
Charles

Last edited by cnjohnson; 08-21-2003 at 08:28 PM.
 
Old 08-21-2003, 11:37 PM   #3
debest
LQ Newbie
 
Registered: Aug 2003
Location: Toronto, ON
Distribution: RedHat 9
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Each one of these programs has an extensive, if ocassionally mysterious, howto somewhere on the net; often several of them. You are wanting to do exactly what I do:

fetchmail...sendmail...procmail...spamassassin...pop3...mozilla-mail.
Yikes! That's even worse than I had imagined. Complicated enough that I definately would have thought (or at least hoped :-) ) that someone who had gone through this may have documented the experience.

I noticed that you are re-POPing your mail to Mozilla. Just out of morbd curiosity, why are you going through all these steps if you are not keeping a synced copy of your mail? Is it because you can't get SpamAssassin to work any other way?

Thanks for the reply, though!

Darren Best
 
Old 08-22-2003, 03:30 AM   #4
jonas_larson
Member
 
Registered: Jul 2003
Location: Stockholm, Sweden
Distribution: RH9
Posts: 37

Rep: Reputation: 15
Hi Darren,

I have a simular situation but I see some issues in your (soon to be) configuration...
This is how I would do it...

1. download your mail from your ISP to your Linux box by using fetchmail. (man fetchmail should give you enough info)
Fetchmail will put your downloaded mail in /var/spool/mail/<username> and they are accesseble by IMAPS.

2. Use IMAPS (not imap) to interact with your mail, (that way you will keep a copy on the server at all times, if you use pop you will (normally) download the mails to your current box. Thus not being able to read mail from several boxes...

(2.) alternetive... Install webmail (http://openwebmail.com) and you will be able to read your email from all around the world... ;o)

Let me know if you want to install openwebmail and I can give yoy a quick HOWTO of my own...

Regards

Jonas
 
Old 08-22-2003, 07:52 AM   #5
cnjohnson
Member
 
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
Quote:
Originally posted by debest
Yikes! That's even worse than I had imagined. Complicated enough that I definately would have thought (or at least hoped :-) ) that someone who had gone through this may have documented the experience.

I noticed that you are re-POPing your mail to Mozilla. Just out of morbd curiosity, why are you going through all these steps if you are not keeping a synced copy of your mail? Is it because you can't get SpamAssassin to work any other way?

Thanks for the reply, though!

Darren Best
Actually, the only "hard part" is tweaking sendmail. Setting up fetchmail is a breeze and pop3 "just works." I did have to learn to use procmail to interact with spamassassin, so I did that part last. If you don't use spamassassin right out of the gate, the only configuration to be done is creating a .fetchmail file so fetchmail knows where to retrieve mail from, and tweaking sendmail so "masquerading" works.

I have 4 pcs at home, each connected wirelessly to a wireless DSL switch, which is connected to a DSL modem that goes out to my ISP. 3 of these boxes are linux (RH9 and/or LFS). One box is XP. My RH9 box serves mail to whom ever logs into one of the other boxes. That mail server collect mail from 4 accounts (my office, my personal mail, my wife's office and her personal account). None of the boxes go to the 'Net directly to get mail, they go to the internal mail server (in that sense, I am my own ISP). I do that because I filter e-mail through spamassassin, and a .procmailrc script that that work together to kill spam, kill certain attachments and convert all other attacments to plain text appended to the e-mail. I don't have problems with viruses that way. So, I use a fixed IP addressing scheme, I name each box so I have a DNS server (I don't have to fool with /etc/host files that way), I run SAMBA so my wife can access shares on the linux boxes (she runs XP for work related reasons).

The heart of this operation is the RH9 box running mail services, DNS services and SAMBA services. It collects the mail every 10 minutes without a hitch!

Maybe that's more than you wanted to know. It took me all of an hour to get things up and running, and then a few days to get procmail and spamassassin to work together for spam contral. Then another 2 or 3 hours of writing a .procmailrc script that would do more than just work with spamassassin.

It was fun and educational...I think.

Cheers--
Charles
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mandrake 10.1 Postfix / IMAP HowTo Elfchen Mandriva 4 05-17-2005 07:27 AM
HowTo set up a home network purefan Linux - Networking 3 04-08-2005 11:39 AM
Need a good HowTo for IMAP Mail Server dping28 Linux - Newbie 2 02-28-2004 08:45 PM
home network howto? ferretmanus Linux - Newbie 4 01-09-2004 01:07 PM
IMAP Howto robeb Linux - Software 2 05-16-2002 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration