[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Remote administartion via email



Ron Johnson wrote:
On Thu, 2006-01-05 at 13:24 -0500, Marty Landman wrote:

At 12:54 PM 1/5/2006, Ron Johnson wrote:

On Thu, 2006-01-05 at 11:27 -0500, celejar wrote:

I'm looking for an application to do remote administration of my
Debian box via email. The app should read mail (presumably
authenticating via pgp / gpg keys) and execute commands contained
therein. The box connects to the internet intermittently to download
mail, but does not have a persistent connection so I can't use ssh or
webmin. I have googled but not found anything. I suppose it would be
straightforward to do this with Perl or even shell scripting, but I
don't have much experience with either, and as I assume someone has
already done this, why reinvent the wheel? In addition to my
situation, such an application would also be useful for managing a
system from clients such as cell phones or email capable pagers.

What is the mail agent on the receiving end?  A "client" like
Evo or KMail, or a process like fetchmail?  Or an MTA that spools
email, waiting for the connection?

If it's a client, I'd say you're stuck, since only stupid MS
products would execute commands in emails.

Couldn't you write something which reads /var/mail/$userid?


That's presuming the mail handler puts mail in the mail spool,
instead of POP (to be picked up by the MUA) or IMAP.

Mail is always delivered to the mail spool. The POP or IMAP daemons pick it up from there and deliver it to the MUA.

How about piping in .forward? Like:

|/usr/local/bin/mailcmd.sh

This would feed your mail into mailcmd.sh

The script is executed under the account of the mail recipient. Note that some MUAs refuse to execute scripts as root.

HTH
	Heinrich



Reply to: