I am no expert at either perl or formail (and a procmail newbie). This is
the log for a mail i sent. Something went wrong. Can anyone help me? (The
script is below the log)
procmail: Notified comsat:
"tindlund(_at_)266496:/home/homee/ti/tindlund/mail/Procmail"
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?).*tindlund|^Return-Path:
<phace|$
procmail: Executing "date,+%y"
procmail: Assigning "LASTFOLDER=01"
procmail: Opening "01"
procmail: Assigning "LASTFOLDER= cat - >body.tmp"
procmail: Assigning "LASTFOLDER= (formail -r -iFrom: -iSubject: ; cat
body.tmp) | \
perl -aF// -ne 'while ($c = shift @F) { exit if
++$i > 160; "
procmail: Assigning "print"
procmail: Skipped "$c; }' | \"
procmail: Skipped "$SENDMAIL -oi xx(_at_)xx(_dot_)xx(_dot_)xx"
procmail: Executing " cat - >body.tmp"
(...)
procmail: Locking "/home/homee/ti/tindlund/mail/INBOX.lock"
procmail: Executing " (formail -r -iFrom: -iSubject: ; cat body.tmp) | \
perl -aF// -ne 'while ($c = shift @F) { exit if
++$i > 160; "
/bin/bash: -c: line 2: unexpected EOF while looking for matching `''
/bin/bash: -c: line 3: syntax error: unexpected end of file
procmail: Assigning "LASTFOLDER=/home/homee/ti/tindlund/mail/INBOX"
procmail: Assigning "LASTFOLDER=/home/homee/ti/tindlund/mail/INBOX"
On Tue, 6 Feb 2001, Matt Dunford wrote:
Hmmm, this is a toughy. Perhaps this can get you started.
(very, very untested).
:0:
* ^TO_whoever
{
# save the body to temp file
:0bc
| cat - >body.tmp
# drop all headers but From and Subject
# and pipe them and the body through perl character counter script
:0h
| (formail -r -iFrom: -iSubject: ; cat body.tmp) | \
perl -aF// -ne 'while ($c = shift @F) { exit if ++$i > 160;
print $c; }' | \
$SENDMAIL -oi phone(_at_)email(_dot_)com
}
On Tue, 6 Feb 2001, Andreas Tindlund wrote:
I have asked this question before, but I never got a descent solution to
it.
This is what I want:
:0:
* Criteria
[Cut the mail's body so that the (FROM-field + SUBJECT-field +
BODY-beginning) equals 160 characters.]
! email(_at_)domain #forward this email to email(_at_)domain
I want do to this because my GSM-service provider allows me to send
SMS to my GSM phone through en e-mail address email(_at_)domain(_dot_) => i
want to
forward some of my incoming mail to my mobile phone...
Do you have a solution how this can be done? Please post it!
_______________________________________________________________
Andreas Tindlund mob: 930 12 247 / fg: 738 99 645
_______________________________________________________________
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail