Author |
Post |
|
#1 Wed Oct 24, 2012 15:40, 146 months ago.
|
Member
Registered: Oct 2012
Location: Austria
|
If someone is interested in "MailSMSGateway". SMS is one of the most preferred mode of communication and therefore it would be nice to send an email notification directly to an sms receiver. This gateway retrieves the mails and place it to the sms spool directory for sending. MailSmsGateway is a simple interface between mailing and sms services (like smstools3). How does it work ? An email client sends mail messages to an email account. The email account can be located under a linux server (sendmail), Microsoft Exchange or any other email server. You have now 4 possibilities to retrieve the emails and pass it over to the sms service (at the moment smstools3 is supported). Under *nix systems: - mailbox - maildir system independent: - pop3/pop3s - imap4 Further details: http://sourceforge.net/projects/mailsmsgateway/
|
|
#2 Thu Nov 15, 2012 17:16, 145 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
Great work! But would it be possible to have the mailbody incorporated into the sms text aswell and not only the subject?
|
|
#3 Fri Nov 16, 2012 07:57, 145 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
Hi Herbert. I'm really really new to Perl so please don't be mean if I don't get things right in th beginning I did some research on parsing mail with perl and stumbled across Mail::MboxParser that should provide all the different fileds (from, to, subject, msg_text) This script provides all the fields when run like: ./decmail.pl < mail Found this on Perl Monks.
|
|
#4 Fri Nov 16, 2012 21:19, 145 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
Hi,
as already mentioned in my mail, it would be possible but on very large mails a lot of sms would be sent. With the subject of the mail it is more manageable.
Concerning "Mail::MboxParser", it is another possibility to process the mailbox, but keep an eye to the (further) development of this module (version from 2005).
|
|
#5 Tue Nov 20, 2012 18:48, 145 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
Hi,
I added now the possibility to send the mail body instead of the subject.
have fun!
|
|
#6 Wed Nov 21, 2012 11:45, 145 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
Sweet Thank your very much. I will have a look at it and keep you posted. Regards, Daniel
|
|
#7 Wed Nov 21, 2012 19:18, 145 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
Herbert. This works great! Do you think you could make it possible to send subject+mailbody? I know I seem very demanding Regards, Daniel
|
|
#8 Thu Nov 22, 2012 20:59, 145 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
yes, I try it to get it ready till next week
|
|
#9 Sat Nov 24, 2012 19:55, 145 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
Now it is possible to send both (subject & body), to find in version 1.11 on sourceforge. Details how to customize in pdf document under FAQ.
|
|
#10 Mon Nov 26, 2012 11:39, 145 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
Works like a charm Great work! Thank you very much!
|
|
#11 Thu Mar 21, 2013 19:35, 141 months ago.
|
Member
Registered: Mar 2013
Location: United Kingdom
|
Hi Herbet, this is a magnificent application that you have developed, thank you very much, exactly what i was looking for. i have installed and configured as per your document and receiving and converting perfectly, and log file showing moved to spool folder. My problem is the files are not moving into that folder. what are the file names that are moved so that i can try and establish where they are being moved to? i have checked all the paths and they are correct in the config file and do exist. any help, advice or assistance would be greatly appreciated. Thanks again. PS: Ubuntu 12.04 server, with apache2, postifx, dovecot, ispconfig 3, smstools 3 and playsms amongst numerous other components. the latest and most important, MailSmsGateway! « Last edit by tips on Thu Mar 21, 2013 19:39, 141 months ago. »
|
|
#12 Fri Mar 22, 2013 07:56, 141 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
Hi,
I will give you a short description about the flow of the processed mail message.
- opening of the mailbox and start reading of mails - arranging SMS Message (text from subject or mailbody) - creation of a temporary file in directory "/tmp" (temporary file like: /tmp/SMS_send_<XXXXXX>) - after creation the file is moved to the SMS spool directory (normally /var/spool/sms/outgoing) if not changed in MailSmsGateway.cfg (Parameter SMS_SPOOLDIR) - deletion of processed mail
You have 2 files to look for hints/errors: 1) the standard logfile "/var/log/MailSmsGateway.log" 2) and "/var/log/MailSmsGateway_STDERR_<XXXXXX>" for possible program/module errors
|
|
#13 Fri Mar 22, 2013 21:27, 141 months ago.
|
Member
Registered: Mar 2013
Location: United Kingdom
|
Working great, thank you so much.
|
|
#14 Thu May 09, 2013 10:46, 139 months ago.
|
Member
Registered: May 2013
Location: Italy
|
Thank you hstadler for your job. Just a little question: in my organization we send a message to many phone at the same time (es: 12345@sms.com; 78901@sms.com).
Your software intercept only the first number :-(
I have multi way to solve the problem but the best is that your software check this case.
I'm not a developer, sorry, I can try to modify your script but I'm very scary!
Can you help me?
Thank,
Alessandro
|
|
#15 Fri May 10, 2013 20:09, 139 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
hi, i will try to find a solution, bye
|
|
#16 Mon May 13, 2013 05:37, 139 months ago.
|
Member
Registered: May 2013
Location: Italy
|
Oh, thank you. I have seen the script, the method you use is Mail::Address (http://search.cpan.org/~markov/MailTools-2.12/lib/Mail/Address.pod) but it seems that catch only the first address. Is necessary write a loop, I think.
Thank you very muche, Alessandro
|
|
#17 Wed May 15, 2013 05:58, 139 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
Hi,
have a look at http://sourceforge.net/projects/mailsmsgateway/ for the new version (1.12). It should work now with all receivers in the "To:" field.
Bye
|
|
#18 Wed May 15, 2013 07:21, 139 months ago.
|
Member
Registered: May 2013
Location: Italy
|
Fantastic!!!
It works perfectly, thank you very much!!!
I was solved with a complex rule in my mail server but this is the better solution.
Thank you again!
Alessandro
|
|
#19 Thu May 16, 2013 06:13, 139 months ago.
|
Member
Registered: May 2013
Location: Italy
|
There is a little problem now: in /var/log I have some file MailSMSgateway_STDERR_xxxx.log, the files contains:
utf8 "\xE0" does not map to Unicode at /usr/local/bin/MailSmsGateway/MailSmsGateway line 975, <TH> line 24. Malformed UTF-8 character (unexpected non-continuation byte 0x4d, immediately after start byte 0xe0) in substitution (s///) at /usr/local/bin/MailSmsGateway/MailSmsGateway line 900, <TH> line 24.
One file every time I use the script (every 1 minute).
There's not problem for me, is working fine and I can delete dei log.
Thank you again, if you came in Caorle for your holiday (http://turismo.caorle.eu/) I can give you a little present (a book of very old people lived in Caorle, in Italian!!! very cool!!!).
Bye
|
|
#20 Thu May 16, 2013 18:27, 139 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
hi,
this message has something to to with your configuration file in /etc directory. Please check with a hexeditor or with "od" and search for the hex code "e0" and "4d". the file should be in an "utf8" format.
may be this link helps: http://stackoverflow.com/questions/5477565/how-to-setup-vim-properly-for-editing-in-utf-8
Thank you for your offer.
Bye
|
|
#21 Mon Nov 25, 2013 19:46, 133 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
Hi Herbert, we are currently implementing Cisco ISE. One aspect is to provide wifi guest accounts. Wifi credentials can be provided via SMS, well basically via SMTP-to-SMS funtionality. DetailsCisco uses a globally configured SMTP server to deliver a mail to an already implemented Mail2SMS gateway. A template editor can be used to design the mail body. The problem is that Cisco doesn't support putting target mobile number into RCPT TO field and put everything into mail body like this: I was thinking about using procmail and formail in combination to extract body and the needed information like "to:" and everything marked with "text:" and then build a new message in supported MailSMSGateway format. What do you think? Do you have a better or more clever solution? Any help would be appreciated « Last edit by schindld on Mon Nov 25, 2013 19:47, 133 months ago. »
|
|
#22 Tue Nov 26, 2013 21:04, 133 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
Hi,
I think with no adaption of the code there is no chance to get a simple solution. I try to build a solution in the next 2 weeks.
bye
|
|
#23 Wed Nov 27, 2013 20:23, 133 months ago.
|
Member
Registered: Nov 2012
Location: Germany
|
This is great news, thanks! Sorry for bothering you Looking forward hearing from you.
|
|
#24 Wed Dec 04, 2013 21:19, 132 months ago.
|
Member
Registered: Oct 2012
Location: Austria
Topic owner
|
hi,
now I have "designed" a solution for you, please have a look at page 17 in the pdf document on sourceforge.
bye
|
|
#25 Fri Jan 17, 2014 06:22, 131 months ago.
|
Member
Registered: Jan 2014
Location: Russian Federation
|
Hi! Thank you for your project! I did not have Unicode support for sending messages in Russian. I added the changes to the code. Also added a run from another user in init-script for Centos. I want to share with the community. If you add the changes to the main branch. I will be very grateful. Maybe you can implement it more beautiful, it did for me =) MailSmsGateway with unicode message support v.1.13
|