SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Wed Jun 25, 2025 00:24
SMSTools3 Community » Search Bottom

Page:  1

Keywords:
Mode: All keywords (AND)
poolnoodle: the default email2sms script doesn't work for me. so i tried my hand on a python script. u may try out my script. 1. replace your email2sms with script below and save as email2sms.py 2. change your postfix master.cf to point to email2sms.py instead. =================================== #!/usr/bin/env python import email.parser import sys import string import random import os import pwd import grp full_msg = sys.stdin.readlines() msg = email.message_from_string(''.join(full_msg)); ranext = (''.join(random.choice(string.ascii_lowercase) for i in range(9))) sms_file = open("/var/spool/sms/outgoing/sms."+ranext, 'w') print >> sms_file, "To:",msg['to'].split('@')[0][1:] print >> sms_file, "\nSubject:",msg['subject'] print >> sms_file, "Date:",msg['date'] """ Do not include msg.get_pyload for Zabbix """ print >> sms_file, "\n",msg.get_payload() sms_file.close() path = "/var/spool/sms/outgoing" for root, dirs, files in os.walk(path): for file in files: fname = os.path.join(root, file) os.chown(fname, pwd.getpwnam("smsd").pw_uid, grp.getgrnam("smsd").gr_gid) ======================== cheers!

Page:  1

SMSTools3 Community » Search Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.