Hi there, I would like to hear some hardware recomendations to connect our smtp server (postfix) to an external SMS box. Basically I am looking for a SMS box that takes messages via smtp and sends them via the SMS part. Has anyone here implemented a solution like this? I must use an in house sms box (GSM), I cannot use a service provider (such as internet smtp to sms providers).
thanks,
Am 12.02.2009 um 22:34 schrieb Erick Perez:
Hi there, I would like to hear some hardware recomendations to connect our smtp server (postfix) to an external SMS box. Basically I am looking for a SMS box that takes messages via smtp and sends them via the SMS part. Has anyone here implemented a solution like this? I must use an in house sms box (GSM), I cannot use a service provider (such as internet smtp to sms providers).
I think we (well, my co-worker) built such a thing here (with kannel). It will directly talk to the SMS-center at the carrier.
If you can buy them, I suspect that they are very pricey. ;-)
Also, you will of course also need a large-account at your carrier, which will also cost a certain fee.
Rainer
Hi,
Anyone has some ways for the following text processing problem? I have a text file containing two stanzas attached below. I want to uncomment the stanza with 'host=localhost' line, while left the other stanza unchanged.
...
/* udp_send_channel { host=localhost port = 10017 ttl = 1 } */
/* udp_send_channel { host=ganglia100.ec2.example.com port = 10017 ttl = 1 } */
...
If I use command below then both stanza will be altered... Please help.
sed -i -e '/^/* udp_send_channel/, /} *// {s/^/* udp_send_channel/udp_send_channel/g; s/} *//}/g; }'
--David
Hi,
Anyone has some ways for the following text processing problem? I have a text file containing two stanzas attached below. I want to uncomment the stanza with 'host=localhost' line, while left the other stanza unchanged.
...
/* udp_send_channel { host=localhost port = 10017 ttl = 1 } */
/* udp_send_channel { host=ganglia100.ec2.example.com port = 10017 ttl = 1 } */
...
If I use command below then both stanza will be altered... Please help.
sed -i -e '/^/* udp_send_channel/, /} *// {s/^/* udp_send_channel/udp_send_channel/g; s/} *//}/g; }'
--David
this is probably WAY more than you wanted but it does work, save your 2 stanzas as 'file' and run this program:
#! /usr/bin/perl -w use strict;
open FILE,"file" or die;
my $stanzaFlag = 0; my @buffer = (); my ($x, $i);
while (<FILE>) { $i = $_; # see if this line has /* if yes, start saving the stanza in buffer if (index ($i,'/*') >= 0) { $stanzaFlag = 1; } # put it into the buffer if ($stanzaFlag == 1) { $buffer[$x++] .= $i; } # see if we are done with this stanza if (index ($i,'*/') >= 0) { $stanzaFlag = 0; # get rid of the comments. if (index($buffer[1],'localhost') >= 0) { $buffer[0] =~ s//*//; $buffer[4] =~ s/*///; } print "@buffer\n"; @buffer = (); $x = 0; } }
__________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.yahoo.com.mx/
2009/2/13 Robinson Tiemuqinke hahaha_30k@yahoo.com:
Hi,
Anyone has some ways for the following text processing problem? I have a text file containing two stanzas attached below. I want to uncomment the stanza with 'host=localhost' line, while left the other stanza unchanged.
...
/* udp_send_channel { host=localhost port = 10017 ttl = 1 } */
/* udp_send_channel { host=ganglia100.ec2.example.com port = 10017 ttl = 1 } */
It's pretty simple in Perl. Something like this will work.
#!/usr/bin/perl use strict; use warnings;
# Put Perl in "paragraph mode" $/ = '';
# For each record ... while (<>) { # ... if the record is for localhost ... if (/host=localhost/) { # ... remove the opening comment ... s|/*\s*||; # ... remove the closing comment ... s|\s**/||; }
# ... and print the record. print; }
It's written as a Unix filter, so it reads from STDIN and writes to STDOUT. Call it like this:
$ my_filter < input.txt > output.txt
hth,
Dave...
# Put Perl in "paragraph mode" $/ = '';
# For each record ...
I love this list! Paragraph mode REALLY cleans things up. Although it worked, this makes my first attempt look really amateurish. Be sure to put the definition of $/ inside a code block { } if you are using it inside a program or it will cause difficulties in other areas since it is defined in main and therefore used everywhere.
#! /usr/bin/perl -w use strict;
# use this like ./p2 < in.txt > out.txt # or cat file | ./p2 > out.txt
{ local $/ = ''; # turn on paragraph mode while (<>) { if (/localhost/) { $_ =~ s//*//; $_ =~ s/*///; } print "$_\n"; } }
__________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.yahoo.com.mx/
Dave,
Thanks a lot.
--Robinson
--- On Fri, 2/13/09, Dave Cross davorg@gmail.com wrote:
From: Dave Cross davorg@gmail.com Subject: Re: [CentOS] text processing problem with bash/perl To: "CentOS mailing list" centos@centos.org Date: Friday, February 13, 2009, 5:50 AM 2009/2/13 Robinson Tiemuqinke hahaha_30k@yahoo.com:
Hi,
Anyone has some ways for the following text processing
problem? I have a text file
containing two stanzas attached below. I want to
uncomment the stanza with
'host=localhost' line, while left the other
stanza unchanged.
...
/* udp_send_channel { host=localhost port = 10017 ttl = 1 } */
/* udp_send_channel { host=ganglia100.ec2.example.com port = 10017 ttl = 1 } */
It's pretty simple in Perl. Something like this will work.
#!/usr/bin/perl use strict; use warnings;
# Put Perl in "paragraph mode" $/ = '';
# For each record ... while (<>) { # ... if the record is for localhost ... if (/host=localhost/) { # ... remove the opening comment ... s|/*\s*||; # ... remove the closing comment ... s|\s**/||; }
# ... and print the record. print; }
It's written as a Unix filter, so it reads from STDIN and writes to STDOUT. Call it like this:
$ my_filter < input.txt > output.txt
hth,
Dave... _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Thu, Feb 12, 2009 at 4:34 PM, Erick Perez eaperezh@gmail.com wrote:
I would like to hear some hardware recomendations to connect our smtp server (postfix) to an external SMS box. Basically I am looking for a SMS box that takes messages via smtp and sends them via the SMS part. Has anyone here implemented a solution like this? I must use an in house sms box (GSM), I cannot use a service provider (such as internet smtp to sms providers).
One of our neighbors down the street is an Electronic Engineer for one of the Colombian cell phone operators. They began converting from CDMA to GSM several years ago. If you end up needing a Consultant, for any GSM stuff you are involved with, contact me off list and I will put you in touch with him. Cali is one hour from Panama City, on COPA, etc.