procmail
[Top] [All Lists]

email to primeco phones <again>

1999-06-25 13:13:23
Since I have little knowledge of formail (well, I have little knowledge of
procmail, but less of for mail), I am again asking the list for help on
this problem.  I have more info on the problem this time and a more
refined request.

Primeco is kind picky about the mail that is sent on to the PCS phone.
All headers except for those necessary to send it on must be stripped.
Also only the _subject_ is received on the phone.  The body and all other
info is _not_ passed onto the phone.

What I want is this:

1. One message sent out with the headers stripped, the subject included
and labeled Subject:, the sender included labeled From:. and placed in the
subject and sent onto the phone.
2. A second message sent out with the body only put into the subject line
and sent onto the phone.


====

This is my current .procmailrc for sending mail to primeco's servers...

 Pager Stuff

# Strip headers and send to pager. If pager is in subject, do not do it.
# This is for every email message since there are no conditions.

:0 c
  | formail -k -X "From:" -X "Subject:" \
  -I "To: 2172011495(_at_)primeco(_dot_)textmsg(_dot_)com" -X "To:" \
  | $SENDMAIL $SENDMAILFLAGS 2172011495(_at_)primeco(_dot_)textmsg(_dot_)com

# this sends out the body of the message

:0 c
{
 :0 # find what we need and change NL's to spaces
 SENDERANDBODY=|formail -kzxFrom: | tr -s \\12\\15 \\40\\40

 :0hfw
 | formail -i"Subject: $SENDERANDBODY"

 :0h
 | formail -k -X "From:" -X "Subject:" \
  -I "To: 2172011495(_at_)primeco(_dot_)textmsg(_dot_)com" -X "To:" \
   | $SENDMAIL $SENDMAILFLAGS 2172011495(_at_)primeco(_dot_)textmsg(_dot_)com
}