Slashdot Mirror


Linux based E-Mail w/ Windows Clients

An Anonymous Coward wrote in with this question: "I have a Linux server with 15 Windows clients. It's currently connected to the net with IP-Masqurading. Right now we have the Windows machines directly connect to the ISP to get their mail. I want to have them connect to the Linux server and then use fetchmail on the server. Each computer has it's own email account, someguy@somedomain.com I'd like to be able to have fetchmail grab all of the mail for all of the accounts and then use something like qmail to allow the Windows machines to get their mail. Whats a good way to do this? Note that I *must* be able to have email accounts with long names, about 15 characters. And I'd like it to be able to automatically add any new accounts. "

10 comments

  1. Something this company that goes through us does by Anonymous Coward · · Score: 0

    Make everything @domain.com go to one email address by having them edit their sendmail.cf file to put this line in: R$* $#local $@ $:$USERNAME under local aliases. Once this is done, do a fetchmail on the mail spool and run it through a procmail filter for each username@domain and send it to their individual spool. Thats the only solution that comes to me off the top of my head.

  2. not too difficult by Anonymous Coward · · Score: 0

    Just run fetchmail on the server and make sure it drops all the fetched mail in the specified users mailbox (still on the server).
    Configure sendmail to allow relaying from inside to out.
    Setup the mail clients to use your server as SMTP and POP host and, voila. That should do it.

    I did something similar a few months ago and it turned out to be quite a breeze.

  3. Re:oops by Anonymous Coward · · Score: 0

    i read that wrong, i thought he wanted to be able to create users himself and not go through the isp to set up a individual account, that is just way easy, just fetchmail getting a users spool and then using that server for pop3 or smtp.

  4. We do it by tzanger · · Score: 1

    QMail, SerialSMTP and SSH.

    Main server X, gets all the email for all three parts of the company (Ontario, Pennsylvania and Arizona). It has the SPAM rejection and whatnot.

    X has in /var/qmail/alias *EVERY* email address and it stuffs their mail into a /on, /az, or /pa Maildir.

    Office servers A, B and C have a cron job that uses SerialSMTP and SSH to securely transfer the mail for each server from the /on, /az and /pa dirs on main server X to themselves every 10 mins or so (they are dialups and have dynamic IPs).

    Office servers A, B and C have the employee's Maildirs. There are /var/qmail/alias/ entries for long email addys going to a local username where necessary.

    Everyone at offices A, B and C pops or IMAPs their mail off of local server A, B or C. Sends go to the same server, but it's configured to send it directly out to wherever it may need to go via SMTP.

    Works GREAT, one spot to block SPAM, and secure. email me if you have any questions. I'll be forwarding them off to my brother, who was the genius to come up with this. We have about a 0.012% email failure per month, and they're all due to misspelled usernames.

  5. Re:Something this company that goes through us doe by tzanger · · Score: 1

    The problem with procmail is that your headers get screwed with and things like mailing lists and the like get reflected to. We used procmail for a while but switched to SerialSMTP.

  6. Fetchmail, Cron and Sendmail and IMAP by Anonymous Coward · · Score: 0

    Your first task will be to create 15 or so user accounts and passwords on the system. Assuming you don't want them to be able to log in as root # useradd bgates -s /bin/false # passwd bgates Now you need to configure Fetchmail to grab the external mail account you want. Add an entries to .fetchmailrc in roots home directory like this poll pop3.microsoft.com proto pop3 user "billg" there with password "£!nuxRoolZ" is bgates here Now add an entry to root's cron to run fetchmail as often as you want mail polled for. # crontab -e and add a line like for 15 minute polling. 0-59/15 * * * * /usr/bin/fetchmail Fetchmail should hand the mail off to your local smtp server, sendmail (or qmail if your prefer) which will deliver to the mail to local accounts. Your users then set their mail clients to pick up either pop3 or imap off your linux box. If you have something like RedHat 6.0 you will need the following RPMS installed to make this work fetchmail-5.0.0-1 sendmail-8.9.3-10 imap-4.5-3 vixie-cron-3.0.1-38 and also any rpms these depend on. Pick equivalent packages for your disto, or prepare for a long day with a bunch of tarballs. Regards, Rob

    1. Re:Fetchmail, Cron and Sendmail and IMAP by Anonymous Coward · · Score: 1

      Ack, this should be more readable..,

      Your first task will be to create 15 or so user accounts and passwords on the system.

      Assuming you don't want them to be able to log in as root

      # useradd bgates -s /bin/false
      # passwd bgates

      Now you need to configure Fetchmail to grab the external mail account you want. Add an entries to .fetchmailrc in roots home directory like this

      poll pop3.microsoft.com proto pop3
      user "billg" there with password "£!nuxRoolZ" is bgates here

      Now add an entry to root's cron to run fetchmail as often as you want mail polled for.

      # crontab -e

      and add a line like for 15 minute polling.

      0-59/15 * * * * /usr/bin/fetchmail

      Fetchmail should hand the mail off to your local smtp server, sendmail (or qmail if your prefer) which will deliver to the mail to local accounts.

      Your users then set their mail clients to pick up either pop3 or imap off your linux box.

      If you have something like RedHat 6.0 you will need the following RPMS installed to make this work

      fetchmail-5.0.0-1
      sendmail-8.9.3-10
      imap-4.5-3
      vixie-cron-3.0.1-38

      and also any rpms these depend on.

      Pick equivalent packages for your disto, or prepare for a long day with a bunch of tarballs.

      Regards,

      Rob

  7. IMAP, fetchmail by Anonymous Coward · · Score: 0

    Conisedr the cyrus IMAP daemon. It is designed to be used fro boxes that don't let users log on. It should have a freshmeat entry.

    1. Re:IMAP, fetchmail by Anonymous Coward · · Score: 0

      I use FetchPOP, but I'm not sure where i found it. It writes its own configuration file with the user's input and downloads mail to the user's spool dir. Along with a Pop3d running, I use it to grab pop mail everytime diald goes up.. then the windows computers can check mail every 30 seconds or whatever setting people feel is appropriate these days. I'm not sure with qmail, but Outlook express works great with multiple accounts, and different settings for sending mail.

  8. Run Pegasus & fetchmail or sendmail by Medievalist · · Score: 1

    On the windows hosts use Pegasus Email v3.12a (32-bit) which has full IMAP support. The Email can stay on the linux box, so that cron jobs can be used to prune old crap that oozers never delete and so that the oozers can play musical chairs as they wish.
    Sendmail/IMAP/Pegasus/Samba is THE state-of-the-art Microsoft integration method. You can pay many $1000s and will still not get close to the performance (I run 400+ oozers off of a Pentium 166 RH5.2 server).