Hallo All,
I have the following small shell script:
#!/bin/sh
QMAILINJECT="s"; export QMAILINJECT
sender="$(cat - | 822field From | sed 's/^ *//g')"
seek0 0
exec /var/qmail/bin/qmail-inject -f "$sender" "$DEFAULT"
It takes an outgoing email on my mailserver, fixes an error in the From address (created by a terribly buggy application thankfully hosted on a specific ip) and sends it on.
What I would like now is that if the "$sender" = "uniquename@domain.com" then also have it run through a small awk script (say /etc/test.awk ). How would I insert that statement in the above ?
Any pointers much appreciated.
I have the following small shell script:
#!/bin/sh
QMAILINJECT="s"; export QMAILINJECT
sender="$(cat - | 822field From | sed 's/^ *//g')"
seek0 0
exec /var/qmail/bin/qmail-inject -f "$sender" "$DEFAULT"
It takes an outgoing email on my mailserver, fixes an error in the From address (created by a terribly buggy application thankfully hosted on a specific ip) and sends it on.
What I would like now is that if the "$sender" = "uniquename@domain.com" then also have it run through a small awk script (say /etc/test.awk ). How would I insert that statement in the above ?
Any pointers much appreciated.