[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Needed: new cellcom SMS script
On Thu, 25 May 2000, Nadav Har'El wrote:
> Hmm... I wonder if it is possible to tell sendmail of a new mail transport
> mechanism, on the same level as SMTP, that uses my script or something similar
> to send messages via SMS. For example, we can have all messages to addresses
> like 052123456@il.sms or 97252123456@sms directed to this transport mechanism.
with sendmail - everything is possible. specifically, you will find that a
sendmail.cf file has a set of mailers defined, with lines such as:
#
# Shell Scripts
#
Mprog, P=/bin/sh, F=oulsDFM8, S=9, R=10, D=$z:/, T=X-Unix,
A=sh -c $u
the 'M' macro defines a mailer. as you can see, 'P' defines the program to
run, 'F' is a set of sendmail flags to be used when activating this
mailer, 'S' and 'R' define rule sts to be used to rewrite the Sender and
Receiver addresses respectively, don't rememebr what 'A' and 'T' are, and
'A' is the list of arguments to the prorgam (the first is normally the
same as the program's name, and the rest are the "real arguments").
in other rule sets, you may specify that email that should target the SMS
service should be sent using your new mailer (the name of the mailer is
the string attached to the 'M' prefix in the mailer's definition).
for more complete details - check the docs that come with sendmail's
source (they describe the various flags, etc.) or read a sendmail book
(you'll need this in order to also write the rule set that parses target
addresses and decides whether to send the letter via your SMS mailer, or
not). in general, rule sets serve as procedures, and may call each other,
or call various built-in commands (such as the command saying 'send using
this mailer..).
guy
"For world domination - press 1,
or dial 0, and please hold, for the creator." -- nob o. dy
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il