# Check Mail remotely using SSH and X11



## applemaz (Nov 28, 2005)

All I want to do is get my mail securely while surfing the web at a public wifi access point.  However, I am not allowed to set up a ssh tunnel to my ISP and get my mail securely.

I can ssh to my Desktop G5 using my iBook, but when I "open Mail.app" the app opens on my remote G5 desktop only and I cannot see the results on my iBook.  Is there some way to check my mail using Terminal after I ssh from my iBook to the remote G5?

If this is not possible, is there any way to use X11 to run Apple's Mail.app on the remote G5 and see the screen on my iBook?  I believe this isn't possible, because X11 apps can only be run in this way and Mail isn't an X11 app.

If this is also not possible, am I looking at using VNC as my only option?  If so, could someone post instructions here or point me to a URL with explicit information to do whichever of these options is most practical?


----------



## spb (Nov 29, 2005)

I'd suggest fetchmail and mutt.  fetchmail will pull the messages off of your server and mutt is a nice text based e-mail reader.  The mailbox format used by mutt can be easily imported to mail.app so when you return home you can import the messages you read and sent to your mail archive.


----------



## applemaz (Nov 29, 2005)

I would prefer leaving the messages on the mail server so when I get home I can open Apple Mail and get the messages I already read as well as any new ones.  Does fetchmail have an option to leave them on the mail server?

  What about this suggestion.  I install Pine on my G5 at home, run ssh in the Terminal on my iBook and connect to the G5 using my iBook, execute Pine on the G5 then I should see my mail messages on the iBook screen in Terminal.  Wouldn't that work?


----------



## spb (Nov 29, 2005)

You can use the -keep option with fetchmail to keep the mail on the remote server. 

Unfortunatly, this still means that your sent-mail will have to be imported (unless you include yourself with CC).  As I wrote above, this is a relatively simple task, if you use mutt or another text based system that uses mbox format.  You only need to open mail.app and use  File --> Import Mailboxes.  I don't know if pine uses mbox format, or if you can import files from pine.

I've should warn you though that I've not tried importing mail under 10.4.X.  I know that there was a major change in the mail.app moving to Tiger.


----------



## applemaz (Nov 29, 2005)

Here is what I ended up doing.  On my G5, I installed Xcode Tools version 2.2 then did a make and install of Pine for OSX.  After setting up Pine to send and receive mail, now I can just ssh to my G5 computer at home using my iBook while on the road and when I start Pine, I can check mail and send it too.


----------

