Sponsored Content
Full Discussion: Forward Script
Top Forums UNIX for Advanced & Expert Users Forward Script Post 302244393 by era on Wednesday 8th of October 2008 01:48:09 AM
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.
 

9 More Discussions You Might Find Interesting

1. 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

2. Solaris

forward root mail

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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
DHCPCD-RUN-HOOKS(8)					    BSD System Manager's Manual 				       DHCPCD-RUN-HOOKS(8)

NAME
dhcpcd-run-hooks -- DHCP client configuration script DESCRIPTION
dhcpcd-run-hooks is used by dhcpcd(8) to run any system and user defined hook scripts. System hook scripts are found in /lib/dhcpcd/dhcpcd-hooks and the user defined hooks are /etc/dhcpcd.enter-hook. and /etc/dhcpcd.exit-hook. The default install supplies hook scripts for configuring /etc/resolv.conf and the hostname. Your distribution may have included other hook scripts to say configure ntp or ypbind. A test hook is also supplied that simply echos the dhcp variables to the console from DISCOVER message. Each time dhcpcd-run-hooks is invoked, $interface is set to the interface that dhcpcd is run on and $reason is to the reason why dhcpcd-run-hooks was invoked. DHCP information to be configured is held in variables starting with the word new_ and old DHCP information to be removed is held in variables starting with the word old_. dhcpcd can display the full list of variables it knows how about by using the -V, --variables argument. Here's a list of reasons why dhcpcd-run-hooks could be invoked: PREINIT dhcpcd is starting up and any pre-initialisation should be done. CARRIER dhcpcd has detected the carrier is up. This is generally just a notification and no action need be taken. INFORM dhcpcd informed a DHCP server about it's address and obtained other configuration details. BOUND dhcpcd obtained a new lease from a DHCP server. RENEW dhcpcd renewed it's lease. REBIND dhcpcd has rebound to a new DHCP server. REBOOT dhcpcd successfully requested a lease from a DHCP server. IPV4LL dhcpcd failed to contact any DHCP servers but did obtain an IPV4LL address. STATIC dhcpcd has been configured with a static configuration which has not been obtained from a DHCP server. 3RDPARTY dhcpcd is monitoring the interface for a 3rd party to give it an IP address. TIMEOUT dhcpcd failed to contact any DHCP servers but was able to use an old lease. EXPIRE dhcpcd's lease or state expired and it failed to obtain a new one. RELEASE dhcpcd's lease was released back to the DHCP server for re-use. NAK dhcpcd received a NAK from the DHCP server. This should be treated as EXPIRE. NOCARRIER dhcpcd lost the carrier. The cable may have been unplugged or association to the wireless point lost. FAIL dhcpcd failed to operate on the interface. This normally happens when dhcpcd does not support the raw interface, which means it cannot work as a DHCP or ZeroConf client. Static configuration and DHCP INFORM is still allowed. STOP dhcpcd stopped running on the interface. DUMP dhcpcd has been asked to dump the last lease for the interface. TEST dhcpcd received an OFFER from a DHCP server but will not configure the interface. This is primarily used to test the variables are filled correctly for the script to process them. ROUTERADVERT dhcpcd has received an IPv6 Router Advertisment, or one has expired. FILES
When dhcpcd-run-hooks runs, it loads /etc/dhcpcd.enter-hook and any scripts found in /lib/dhcpcd/dhcpcd-hooks in a lexical order and then finally /etc/dhcpcd.exit-hook SEE ALSO
dhcpcd(8) AUTHORS
Roy Marples <roy@marples.name> BUGS
Please report them to http://roy.marples.name/projects/dhcpcd SECURITY CONSIDERATIONS
Little validation of DHCP options is done in dhcpcd itself. Instead, it is up to the hooks to handle any validation needed. To this end, some helper functions are provided, such as valid_domainname as used by the 20-resolv.conf hook to ensure that the hostname is not set to an invalid value. valid_path is also provided, but is currently unused by a stock hook script. BSD
March 19, 2012 BSD
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy