Forwarding already received mail?


 
Thread Tools Search this Thread
Operating Systems AIX Forwarding already received mail?
# 1  
Old 05-04-2009
Forwarding already received mail?

Greetings to all of you. I am a tad desperate here. I have found MANY articles scattered across the internet from google searches and unix.com searches for how to forward mail that say:

Create a ~/.forward file and put XXXX in it.

This is not what I need to do.

We have bunch of users who sendmail mistakenly delivered mail LOCALy to after an upgrade to AIX 5.3. For instance, a message sent to johndoe goes to /var/spool/mail/johndoe, then John can run mail from a command line and read his mail in /var/spool/mail/johndoe and then it gets transferred to /home/johndoe/mail.

The problem WAS that we needed our customized sendmail.cf file and the upgrade overwrote it. So... Now I have to find a way to forward all of these reports and such that were delivered locally out to the real addresses on other servers. Ie. the mail above to johndoe should now go to johndoe@dennis.com.

How on earth can this be done? I can see the mail out there and maybe I could write a script that will send out the messages but wow that will be a huge pain. Some of the messages have uuencoded attachments that I would have to work out some fancy perl script to extract and mail.

I can not be the only unix guy who has ever wanted to "convert" the messages in /var/spool/mail to something else and forward them on.

If noone has any ideas, can you point me to a pop daemon for AIX that I can install and then use to pull mail out and forward it on?

Many, many thanks. And if I find that magical fix 5 minutes after writing this, I will post it.
# 2  
Old 05-11-2009
As promised, here is what fixed this 'problem'.

I was unable to get a Mail Delivery Agent (ie. dovecot, popd, imapd, etc) running on the AIX server. So I tried copying the /var/spool/mail/johndoe file to /var/spool/mail on a linux server that did have imapd running. At that point, after setting the rights to the file and creating a user who can access it, I was able to download the mail using IMAPD and then i could use the imap client to forward the mail to the intended users.

=)

So, the unix /var/spool/mail and /home/user/Mail file formats are compatible across different *nixes it seems.

Use with caution.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To trigger a mail if the files have been received

Hi All, i have a folder in which we receive 6 files daily. the file name will be appended with date for ex : files that we receive on 1/9/2013 will be like file1_20130108.txt.zip file1_20130108.txt file2_20130108.txt.zip file2_20130108.txt file3_20130108.txt.zip file3_20130108.txt the... (3 Replies)
Discussion started by: mahesh300182
3 Replies

2. Solaris

Mail from mailx not received

Hi , I'm trying to send a mail from a sunOS machine that is within hp network to my email: eman.el-badawy@hp.com ,the user trying to send is 'project',,but seems the mail address can not be resolved checking /var/log/syslog i got the following: Dec 25 14:34:02 svddev15 sendmail: ... (1 Reply)
Discussion started by: Eman_in_forum
1 Replies

3. UNIX for Dummies Questions & Answers

Forwarding mail via Pine

I am asking about my work account, running Linux on a system server. On pine, I set up a forward to another email account. I also keep a copy in the original account. The forward has been running fine for some time. I believe the system sends the mail first to the forwarded account and then puts... (0 Replies)
Discussion started by: BLabel
0 Replies

4. Shell Programming and Scripting

how to grep the time of the mail received?

Hi all, My question is how can we grep the time of the mail which we receive in our inbox? like if i get a mail tonight at 10 i should be able to grep the time of it tomorrow morning or someother day in 24 hr format.... how can we do that? (2 Replies)
Discussion started by: smarty86
2 Replies

5. UNIX for Advanced & Expert Users

Unknown Attachment received on html mail

Hello, Getting an extra attachment when i send a mail using below code. The body and the rest of the attachments look very fine. The extra attachment to be exact has a name ATT00001.txt. :confused: This is not part of my $attach_list. BOUNDARY='------The Boundary-----' print - "From:... (1 Reply)
Discussion started by: pgop
1 Replies

6. Solaris

mail forwarding

Hello everybody, I have solaris 10 running on SF v890, I need to forward some sepecific root mails resulted from some application, (or all root mails) to other machine running Solaris 10 also. does it have anything to do with mail relay, or just change the log settings??? Thanks in Advance... (1 Reply)
Discussion started by: aladdin
1 Replies

7. Post Here to Contact Site Administrators and Moderators

Received all post on my mail addess

Hi neo, I am a resistered member of Forum. I want to received all post which posted by all members via mail address. Can this possible to me??? Can i receive all posts?? Thanks Yogesh Goyal (0 Replies)
Discussion started by: yogesh goyal
0 Replies

8. UNIX for Dummies Questions & Answers

sorting received mail in unix and another error

hello! when issuing the mail command to see my received mail, i get this error: (server)starla:/home/starla>mail Warning: Too many letters, overflowing letters concatenated msgcnt 27378 vxfs: mesg 001: vx_nospace - /dev/vg00/lvol4 file system full (1 block extent) mail: no space for temp file... (0 Replies)
Discussion started by: starla0316
0 Replies

9. UNIX for Dummies Questions & Answers

Sendmail - forwarding mail

quick question. I have a webserver that has various scripts for user registration and ect on it. I want to post (mail) these to myself - however I am a bit stuck on how to configure sendmail to do this. The hosting partner that I use has provided me with the use of their relay to send on the... (1 Reply)
Discussion started by: warrend
1 Replies

10. UNIX for Dummies Questions & Answers

E-mail forwarding

Hi, I would like to set up an E-mail forwarding service like Netaddress whereby users would be able to create an E-mail account in my domain name and have all the mail sent to that account forwarded to an alternate address they specify. I know that I can redirect mail sent to my domain using... (1 Reply)
Discussion started by: BigBro
1 Replies
Login or Register to Ask a Question