-
Notifications
You must be signed in to change notification settings - Fork 7
CONNECTORS mail2sms procmail
This connector provides a simple procmailrc filter and an appropriate Python3 script that process the incoming e-Mail data to send it to the SMS-Gateway.
Many software products only support email notifications and are not providing a simple way to extend the base software to handle REST calls to third party software.
With the email2sms connector you can extend any email compatible software with SMS notification as result.
Currently only the SUBJECT ist passed to the SMS-Gateway!
A graphical overview of components involved. .
At our working side we are using Postfix as mail2sms SMTP server. At least you have to configure the following main.cf
parameters.
mydestination = $myhostname, mymaildomain.com, localhost.at.strabag.com, localhost
mailbox_command = /usr/bin/procmail
The procmailrc file is the procmail filter. It will forward all incoming e-Mail to the Python script that is configured here.
You must change /path/to/procmail3.py
to the absolute path where the procmail3.py script resides.
You have to specify all parameters. No default values are provided.
- loglevel
Specify the loglevel. UseDEBUG
to know whats going on.
loglevel = DEBUG
- logfile
The logfile the logging information is going to. No path needed. The logfile will reside beside the procmail3.py script.
logfile = procmail3.log
- smsgateway
The base URL under which the WIS component is reachable. In a mutli component setup you can use the loadbalancer URL.
smsgateway = http://127.0.0.1:7777
- priority
The priority SMS are send with.
priority = 1
This is the Python script you are pointing to from the procmailrc filter. Basically you not need to change anything here.
This work is licensed under a Creative Commons Attribution 4.0 International License.