[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
problems with procmail
Dear luggies
my college doesn't allow telnet logins from the internet. but i
subscribe to the list with a mailbox my college gives me. to access the
mail, i will have to come to my college computer centre. there is no modem
pool for remote access.
i got this idea of using procmail to filter out mail with a
particular subject. in the body of the mail, my dynamic IP would be there,
and procmail would extract this and send an xterm to that IP. i'd keep an
X server running at my end and would thus get a terminal screen of my
college server.
i was looking at the HOWTOs and found a mini howto on dynamic IP
hacks. in that mini howto, this exact thing was implemented. so it made my
job easy or so i thought.
#1. my .forward file in the home directory contains the following...
"|exec /usr/bin/procmail"
#2. my .procmailrc file in the home directory contains the following...
^Subject: X-Term
| cat > /home/msridhar/xipfile
| /home/msridhar/scripts/send_xterm
#3. And here's what /home/msridhar/scripts/send_xterm contains...
#!/bin/sh
XX=`cat ../xipfile | grep IP | cut -c5-`
export XX
xterm -display $XX -e login &
#4. The mail I send would have this format...
Subject: X-Term
Body:
IP: 202.144.10.138:0.0
#5. And here's what happens when i send the mail ( i telnet to port 25 and
did the stuff with verbose mode enabled )....
>>mail from: msridhar@xxxxxxxxxxxxxxxx
sender <msridhar@xxxxxxxxxxxxxxxx> ok
>>rcpt to: msridhar@xxxxxxxxxxxxxxxx
051 /home/msridhar/.forward: line 1: forwarding to |exec /usr/bin/procmail
550 /home/msridhar/.forward: line 1: |exec /usr/bin/procmail... Address
msridhar@xxxxxxxxxxxxxxxx is unsafe for mailing to programs
>>data
need RCPT to first
******
So where am i goofing up ?
regards
mani sridhar
<msridhar@xxxxxxxxxxxxxxxx>
---
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe'
in either the subject or the body to unsubscribe from this list.