C Masters wrote: > On Thursday 08 November 2001 15:08, Craig Dickson wrote: > > > Here's what I have set up: > > > > Incoming mail: > > > > On Debian #1, fetchmail, running from per-user crontabs, retrieves > > our mail. (I want to change this to be a single system-wide fetchmail > > running as a daemon, but I haven't got round to it yet.) It gives the > > mail to exim, also running on Debian #1, which sends it to procmail > > for filing. Our firewall blocks the SMTP port, so I don't have to > > worry about anyone compromising my systems via some exim exploit, nor > > do I have to worry about being an open relay for spammers. > > Details on this setup would be ~greatly~ appreciated. I'd like to set > up fetchmail in daemon mode so that it runs continually, regardless of > whether anyone is currently logged on to this box. I've attempted to > set up exim, but that's more or less where my confidence evaporates.
Fetchmail's pretty easy to set up. Use the fetchmailconf X front-end to create a ~/.fetchmailrc for yourself, which, to run as a system-wide daemon, you will then need to move to /etc/fetchmail. To get fetchmail working as a daemon after you've made your /etc/fetchmailrc, edit /etc/default/fetchmail to make the following changes: SERVICE=true RUNASROOT=true Or leave RUNASROOT=false and set up a fetchmail user account for the daemon to use. I haven't done that yet, though I should (it would help protect my system against any exploits in fetchmail that might be discovered and abused), so I can't tell you if there are any gotchas involved. Then, as root, execute /etc/init.d/fetchmail to start the daemon, and check syslog for errors. > I'm also on a DSL line that is always "up". I think I'd better stick to > using my ISP's smtp server. I take it that I would setup exim as a > smarthost then? Details also appreciated. There is a script called eximconfig that can help you to get started. Do the best you can with that, then read through /etc/exim/exim.conf and see if you like the options it set. Ask this mailing list if any of it is puzzling. > > Debian #2 has ssmtp installed, which is just a simple mail forwarder > > that I configured to send all mail to exim on Debian #1. The only > > mail it sends, generally, is daemon errors mailed to root, which are > > re- addressed to my account at Debian #1. > > As I only have the one box, would I be able to include forwarding of > logs and/or internal mail between users in this setup? If mail is sent to an unqualified username (i.e. no @domain specified), exim will try to deliver it to a local account of that name. If the mail is addressed to [EMAIL PROTECTED] (where you is both your local username and your username at your-isp.com), then my guess is that it will probably be routed to your ISP's servers and back to you by default. You should be able to set up a rewrite rule in exim to optimize that, though. I hope all this helps. Feel free to ask for more. Craig