add script to be called by exim

This commit is contained in:
Serghei Mihai 2016-03-29 14:50:25 +02:00
parent a45871b95a
commit a1966b0d95
1 changed files with 12 additions and 0 deletions

12
eo-redmine-mailfilter.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
if ! echo $RECIPIENT | grep -q '^support-[a-z-]*@.*$'; then
exit 1
fi
export REDMINE_KEY=`cat /etc/redmine-key`
export REDMINE_URL='https://dev.entrouvert.org'
export PROJECT=`echo $RECIPIENT | sed 's/support-\([a-z-]*\)@.*/\1/'`
python /usr/local/bin/mail2redmine.py