LinuxQuestions.org
Help answer threads with 0 replies.
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 08-25-2009, 05:28 AM   #1
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Rep: Reputation: 0
Relaying mail from a server at my head office to another server at a branch.


Hello All,

Am a bit uncomfortable with linux so need your help. I have an email server at my head office (HO) and its domain name is mydomain.com. i need to setup up another email server for my remote branch on a different subnet. The server will recieve emails from the HO server and distributes to clients on the branch. i need it to maintain mydomain.com as well on the branch.

I have been researching on how i can i achieve this through sendmail but am facing challenges. pliz help!!!!

BJ
 
Old 08-26-2009, 07:55 PM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
Why don't you just setup a pop server at your HO and allow your branch clients to pop their mails?
 
Old 08-27-2009, 01:55 AM   #3
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Thanx for the response Sarin. What you have just said is the current scenario that i'm trying to run away from. the link between head office and the branch is a slow one, so when someone on the branch sends an email to another person on the branch, it goes via the server at the head office! so thats one of the reasons why i need to set up a server on the branch!
 
Old 08-27-2009, 03:11 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

What functionality exactly are you looking for? Total synchronization between mail server at your H.O. and the branches? Or just local mailserver for the accounts on that branch.

Kind regards,

Eric
 
Old 08-27-2009, 05:10 AM   #5
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi Eric,

Thanx for taking your time on this. i just need a local mail server for the accounts on the branch. their email addresses should be the same format as those at the head office. e.g someone at the head office may have an address someone@maindomain.com, Another person's address at the branch should be e.g. another@maindomain.com. which means i still maintain the same domain on the branch also!

BJ
 
Old 08-27-2009, 05:28 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
I think the easiest way is to set up a Fetchmail/postfix server at the branch office and have Fetchmail/Dovecot or other combination to pull the mail from the main server on selected group of users. Then the branch users can connect to their local server to retrieve their mail. When sending out mail they can send it to their local postfix which relays to the main office or send it directly to the main office.

Kind regards,

Eric
 
Old 08-27-2009, 07:00 AM   #7
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Thanx again Eric.

I was trying to use fetchmail configured in the home directory of each user and its working! the problem now is i need it to run in daemon mode? how can i achieve this? my distro is CentOS 5

Regards,
BJ
 
Old 08-27-2009, 07:23 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Code:
fetchmail -d XXX
runs fetchmail in daemon mode where XXX is the time to sleep between polls, so changing XXX to 300 will poll every 5 minutes.

Kind regards,

Eric
 
Old 08-27-2009, 07:31 AM   #9
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Thank very much for the help Eric! Will let you know if everything goes on well with the setup of the server

Regards,
BJ
 
Old 08-27-2009, 08:52 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
No problem, that's what we're here for. Best of luck and whatever question you have, there's always an answer to it.

Kind regards,

Eric
 
Old 09-08-2009, 03:34 AM   #11
sv452
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Rep: Reputation: 0
local email.

Quote:
Originally Posted by bjmakond View Post
Thanx again Eric.

I was trying to use fetchmail configured in the home directory of each user and its working! the problem now is i need it to run in daemon mode? how can i achieve this? my distro is CentOS 5

Regards,
BJ
good day bjmakond,

would you mind sharing your knowledge, i have a similar setup. I have a main server at a host mydomain.com and we have a local server in the office.

I would like to set it up so that the local server is the one everyone pop and then the server can pop the main server for incoming mail only.

so in essence the local server will handle all office bound and outbound email and retrieve the email from the main server.

hope this makes sense.
 
Old 09-09-2009, 12:54 AM   #12
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi,

I used Fetchmail and Exim as my MTA.

All you have to do is to setup fetchmail in Daemon mode so that it continually polls the main server to check and fetch new messages.


Setup as the following:


- The domain name of your main server as mydomain.com
- The domain name of the local server as sub.mydomain.com


Create user accounts for all users on the local machine. The main server should also have user accounts for all the users. For example, For a user called someone; create an account for the user at the main server i.e becomes someone@mydomain.com. Also create his account on the local server, thus becomes someone@sub.mydomain.com

Setup Fetchmail to run in daemon mode, use exim to rewrite messages back to mydomain.com as they are going out of the local server so that they do not appear as someone@sub.mydomain.com. Thats what i did.

Any problems in the setting up, please let me know

BJ
 
Old 09-09-2009, 10:06 AM   #13
sv452
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Rep: Reputation: 0
email

Quote:
Originally Posted by bjmakond View Post
Hi,

I used Fetchmail and Exim as my MTA.

All you have to do is to setup fetchmail in Daemon mode so that it continually polls the main server to check and fetch new messages.


Setup as the following:


- The domain name of your main server as mydomain.com
- The domain name of the local server as sub.mydomain.com


Create user accounts for all users on the local machine. The main server should also have user accounts for all the users. For example, For a user called someone; create an account for the user at the main server i.e becomes someone@mydomain.com. Also create his account on the local server, thus becomes someone@sub.mydomain.com

Setup Fetchmail to run in daemon mode, use exim to rewrite messages back to mydomain.com as they are going out of the local server so that they do not appear as someone@sub.mydomain.com. Thats what i did.

Any problems in the setting up, please let me know

BJ
Hi BJ,

that sounds really simple to do, from what you descibed it will do exactly what i want. So people will pop the local server and the local server will pop the main one every 5 mins or so and deliver the email to the local mailboxes.

cool ... will give it a bash and let you know. THANX AGAIN !
 
Old 09-09-2009, 11:06 AM   #14
bjmakond
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Thats why we are here to help each other. I just gave you a guideline of what needs to be done on my previous post. if you encounter any problem in the technical implementation. please feel free to ask.

Good Luck!

Regards,
BJ
 
Old 09-11-2009, 03:42 AM   #15
sv452
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Rep: Reputation: 0
hi BJ,

ok i setup fetchmail but when trying to start it complains the following.

fetchmail: WARNING: Running as root is discouraged.
fetchmail: no mailservers have been specified.

I tried to have .fetchmailrc in /etc and in the user home folder but neither works.

any ideas?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting up an email server for another branch bjmakond Linux - Newbie 5 06-15-2009 06:47 AM
How to monitor web server, FTP server, Mail server and database server vodka33us Programming 1 06-16-2008 04:20 AM
Synchronize 'Linux Office Suite' with Microsoft Exchange server (Outlook mail...) frenchn00b General 1 12-17-2007 10:09 PM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
Postfix relaying mail to internal mail server tradecraft1 Linux - Networking 2 10-28-2003 03:01 PM

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

All times are GMT -5. The time now is 08:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration