LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-13-2008, 02:34 PM   #1
maceee
Member
 
Registered: Nov 2008
Posts: 93

Rep: Reputation: 18
Pls help with Centos + postfix + dovecot....


I am years administrator to MS servers but TOTALLY newbie to linux.

I want a little help plsss..

I have an external windows mails server and use to work with groups to get mails.

What i want to do is to setup CentOs with postfix+dovecot.
So far so good, i have setup both postfix+dovecot and have create users and groups in order to manage my internal network and users will use as pop and smtp my Centos.

But how could i retrieve mails from windows mail server first to my Centos and then to users?

Can anyone pls help?

Thank you
 
Old 11-13-2008, 02:39 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
How many users are we talking about?

Edit - I take it you mean Exchange Server?

Last edited by billymayday; 11-13-2008 at 02:48 PM.
 
Old 11-13-2008, 04:55 PM   #3
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
We talk about just 5 users
Windows server is not Exchange
What i want to do is to make linux server to download mails from windows one..and then internally to share mails to it's user..

is it possible?

thank you
 
Old 11-13-2008, 06:38 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
To be honest, with 5 users, I'd set up Outlook or similar, connect to the Windows server, set up an imap account within Outlook on the linux box and drag and drop the messages/folders across.

Depending how messages are deliverd to the Windows machine, you should be able to use a program called fetchmail in linux to gather mail from either pop or imap mailboxes. We need more info on your setup though.

Last edited by billymayday; 11-13-2008 at 06:39 PM.
 
Old 11-14-2008, 02:47 AM   #5
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
hank you for your prompt reply.

Currently i have a windows mail server where from i download 5 accounts for my 5 users.
They have approximately 200 messages per day.

Cause every user has more than 1 account to the pc, it happens different users to download same message.
So in order to reduce traffic i want to download all messages to my linux server and then to distribute these internall to my office so that i reduce traffic.

I have setup postfix + dovecot to linux server so that it can works like an internally mail server (private id) but i haven't still figure out how will i download messages from windows server to this machine and then to distribute messages to users.

Thank you
 
Old 11-14-2008, 02:57 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Hoe do they download messages, and what type of server is running on the Windows box. If you are using POP or IMAP, see my previous comment on fewtchmail. Otherwise, a bit of detail please.

What does this mean?
Quote:
Cause every user has more than 1 account to the pc, it happens different users to download same message.
 
Old 11-14-2008, 05:31 AM   #7
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
it is pop3/smtp windows 2003 server

thank you
 
Old 11-14-2008, 05:33 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Fetchmail will help here.

Edit - there's no point sending me an email if you don't enable emails in you profile. I only reply through LQ.

Last edited by billymayday; 11-14-2008 at 05:40 AM.
 
Old 11-14-2008, 05:50 AM   #9
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
ok..sorry..so how could i implement this with fetchmail?

Should i uninstall postfix//dovecot?
thank you
 
Old 11-14-2008, 11:16 AM   #10
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
anyone that can help plsss??

thank you
 
Old 11-14-2008, 01:42 PM   #11
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, I'd leave them in place - fetchmail will deliver to postfix.

Install fetchmail and read its man page.
 
Old 11-14-2008, 01:51 PM   #12
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
thanks for your reply.

i have installed fetchmail as you told me.

Firstly i saw that i have to create .fetchmailrc.

I did one and placed it to /home/user
Can i place different .fetchmailrc files to differens home/user/ locations.

And after i succedd to download messages with fetchmail how i will place these to it's ones respective accounts in order to download these locally?

thank you
 
Old 11-14-2008, 02:27 PM   #13
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Assuming you have a user "mac", and you windows server is "windows.example.com", create a .fetchmailrc in /home/mac along the lines of

Code:
poll windows.example.com
        proto pop3                                # or imap if that's what it should be
        user "mac@windows.example.com"            # whatever the correct mail user on the Windows machine is
        pass "abracadabra"                        # the mail password on the Windows machine
        is mac here                               # the user on the Linux machine
This will collect mail for mac@windows.example.com from the mail server windows.example.com and pass the message on to postfix to be delivered to user mac. You can then connect to your Linux box via dovecot to retrieve the message.

I add an entry to my crontab
Code:
@reboot fetchmail -d 600 > /dev/null 2>&1
That starts fetchmail in daemon mode (-d) and polls the accounts in .fetchmailrc every 600 seconds.

Now, I have all my accounts in one .fetchmailrc, and because fetchmail complains if you run it as root, they run from my account. However, the only machine that runs fetchmail is a home server, so there aren't any password privacy issues.

I would assume that you would want to run an instance of fetchmail for each user, but I'm not 100% sure on that one.
 
Old 11-14-2008, 02:47 PM   #14
maceee
Member
 
Registered: Nov 2008
Posts: 93

Original Poster
Rep: Reputation: 18
thank you for reply..

i have done everything you said ..my only question now is if every user can have his own fetchmail file...
otherwise how could we deliver with one fetchmailk file each message to it's recpective account?
 
Old 11-14-2008, 03:02 PM   #15
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
As I said, I think you want .fetchmailrc for each user with the relevant user details as per the example above, and run fetchmail as a daemon for each user (using the crontab method above is one way).

I did a quick test, and this should work fine. You will need the users to enter their password into the .fetchmailrc somehow.

AN alternative would be to change their passwords on the Windows server to something you know, and add multiple entries to your .fetchmail, something like:

Code:
poll windows.example.com
        proto pop3
        user "mac@windows.example.com"
        pass "abracadabra"
        is mac here

poll windows.example.com
        proto pop3
        user "intosh@windows.example.com"
        pass "opensesame"
        is intosh here
and just run one daemon under your user.

That's basically what I do.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix + Dovecot slackware bambeklis Linux - Server 1 06-17-2008 03:27 PM
problem with postfix and dovecot ayush1440 Linux - Server 1 02-01-2008 01:04 AM
[SOLVED] which one to install centOS 4 or centOS 5 ? Pls HELP !!! vikas027 Linux - Newbie 2 05-13-2007 06:04 AM
Postfix Dovecot Help BigAppleFan Linux - Newbie 7 08-15-2005 05:08 PM
Postfix and Dovecot umbraeOtheisles Linux - Software 3 11-23-2004 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:14 PM.

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