Forward Script


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Forward Script
# 1  
Old 10-07-2008
Forward Script

Here is wat iam looking for , I need a forward script which sends out a mail to a particular server say (B-server) as soon as it receives a mail from differnt server say A-server.
Lets say abc@xyz.com is sending a mail from server A to Server B then the script should automatically send a mail to def@rts.com on Server C
Because i could able to send the mail to the server but my question here is ,do i need to schedule a job or sme thng which checks for the email in the inbound directory and if found shoots out the email to the desired destination problm,that would be great if i dnt have to schedule smthg.
Any sample scripts will be of gr8help to me
Can Any one help me with this script
Thanks in Advance.
Sri

Last edited by sriharan; 10-07-2008 at 07:47 PM..
# 2  
Old 10-08-2008
Sounds like procmail. It simply triggers when you receive a message, so no additional hooks are required (but there are differences depending on how exactly you hook it in).

What do you mean by "server A", "server B", and "server C"? Do you need something to happen on a different server than the one where the message is received? Do you need the outgoing message to be sent from a different server than the one where the message is received? If either of these is yes, can you use ssh to accomplish that part? Procmail as such just kicks off a shell script so whatever you can script, you can use from Procmail.
# 3  
Old 10-09-2008
thanks for the response

Thanks Era
for ur reply , i Never worked on procmail,
Basically iam dealing with 3 servrs
1) Where a alert is Generated thru a Mail lets call it Server A
2) Server B which recives the alert mail from Server A and Shoots out a mail to Server C as soon as it recieves the Mail.
Please Let me knw if iam not clear !!
Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Using forward slash in search pattern in perl script

I have existing pattern in the perl script as: my $pattern = "^Line.*?:|^Errors*: |^SEVERE:.*?:|^Null pointer exception occurred"; and I wanted to include below keywords in my search pattern "I/O exception" and "FileNotFoundException"the problem is when I include my pattern like my... (5 Replies)
Discussion started by: ambarginni
5 Replies

2. Shell Programming and Scripting

append dates going forward from today to certain line in shell script

Hi there, I have a requirement to append dates going forward to a certain line in a file. I'm not sure of how to go about this. Any help will be greatly appreciated. Thanks Slyesco:wall: (2 Replies)
Discussion started by: Slyesco
2 Replies

3. Ubuntu

Iptables forward traffic to forward chain!!!

Hi, I am new to linux stuff. I want to use linux iptables to configure rule so that all my incoming traffic with protocol "tcp" is forwarded to the "FORWARD CHAIN". The traffic i am dealing with has destination addresss of my machine but i want to block it from coming to input chain and somehow... (0 Replies)
Discussion started by: arsipk
0 Replies

4. IP Networking

IP tables - ip forward to another ip

Hi all, Now my need is: This should forward each client to 1.11 and 1.12 as per each request. I mean : First request should go to : http://192.168.1.10:8080/MySite Second request should go to : http://192.168.1.11:8081/MySite Third request should go to ... (1 Reply)
Discussion started by: linuxadmin
1 Replies

5. What is on Your Mind?

Who's looking forward to Ironman 2?

I can't wait for this movie to come out. I loved the first one and I look for a lot more action in the second one. Plus Scarlett Johannson as a red head.. I mean.. how can it be bad? :) (5 Replies)
Discussion started by: dday
5 Replies

6. Shell Programming and Scripting

PHP script to modify .forward files

Hi. I've been racking my brain on a project I've been working on for work, and hope someone here might be of assistance. Basically I'm trying to create dynamically generated .forward files for users/aliases on my email server. The intent is for these files to be generated automatically any time... (3 Replies)
Discussion started by: adotte
3 Replies

7. Shell Programming and Scripting

Help with SED and forward slash

Using the script: (Called replaceit) #!/bin/ksh String=$1 Replace=$2 sed -e "s/${orig}/${new}/g" oldfile.txt > newfile.txt In oldfile.txt, I'm looking for: getenv("Work") And change it To: /u/web I execute the script: replaceit "getenv(\""Work\"")" /u/web I'm getting sed... (3 Replies)
Discussion started by: gseyforth
3 Replies

8. Solaris

forward root mail

how can i forward roots mail, i want every mail fowarded (1 Reply)
Discussion started by: csaunders
1 Replies

9. UNIX for Dummies Questions & Answers

.forward

We have unix faxing software that e-mails the fax results to our users unix mail. We want to forward this e-mail to their desktop internet mail. Originally we setup .forward files in each users id to eliminate unwanted unix mail from the fax. Now I want to modify the forward. We are on... (3 Replies)
Discussion started by: MsGail
3 Replies
Login or Register to Ask a Question