15 lines
626 B
Bash
15 lines
626 B
Bash
#! /bin/sh
|
|
|
|
(
|
|
python3 /usr/local/bin/sendmail.py \
|
|
-u "$(cat /usr/local/bin/sendmail.config | grep "from=" | cut -d= -f2)" \
|
|
-p "$(cat /usr/local/bin/sendmail.config | grep "pass=" | cut -d= -f2)" \
|
|
-d "$(cat /usr/local/bin/sendmail.config | grep "dest=" | cut -d= -f2)" \
|
|
--smtp "$(cat /usr/local/bin/sendmail.config | grep "smtp=" | cut -d= -f2)" \
|
|
--port "$(cat /usr/local/bin/sendmail.config | grep "port=" | cut -d= -f2)" \
|
|
--stls "True" \
|
|
--subj "[Authorization] $(cat /etc/hostname): user logged in system" \
|
|
--text "$(w)" \
|
|
>> /dev/null 2>&1 &
|
|
)
|