Re: [qmailtoaster] Re: Qmail to SMS
Hi Amit Dalia, Hearty Congratulations for sending successfull SMS for Email. Let us know the procedure for Qmail-SMS, if possible any links or any patch, please give reply. On Sat, Oct 9, 2010 at 1:14 AM, Amit Dalia a...@ikf.co.in wrote: Thanks Eric and Bob, Finally I'm able to manage Qmail to SMS. Regards, Amit At Friday, 08-10-2010 on 21:16 Eric Shubert wrote: You appear to be a little lost here, Amit. I'll try to shed some light for you. I think you want to use formail with the -s option in the .qmail file. Send one message on to preline as in the default .qmail file, and send another to your perl program. Then have your perl program do its thing. You should use perl capabilities to grab $from and $subj values as they pass by (from your input file), then post to the web site once you have both variables. If you reach the end of the input file before finding the variables you're looking for, you should terminate appropriately, perhaps by sending an email notification or log message somewhere. Note, I don't believe you can invoke formail from your perl script as you've done, as you haven't given it any input or output. formail is designed to use stdin and stdout, in traditional *nix fashion. HTH. Amit wrote: Now I'm getting below error in my send log. Any idea 2010-10-08 19:57:55.934604500 delivery 1: deferral: can't_handle_mbox_delivery_for_./sms1.pl http://sms1.pl Amit On Fri, Oct 8, 2010 at 11:50 AM, Amit Dalia a...@ikf.co.in mailto:a...@ikf.co.in wrote: I'm trying with formail. Please find details below how I'm proceeding further. May be I'm somewhere wrong and someone may correct me. Initially I'm trying with my postmaster email id as that email id is not used by anyone. 1) .qmail file of postmaster |/var/qmail/bin/preline /usr/bin/maildrop -A 'Content-Filter: maildrop-toaster' /etc/mail/mailfilter |./sms1.pl http://sms1.pl Here sms1.pl http://sms1.pl is my perl script. 2) Content of sms1.pl http://sms1.pl #!/usr/bin/perl use Shell; use HTTP::Request::Common; use LWP::UserAgent; $from = system('formail -zx From:'); $subj = system('formail -zx Subject:'); #$msg = 'Test Amit '; $ua = LWP::UserAgent-new; $ua- request(POST 'http://59.162.167.36:8085/ api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt='.$from.'reseller=myreselleridstate=2' http://59.162.167.36:8085/ api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt=%27.$from.%27reseller=myreselleridstate=2%27); Problem is I'm getting sms when any mail comes on postmaster email id but I'm getting value 0 in sms. Thanks and Regards, Amit At Friday, 08-10-2010 on 0:19 Rob wrote: The message header extraction was actually from using formail not procmail so see if you can use that. On Thu, 07 Oct 2010 10:11:15 -0700, Amit Dalia a...@ikf.co.in mailto:a...@ikf.co.in wrote: Ok. I have created a perl script through which I was able to call my SMS server URL and generate SMS if passed all paramenters manually. Now I'm working on second phase of the same on how to get and pass from id and subject from mail to my perl script. As per Bob's mail I can do it from procmail but want to know can I get from id and subject value via maildrop and pass them to my perl script. If I install procmail then will it conflict with maildrop. Regards, Amit At Wednesday, 06-10-2010 on 19:39 Eric Shubert wrote: Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/ api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer -
Re: [qmailtoaster] Re: Qmail to SMS
I'm trying with formail. Please find details below how I'm proceeding further. May be I'm somewhere wrong and someone may correct me. Initially I'm trying with my postmaster email id as that email id is not used by anyone. 1) .qmail file of postmaster |/var/qmail/bin/preline /usr/bin/maildrop -A 'Content-Filter: maildrop-toaster' /etc/mail/mailfilter |./sms1.pl Here sms1.pl is my perl script. 2) Content of sms1.pl #!/usr/bin/perl use Shell; use HTTP::Request::Common; use LWP::UserAgent; $from = system('formail -zx From:'); $subj = system('formail -zx Subject:'); #$msg = 'Test Amit '; $ua = LWP::UserAgent-new; $ua- request(POST 'http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt='.$from.'reseller=myreselleridstate=2'); Problem is I'm getting sms when any mail comes on postmaster email id but I'm getting value 0 in sms. Thanks and Regards, Amit At Friday, 08-10-2010 on 0:19 Rob wrote: The message header extraction was actually from using formail not procmail so see if you can use that. On Thu, 07 Oct 2010 10:11:15 -0700, Amit Dalia wrote: Ok. I have created a perl script through which I was able to call my SMS server URL and generate SMS if passed all paramenters manually. Now I'm working on second phase of the same on how to get and pass from id and subject from mail to my perl script. As per Bob's mail I can do it from procmail but want to know can I get from id and subject value via maildrop and pass them to my perl script. If I install procmail then will it conflict with maildrop. Regards, Amit At Wednesday, 06-10-2010 on 19:39 Eric Shubert wrote: Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com -- Rob Ayer phone: 360-531-1823 gtalk: robayer skype: robayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
Re: [qmailtoaster] Re: Qmail to SMS
Now I'm getting below error in my send log. Any idea 2010-10-08 19:57:55.934604500 delivery 1: deferral: can't_handle_mbox_delivery_for_./sms1.pl Amit On Fri, Oct 8, 2010 at 11:50 AM, Amit Dalia a...@ikf.co.in wrote: I'm trying with formail. Please find details below how I'm proceeding further. May be I'm somewhere wrong and someone may correct me. Initially I'm trying with my postmaster email id as that email id is not used by anyone. 1) .qmail file of postmaster |/var/qmail/bin/preline /usr/bin/maildrop -A 'Content-Filter: maildrop-toaster' /etc/mail/mailfilter |./sms1.pl Here sms1.pl is my perl script. 2) Content of sms1.pl #!/usr/bin/perl use Shell; use HTTP::Request::Common; use LWP::UserAgent; $from = system('formail -zx From:'); $subj = system('formail -zx Subject:'); #$msg = 'Test Amit '; $ua = LWP::UserAgent-new; $ua- request(POST ' http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt='.$from.'reseller=myreselleridstate=2'http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt=%27.$from.%27reseller=myreselleridstate=2%27 ); Problem is I'm getting sms when any mail comes on postmaster email id but I'm getting value 0 in sms. Thanks and Regards, Amit At Friday, 08-10-2010 on 0:19 Rob wrote: The message header extraction was actually from using formail not procmail so see if you can use that. On Thu, 07 Oct 2010 10:11:15 -0700, Amit Dalia a...@ikf.co.in wrote: Ok. I have created a perl script through which I was able to call my SMS server URL and generate SMS if passed all paramenters manually. Now I'm working on second phase of the same on how to get and pass from id and subject from mail to my perl script. As per Bob's mail I can do it from procmail but want to know can I get from id and subject value via maildrop and pass them to my perl script. If I install procmail then will it conflict with maildrop. Regards, Amit At Wednesday, 06-10-2010 on 19:39 Eric Shubert wrote: Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/ api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com -- Rob Ayer phone: 360-531-1823 gtalk: robayer skype: robayer - Qmailtoaster is sponsored by Vickers Consulting Group ( www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
[qmailtoaster] Re: Qmail to SMS
You appear to be a little lost here, Amit. I'll try to shed some light for you. I think you want to use formail with the -s option in the .qmail file. Send one message on to preline as in the default .qmail file, and send another to your perl program. Then have your perl program do its thing. You should use perl capabilities to grab $from and $subj values as they pass by (from your input file), then post to the web site once you have both variables. If you reach the end of the input file before finding the variables you're looking for, you should terminate appropriately, perhaps by sending an email notification or log message somewhere. Note, I don't believe you can invoke formail from your perl script as you've done, as you haven't given it any input or output. formail is designed to use stdin and stdout, in traditional *nix fashion. HTH. Amit wrote: Now I'm getting below error in my send log. Any idea 2010-10-08 19:57:55.934604500 delivery 1: deferral: can't_handle_mbox_delivery_for_./sms1.pl http://sms1.pl Amit On Fri, Oct 8, 2010 at 11:50 AM, Amit Dalia a...@ikf.co.in mailto:a...@ikf.co.in wrote: I'm trying with formail. Please find details below how I'm proceeding further. May be I'm somewhere wrong and someone may correct me. Initially I'm trying with my postmaster email id as that email id is not used by anyone. 1) .qmail file of postmaster |/var/qmail/bin/preline /usr/bin/maildrop -A 'Content-Filter: maildrop-toaster' /etc/mail/mailfilter |./sms1.pl http://sms1.pl Here sms1.pl http://sms1.pl is my perl script. 2) Content of sms1.pl http://sms1.pl #!/usr/bin/perl use Shell; use HTTP::Request::Common; use LWP::UserAgent; $from = system('formail -zx From:'); $subj = system('formail -zx Subject:'); #$msg = 'Test Amit '; $ua = LWP::UserAgent-new; $ua- request(POST 'http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt='.$from.'reseller=myreselleridstate=2' http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt=%27.$from.%27reseller=myreselleridstate=2%27); Problem is I'm getting sms when any mail comes on postmaster email id but I'm getting value 0 in sms. Thanks and Regards, Amit At Friday, 08-10-2010 on 0:19 Rob wrote: The message header extraction was actually from using formail not procmail so see if you can use that. On Thu, 07 Oct 2010 10:11:15 -0700, Amit Dalia a...@ikf.co.in mailto:a...@ikf.co.in wrote: Ok. I have created a perl script through which I was able to call my SMS server URL and generate SMS if passed all paramenters manually. Now I'm working on second phase of the same on how to get and pass from id and subject from mail to my perl script. As per Bob's mail I can do it from procmail but want to know can I get from id and subject value via maildrop and pass them to my perl script. If I install procmail then will it conflict with maildrop. Regards, Amit At Wednesday, 06-10-2010 on 19:39 Eric Shubert wrote: Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob
[qmailtoaster] Re: Qmail to SMS
Great, Amit. Glad you got it working. Would you care to post your solution on the wiki (in the tips and tricks section)? -- -Eric 'shubes' Amit Dalia wrote: Thanks Eric and Bob, Finally I'm able to manage Qmail to SMS. Regards, Amit At Friday, 08-10-2010 on 21:16 Eric Shubert wrote: You appear to be a little lost here, Amit. I'll try to shed some light for you. I think you want to use formail with the -s option in the .qmail file. Send one message on to preline as in the default .qmail file, and send another to your perl program. Then have your perl program do its thing. You should use perl capabilities to grab $from and $subj values as they pass by (from your input file), then post to the web site once you have both variables. If you reach the end of the input file before finding the variables you're looking for, you should terminate appropriately, perhaps by sending an email notification or log message somewhere. Note, I don't believe you can invoke formail from your perl script as you've done, as you haven't given it any input or output. formail is designed to use stdin and stdout, in traditional *nix fashion. HTH. Amit wrote: Now I'm getting below error in my send log. Any idea 2010-10-08 19:57:55.934604500 delivery 1: deferral: can't_handle_mbox_delivery_for_./sms1.pl http://sms1.pl Amit On Fri, Oct 8, 2010 at 11:50 AM, Amit Dalia a...@ikf.co.in mailto:a...@ikf.co.in wrote: I'm trying with formail. Please find details below how I'm proceeding further. May be I'm somewhere wrong and someone may correct me. Initially I'm trying with my postmaster email id as that email id is not used by anyone. 1) .qmail file of postmaster |/var/qmail/bin/preline /usr/bin/maildrop -A 'Content-Filter: maildrop-toaster' /etc/mail/mailfilter |./sms1.pl http://sms1.pl Here sms1.pl http://sms1.pl is my perl script. 2) Content of sms1.pl http://sms1.pl #!/usr/bin/perl use Shell; use HTTP::Request::Common; use LWP::UserAgent; $from = system('formail -zx From:'); $subj = system('formail -zx Subject:'); #$msg = 'Test Amit '; $ua = LWP::UserAgent-new; $ua- request(POST 'http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt='.$from.'reseller=myreselleridstate=2' http://59.162.167.36:8085/api/MessageCompose?user=username:passwordsenderID=AMITTESTreceipientno=mymobnomsgtxt=%27.$from.%27reseller=myreselleridstate=2%27); Problem is I'm getting sms when any mail comes on postmaster email id but I'm getting value 0 in sms. Thanks and Regards, Amit At Friday, 08-10-2010 on 0:19 Rob wrote: The message header extraction was actually from using formail not procmail so see if you can use that. On Thu, 07 Oct 2010 10:11:15 -0700, Amit Dalia a...@ikf.co.in mailto:a...@ikf.co.in wrote: Ok. I have created a perl script through which I was able to call my SMS server URL and generate SMS if passed all paramenters manually. Now I'm working on second phase of the same on how to get and pass from id and subject from mail to my perl script. As per Bob's mail I can do it from procmail but want to know can I get from id and subject value via maildrop and pass them to my perl script. If I install procmail then will it conflict with maildrop. Regards, Amit At Wednesday, 06-10-2010 on 19:39 Eric Shubert wrote: Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to
[qmailtoaster] Re: Qmail to SMS
Ok. I have created a perl script through which I was able to call my SMS server URL and generate SMS if passed all paramenters manually. Now I'm working on second phase of the same on how to get and pass from id and subject from mail to my perl script. As per Bob's mail I can do it from procmail but want to know can I get from id and subject value via maildrop and pass them to my perl script. If I install procmail then will it conflict with maildrop. Regards, Amit At Wednesday, 06-10-2010 on 19:39 Eric Shubert wrote: Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com -- -Eric 'shubes' - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
Re: [qmailtoaster] Re: Qmail to SMS
On 10/05/2010 11:46 AM, Eric Shubert wrote: Rob wrote: I want to generate sms for email received for certain users. Had anyone tried the same. Basically want to generate SMS with following details: 1) From Id 2) Subject Install procmail and formail (if they are not there already) and filter incoming messages to inject a new message to the users phonenum...@sms-messaging-address (available from their carrier) that just has the Subject line. An example .procmailrc in the user's directory would be: # .procmailrc # routes incoming mail to appropriate mailboxes PATH=/usr/bin:/usr/local/bin MAILDIR=/path-to/vpopmail/domains/DOMAIN/USER/Maildir DEFAULT=/path-to/vpopmail/domains/DOMAIN/USER/Maildir/new LOGFILE=/path-to/vpopmail/domains/DOMAIN/USER/procmail.log SHELL=/bin/sh VERBOSE=yes SUBJ=`/usr/bin/formail -c -xSubject:` :0 * $ ^to_u...@domain { :0 | /usr/bin/formail -X \ -AX-Loop: u...@domain \ -ISubject: ${SUBJ} \ -iContent-Type: \ -iContent-Length: \ -IFrom: User's Name u...@domain \ -ITo: phonenum...@sms-messaging-address \ -IReturn-Receipt-To: \ | /path-to/qmail-inject } Procmail will take some tweaking for your environment and testing but I thought I would send this since I have done essentially the same thing ... good luck. PS I just realized I did not add the From: line but you can parse that using formail just as I did with the Subject line and add that to the outgoing message somewhere. Ok, I'll ask the apparently obvious and probably ignorant question. Why wouldn't you want to simply forward the entire message? SMS length limit perhaps? If that's the case, would SMS truncate or reject the message? I believe most SMS messages are limited to 160 characters. Before I had my Blackberry, I used to send alerts to myself somewhat like this. I sent them to my number and the carrier address, as has been detailed before (ie:4075551...@verizon.com) - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
[qmailtoaster] Re: Qmail to SMS
Try curl? Amit Dalia wrote: I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com -- -Eric 'shubes' - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
[qmailtoaster] Re: Qmail to SMS
Rob wrote: I want to generate sms for email received for certain users. Had anyone tried the same. Basically want to generate SMS with following details: 1) From Id 2) Subject Install procmail and formail (if they are not there already) and filter incoming messages to inject a new message to the users phonenum...@sms-messaging-address (available from their carrier) that just has the Subject line. An example .procmailrc in the user's directory would be: # .procmailrc # routes incoming mail to appropriate mailboxes PATH=/usr/bin:/usr/local/bin MAILDIR=/path-to/vpopmail/domains/DOMAIN/USER/Maildir DEFAULT=/path-to/vpopmail/domains/DOMAIN/USER/Maildir/new LOGFILE=/path-to/vpopmail/domains/DOMAIN/USER/procmail.log SHELL=/bin/sh VERBOSE=yes SUBJ=`/usr/bin/formail -c -xSubject:` :0 * $ ^to_u...@domain { :0 | /usr/bin/formail -X \ -AX-Loop: u...@domain \ -ISubject: ${SUBJ} \ -iContent-Type: \ -iContent-Length: \ -IFrom: User's Name u...@domain \ -ITo: phonenum...@sms-messaging-address \ -IReturn-Receipt-To: \ | /path-to/qmail-inject } Procmail will take some tweaking for your environment and testing but I thought I would send this since I have done essentially the same thing ... good luck. PS I just realized I did not add the From: line but you can parse that using formail just as I did with the Subject line and add that to the outgoing message somewhere. Ok, I'll ask the apparently obvious and probably ignorant question. Why wouldn't you want to simply forward the entire message? SMS length limit perhaps? If that's the case, would SMS truncate or reject the message? -- -Eric 'shubes' - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
Re: [qmailtoaster] Re: Qmail to SMS
On Tue, 05 Oct 2010 08:46:41 -0700, Eric Shubert e...@shubes.net wrote: Rob wrote: snip Ok, I'll ask the apparently obvious and probably ignorant question. Why wouldn't you want to simply forward the entire message? SMS length limit perhaps? If that's the case, would SMS truncate or reject the message? Agreed - sending the entire message would be a very simple solution, just not what they requested. Filtering the message with procmail would also give you some control as to what gets sent to the SMS gateway. -- Rob Ayer phone: 360-531-1823 gtalk: robayer skype: robayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
Re: [qmailtoaster] Re: Qmail to SMS
Hi Bob/Eric/Others, I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Regards, Amit At Tuesday, 05-10-2010 on 22:04 Rob wrote: On Tue, 05 Oct 2010 08:46:41 -0700, Eric Shubert wrote: Rob wrote: Ok, I'll ask the apparently obvious and probably ignorant question. Why wouldn't you want to simply forward the entire message? SMS length limit perhaps? If that's the case, would SMS truncate or reject the message? Agreed - sending the entire message would be a very simple solution, just not what they requested. Filtering the message with procmail would also give you some control as to what gets sent to the SMS gateway. -- Rob Ayer phone: 360-531-1823 gtalk: robayer skype: robayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
Re: [qmailtoaster] Re: Qmail to SMS
I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
Re: [qmailtoaster] Re: Qmail to SMS
I tried to use wget but instead of sending url with values it is just downloading pages. I think wget is use for downloading files from remote server. At Wednesday, 06-10-2010 on 6:34 Rob wrote: I got a SMS API as mentioned below: http://59.162.167.36:8085/api/MessageCompose?user=smsserverusername:smsserverpasswordsenderID=smsserversenderidreceipientno=mobilenumbermsgtxt=msgtosendreseller=mysmsproviderstate=2 Whenever I call this URL with respective details it send the sms. Now here smsserverusername, smsserverpassword, smsserversenderid mysmsprovider details will remain same for all users. Only details going to change is mobilenumber and msgtosend variable. Even we can say mobile number will be same for respective user. Now is there any way to get from id and subject from mail and pass those details into above URL while mail is getting delivered to Maildir. Grab the appropriate variables via formail (ala procmail) and execute a shell script (probably against a lookup table/file with user-to-number values) with a wget/curl in it to that URL. This seems to get more complex as the thread goes on... -- Rob Ayer - Qmailtoaster is sponsored by Vickers Consulting Group (www.vickersconsulting.com) Vickers Consulting Group offers Qmailtoaster support and installations. If you need professional help with your setup, contact them today! - Please visit qmailtoaster.com for the latest news, updates, and packages. To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com