diff --git a/Scripts/Billing/postfix-filter b/Scripts/Billing/postfix-filter new file mode 100644 index 0000000..372068b --- /dev/null +++ b/Scripts/Billing/postfix-filter @@ -0,0 +1 @@ +"| /home/subflexion_billing/process-mail.sh" diff --git a/Scripts/Billing/postfix-filter b/Scripts/Billing/postfix-filter new file mode 100644 index 0000000..372068b --- /dev/null +++ b/Scripts/Billing/postfix-filter @@ -0,0 +1 @@ +"| /home/subflexion_billing/process-mail.sh" diff --git a/Scripts/Billing/process-mail.sh b/Scripts/Billing/process-mail.sh new file mode 100755 index 0000000..4c11c38 --- /dev/null +++ b/Scripts/Billing/process-mail.sh @@ -0,0 +1,21 @@ +#!/bin/bash + + +mailfile=`mktemp` +cat - > $mailfile + + +echo "Environment:" >> ~/emails.txt +set >> ~/emails.txt +echo "Sender:" >> ~/emails.txt +echo $SENDER >> ~/emails.txt +echo "Got the following email: " >> ~/emails.txt +cat $mailfile >> ~/emails.txt + + +# Now you have your email on the temporary file +# pointed by $mailfile and can do whatever you want. +# Just don't forget to end the program with: + +rm $mailfile + diff --git a/Scripts/Billing/postfix-filter b/Scripts/Billing/postfix-filter new file mode 100644 index 0000000..372068b --- /dev/null +++ b/Scripts/Billing/postfix-filter @@ -0,0 +1 @@ +"| /home/subflexion_billing/process-mail.sh" diff --git a/Scripts/Billing/process-mail.sh b/Scripts/Billing/process-mail.sh new file mode 100755 index 0000000..4c11c38 --- /dev/null +++ b/Scripts/Billing/process-mail.sh @@ -0,0 +1,21 @@ +#!/bin/bash + + +mailfile=`mktemp` +cat - > $mailfile + + +echo "Environment:" >> ~/emails.txt +set >> ~/emails.txt +echo "Sender:" >> ~/emails.txt +echo $SENDER >> ~/emails.txt +echo "Got the following email: " >> ~/emails.txt +cat $mailfile >> ~/emails.txt + + +# Now you have your email on the temporary file +# pointed by $mailfile and can do whatever you want. +# Just don't forget to end the program with: + +rm $mailfile + diff --git a/Scripts/Billing/setup.sh b/Scripts/Billing/setup.sh new file mode 100755 index 0000000..d43ae31 --- /dev/null +++ b/Scripts/Billing/setup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + + +cp postfix-filter ~/.forward.postfix + +