xoxys.scan2mail/templates/usr/local/bin/scan2mail.j2
Robert Kaussow 177429a353
Some checks failed
continuous-integration/drone/push Build is failing
initial commit
2019-08-25 20:18:43 +02:00

15 lines
372 B
Django/Jinja

#jinja2: lstrip_blocks: True
#!/bin/bash
{{ ansible_managed | comment }}
FILEPATH=$1
FILENAME=$2
FROM_ADDR="{{ scan2mail_from_address }}"
TO_ADDRESS="`basename \"$FILEPATH\"`@{{ scan2mail_mail_domain }}"
ATTACHMENT="$1/$2"
sleep 10
echo "{{ scan2mail_message | default('') }}" | mail -s "{{ scan2mail_subject }}" -a "From: ${FROM_ADDR}" -A ${ATTACHMENT} ${TO_ADDRESS}