Currently Being ModeratedAug 30, 2011 3:36 PM (in response to niklasfromstockholm)
Using Terminal.app, read the manual for "fetchmail" -- this is included by default on Lion, client and server.
fetchmail - fetch mail from a POP, IMAP, ETRN, or ODMR-capable server
Does exactly what you want and has been around quite a while.
Currently Being ModeratedAug 30, 2011 11:42 PM (in response to ScottM)
I'm sorry, but which manual are you referring to? The Mac Mini one that was included with computer? I have searched the net for this for two days and although I stumbled upon the name "fetchmail" previously, it's interesting how little documentation there is about it.
I also checked the Lion Server online documentation: http://www.apple.com/macosx/server/resources/documentation.html
There's nothing there either as far as I could see?
I feel a bit lost?
Currently Being ModeratedAug 30, 2011 11:42 PM (in response to niklasfromstockholm)
The Unix man pages -- from the shell/command line. Thus, start Terminal first, then type:
You can also read:
It's a command line utility that does what you want.
Currently Being ModeratedAug 31, 2011 12:38 AM (in response to ScottM)
Thanks for clarifying that. Assmuing my reading skills haven't worsened in the last years, I can't see exactly what I need to do. I noticed the configuration examples, but what exactly do I need to type in? Or more importantly, where?
I've come as far as to understand that a configuration file needs to be created in the Home directory (am I correct?) with something like this in it:
poll pop.provider.net proto pop3 user "jsmith" password "secret1"
How would I achieve that? And also, how does the system know what email inbox on the Mail Server to forward it to?
Thank you so much for your help.
Currently Being ModeratedAug 31, 2011 11:55 PM (in response to niklasfromstockholm)
I'm just a bit amazed about this whole thing. Lion Server seems to be a really complete solution for dummies if it hadn't been for this one thing with fetchmail.
On the windows side it seems to be quite normal to download your emails from an ISP and then import to Exchange. Am I missing something here, or going about it the wrong way? Why aren't there more apps like fetchmail? Or let me re-phrase that....Why aren't there apps with UI's out there?
Currently Being ModeratedSep 1, 2011 12:04 AM (in response to niklasfromstockholm)
I think you may be slightly missing somethng -- or, more to the point, perhaps you just didn't explain what you want to accomplish quite right.
Lion is based on Unix. It has the MTA (mail transfer agent) of Postfix built in. You don't *need* Lion Server in order for your Lion system to be a mail server. Indeed, you can do it with the same freeware that Apple uses:
Server Side Filtering: Pigeonhole Sieve (built in to Dovecot)
The Apple Lion Server package provides a VERY simple GUI around some of the server software -- there's a bit more depth in the Server Admin package which is available for free as well.
The Fetchmail solution is just one way to get from A to B. In most cases, you should just set up your Lion box to be a normal mail server, using the standard applicaitons listed above (or, use the Server version of Lion for a simple GUI).
Fetchmail is more about handling mail in a batched fashion, where you want to download it from Server A, and inject it into Server B as if it was new mail arriving from the Internet.
Thus, any filtering into folders needs to be done either with Server Side Filtering (Sieve, which with Lion Server, can be managed, per user, via the Webmail interface) or with client-based filters (Mail.app rules, or other mail clients that see incoming mail and automatically sort it for you).
The smoothest setup, by far, is to simply configure the server to be a server. For the Internet NOT to mail your ISP, but to mail you directly. This takes a bit more care and attention, as you have to deal with thigns like Spam in ways that your provider may do for you...
So perhaps you don't want to *IMPORT* mail from the ISP, but, you should work with your ISP to figure out what services *they* provide to help you run your own mail server. Different providers have different options.
If your company has its own domain name, and you're familiar with the risks, perils and benefits of running a mail server, you can do it yourself - that's what I do - but if you're not familiar with all of the issues that go along with running an Internet facing mail server, then you'll have to think about your plans and goals carefully.
Currently Being ModeratedSep 1, 2011 12:50 AM (in response to ScottM)
Hi Scott, I'm (unfortunately) aware of the fact that I'm the weakest link here. With some proper experience in this, I wouldn't have wasted your time as I have. I just find it very strange that it was so easy to get this working on a Windows Server machine, yet so difficult to achieve on a Mac. In my - very limited - experience, it is almost always easier to deal with Mac's.
I've been thinking about talking to our ISP about the mail traffic and re-reoute mail traffic directly to our local server, but I too see the problem in this; my lack of experience.
Going back to the case at hand; I finally managed to "unhide" hidden files and folders on the system, find /usr/bin/fetchmail and get this when I try to run it:
/usr/bin/python: can't open file '/fetchmailconf.py': [Errno 2] No such file or directory
Any idea why this is happening?
Once again, I'd like to thank you for taking the time to reply to my very ignorant and intelligence-lacking messages!
Currently Being ModeratedSep 1, 2011 12:55 AM (in response to niklasfromstockholm)
To answer your question about what I really want, I found this dated software called Mailtron Gateway. It doesn't run on newer versions of Mac OS so it's unfortunately not an option. However, their website has this image describing what the software does, and that is exactly what I want:
Currently Being ModeratedOct 11, 2011 10:07 AM (in response to niklasfromstockholm)
Hi Niklas, unfortunately I've only now come across your discussion. Even more unfortunately I've already spent 1keuro on the new minmac server which I believed was going to be oh-so-simple to set up but I've hit a solid brick wall regarding the mailserver. come back xp, all is forgiven. Did you find an easy solution? my brand new server is still sitting in the corner after 2wks and i've more or less decided to install win xp on it because its become an embarassement. 20yrs with ms and not able to get my head around intuitively simple apple. oh the shame of it
Currently Being ModeratedApr 27, 2012 8:04 PM (in response to niklasfromstockholm)
This is an inexplicable hole in Apple's server offering. I was able to set up a useful mail server, but not without many headaches and scrounging around Unix lore. This should be part of Apple's easy-to-use configuration tools.
To fetch incoming emails from ISP email accounts:
- Create and configure /etc/fetchmailrc
- Create and configure /Library/LaunchDaemons/fetchmail.plist
To send outgoing emails through ISP mail servers (if the ISP requires SSL on port 465):
- Install stunnel
- Create and configure /Library/LaunchDaemons/stunnel.plist
- Create and configure /opt/local/etc/stunnel/stunnel.conf
- Configure /etc/postfix/main.cf
- Enable plaintext auth to local stunnel port
- Configure /etc/postfix/sasl/passwd
- Configure ISP login credentials for outgoing email
To enable external webmail (on a server with a dynamic DNS name):
- Enable the DNS service on your local server
- Point your dynamic DNS name to your local server
These are common configuration requirements, but Apple's server is anything but easy to accommodate them.
Currently Being ModeratedApr 28, 2012 6:22 AM (in response to stevemit)
Hi Steve, that's an interesting solution - congrats for being so persistent in finding a working solution. I got tired and embarassed from having to hide my new server in a filing cabinet. 20yrs on computers and I still couldn't get on top of this "intuitively easy" operating system. So i bit the bullet one weekend, installed win7 on the server together with hmailserver, mysql and apache and on the monday everything was honky-dory. Haven't looked back. Bill
Currently Being ModeratedMay 5, 2012 8:00 AM (in response to niklasfromstockholm)
My solution to "fetching emails from ISP and import to Mail Server" is use Popcon (http://www.servolutions.com/popcon.htm), it should be installed on PC. It can successfully populate mail to my local email server. But mail client can't receive the mail, because local mail server resend mail to ISP server again. Because ISP email name( firstname.lastname@example.org) is same as the email name on local email server.