Re: launchd agent for securing mail through ssh tunnel
Re: launchd agent for securing mail through ssh tunnel
- Subject: Re: launchd agent for securing mail through ssh tunnel
- From: "James Peach" <email@hidden>
- Date: Wed, 18 Apr 2007 08:34:24 -0700
On 18/04/07, Nicola Vitacolonna <email@hidden> wrote:
On 13/apr/07, at 22:01, James Peach wrote:
> On 13/04/07, Nicola Vitacolonna <email@hidden> wrote:
>> Hi,
>> I use to read email through an ssh tunnel and I want to turn the task
>> into an on-demand launchd user agent. So far, I have come out with
>> the following, "nearly working", solution:
>> <snip>
>> I have a couple of problems, though:
>
> Ar you sure that ssh isn't prompting?
Yes, pretty sure. I have tried from the Terminal.
>
> Remove the RunAtLoad key?
It should not make any difference: RunAtLoad is false by default.
> I use this with Mail.app, and it works just fine:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
> "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
> <key>Label</key>
> <string>my.mail.service</string>
> <key>Program</key>
> <string>/usr/bin/ssh</string>
> <key>ProgramArguments</key>
> <array>
> <string>/usr/bin/ssh</string>
> <string>-L</string>
> <string>9025:mailserver:25</string>
> <string>jpeach@mailserver</string>
> <string>imapd</string>
Have you set up a passwordless account?
yes
Why are you executing imapd?
I tunnel mail through ssh directly to imapd on the remote system where
I have a shell account. the remote system only allows ssh access.
> </array>
> <key>inetdCompatibility</key>
> <dict>
> <key>Wait</key>
> <false/>
> </dict>
> <key>Sockets</key>
> <dict>
> <key>Listeners</key>
> <dict>
> <key>SockNodeName</key>
> <string>localhost</string>
> <key>SockServiceName</key>
> <integer>9220</integer>
This is not the same port as the tunnel's port (9025).
9025 is for outgoing mail (smtp) , 9220 is for incoming mail (imap).
This connects my local port 9220 directly to imapd's stdin via ssh.
> <key>SockType</key>
> <string>stream</string>
> <key>SockFamily</key>
> <string>IPv4</string>
> </dict>
> </dict>
> <key>Debug</key>
> <true/>
Your solution does not seem correct.
and yet it works :)
--
James Peach | email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden