LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-05-2005, 01:30 PM   #1
evilchild
Member
 
Registered: Sep 2003
Location: 127.0.0.1
Distribution: *bsd, solaris, gentoo
Posts: 86

Rep: Reputation: 15
Forwarding delivered mail?


Is it possible to forward email that has already been delivered locally? I trying to forward a user's email on my server who has already recieved it locally to his mailbox ("/home/user/Mailbox"). Once mail is delivered to a mailbox locally in a postfix enviroment is it possible to forward the aready delivered message?

Thanks Evilchild
 
Old 12-05-2005, 06:21 PM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

Depending on the way emails are stored in the user's mailbox, you may have to parse the user's inbox (often seen as a regular file were all mails are written one after the other) using sed or something else to process the inbox one mail after the other.

Then you can re-send them using "mail" or "email".

You can also imagine creating a script using pop3 to retrieve the mail on the mailserver if you don't have local access to the mailbox...

As a matter of fact there are MANY solutions. It really depends on what you want to achieve (just moving all the content of your inbox once, or purging only old mails on a regular basis for all your users...).
As an exemple, if you just want to get a copy of your own mails on a second mail server once, then you'd probably be quicker by copying your inbox (~/Mailbox or other, it depends on the soft you use to read your mails) to the second server. As an exemple:
francois@mailserver1 $ scp ~/Mailbox francois@mailserver2:~/Mailbox.old
francois@mailserver1 $ ssh francois@mailserver2
francois@mailserver2 $ cat Mailbox Mailbox.old > Mailbox.new
francois@mailserver2 $ mv Mailbox.new Mailbox

Not really the nicest, but that's easy to do (provided that I'm using the same mail user agent on the 2 machines cause they musty be stored in the same format, and a backup might be a good idea as well).

Conclusion, if you want a real answer to your question, you should
1/ explain you want to do
2/ explain what soft you use, what permissions you have
...
 
  


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
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 01:10 PM
Mail not being delivered liquidcool Linux - Software 4 10-17-2004 04:44 PM
qmail log says mail delivered, mail nowhere to be found svartrev Linux - Software 0 03-24-2004 06:12 PM
no mail delivered to postfix box jules_fraser Linux - Networking 22 12-13-2003 03:42 PM
mail is not delivered thru the mail command aadilkhan Linux - General 1 11-18-2003 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:43 AM.

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