Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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:
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:
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?
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.