procmail
[Top] [All Lists]

Re: procmail and ssh

2001-07-23 09:24:59


At 14:54 2001-07-23 +0200, Jappe Reuling wrote:

I want to start a ppp connection on a remote machine when
a mail arrives.

> FIRST, what does your VERBOSE logfile say about the recipe?

procmail: Match on 
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)testpaniek"
procmail: Executing "/usr/freeware/bin/ssh -T root(_at_)[remote machine] 
/usr/sbin/ppp -foreground alarm"
procmail: [323036] Mon Jul 23 16:14:10 2001
procmail: Program failure (255) of "/usr/freeware/bin/ssh -T root(_at_)[remote 
machine] /usr/sbin/ppp -foreground alarm"
procmail: Assigning "LASTFOLDER=/usr/freeware/bin/ssh -T root(_at_)[remote machine] 
/usr/sbin/ppp -foreground alarm"

I've removed the actual hostname from the above log for paranoid reasons.

What does an error 255 mean?

[...]


The users which runs procmail has an empty passphrase

Ooh, that's disturbing.
I don't see why, the connection is only allowed from the IRIX
machine, not pty, X11 forwarding or agent forwarding is allowed
and the only command which is allowed to execute is the start
of that specific ppp connection. The only 'bad' thing that could
happen is that someone manges to hack into my SGI server and
starts the ppp connection.


But when I let procmail execute the command the ssh connection
is made but it seems that there isn't enought time to execute ppp
corectly because the modem blinks and the connection ends.

Your order of events cannot be correct - the ssh connection can't be
established if the ppp connection wasn't complete.

Hmmm the above sentence is kinda messed up (sorry), let me rephrase:

'But when I let procmail execute the command over the ssh connection,
the connection itself is made but it seems that there isn't enought time
to execute ppp corectly because the modem blinks and the connection
ends.'

I thought the 'w' option ensured that the external program is finished
before continuing?
>

It should.  What do you figure ssh is doing with the input it's receiving
on stdin?  perhaps it starts to process it, and says WTF?! and terminates.

Isn't the '-T' in the ssh command preventing this? If there is no pty
then ssh shouldn't be expecting input should it? Anyway i've tried the
'-n' options which prevents reading from stdin and that wasn't the
sollution.


You probably want an i flag on the recipe too.

I have already tried the 'i' flag and the 'W' but that doesn't make a
diff.

The whole problem is that ppp gets started but not more than a sec or
a sec or two (the lights on my modem even blink for like half a sec) and
thats it, nothing after that.



--
Jappe Reuling
jappe(_at_)parcproductions(_dot_)com

Parc Productions
Waalsteeg 4-6
1011 ER Amsterdam

Tel:    +31 (0)20-4892455
Fax:    +31 (0)20-4892458
Http:    http://www.parcproductions.com

The information in this document can be confidential. It is intended
only for the use of the recipient of this mail. If you are not the
intended recipient, please notify us and delete this document. Do not
disclose the contents of this document to any other person. Do not
take any copies. Violation of this notice may be unlawful.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>