LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-26-2005, 09:06 AM   #1
dhanju
Member
 
Registered: Aug 2005
Location: bangalore
Posts: 47

Rep: Reputation: 17
how to merge two mailboxes---------------------


hello sir,

we are facing problem in sendmail server. what's the problem is " in our company we are having sendmail server, if any problem comes to that server we will replace that one by another sendmail server machine(using for backup). So in the absence of that sendmail server this backup sendmail server will recieve all mails at that time. After the original sendmail server is ok, we have to add those newly recieved messages to original sendmail server mailbox from backup sendmail server".

But right now what we are doing is , we will simply copy the mailboxes from "/var/spool/mail/" folder and save it to server (i.e from backup sendmail server to the orginal sendmail server ). so, now what's happening is that mailbox format is getting changed and when ever we try to recieve mail after copying these files it shows all messages as new one(both old and new messages)

so,kindly tell us some solution to transfer those mail files from backup sendmail server to orginal sendmail server and merge those mailbox files.
so that it should not show all messages as a new one.

we "Thank You" in advance for giving some soultion.

we are new to this forums, if there is any mistake please kindly tell us so that we correct it
 
Old 08-26-2005, 10:15 AM   #2
flower.Hercules
Member
 
Registered: Aug 2005
Distribution: Gentoo
Posts: 228

Rep: Reputation: 31
Perhaps using `cat` you can redirect the output from both files to a single file. I'm not sure how mail files look, it might be possible if it is just a simple text file with certain formatting.

That command would look like: `cat file1 file2 > file3`

file1 and file2 being the mail, file3 being the merged mail.

HTH

Last edited by flower.Hercules; 08-26-2005 at 12:19 PM.
 
Old 08-28-2005, 05:27 AM   #3
dhanju
Member
 
Registered: Aug 2005
Location: bangalore
Posts: 47

Original Poster
Rep: Reputation: 17
how to merge two mailboxes---------------------

Thanks for response sir.
we had tried with the 'cat' command what you have told.

But actually we had heard about mail save command for the same purpose as cat command.

But could not find how to use it. Can you help in that.

thanks again
 
Old 08-28-2005, 05:41 AM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
You might have some success with rsync. While I've not used this program, this is its intended purpose

Click here for some docs.
 
Old 08-28-2005, 07:37 AM   #5
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
No need to re-invent the bycicle. 'sendmail- q' command is designed to do exactly what you want. Just read the docomentation for details.
 
Old 05-10-2010, 07:35 AM   #6
dattapartha
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Merging Inbox in sendmail

Quote:
Originally Posted by dhanju View Post
Thanks for response sir.
we had tried with the 'cat' command what you have told.

But actually we had heard about mail save command for the same purpose as cat command.

But could not find how to use it. Can you help in that.

thanks again
Hi,
Here is the example, suppose you want to merge user parthad old mail with the user parthad new mail. This is how you need to do it.
Stop the sendmail server
service sendmail stop
cat /backup_directory/var/spool/mail/parthad >> /var/spool/mail/parthad
service sendmail start

Now login to your mail box using webmail. You can find all your mails.
Enjoy!!
Partha Datta
 
  


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
Mailboxes svinka Linux - General 1 06-29-2005 11:20 AM
Virtual mailboxes radam Linux - Software 0 08-27-2004 02:17 PM
merge mailboxes illtbagu Linux - Software 0 03-13-2004 02:53 PM
Mailboxes rumrat Linux - Distributions 6 05-02-2003 05:56 AM
mailboxes magyartoth Linux - General 1 05-31-2002 02:09 AM


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