From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/15742 Path: news.gmane.org!not-for-mail From: William Gardella Newsgroups: gmane.emacs.gnus.user Subject: Re: Get mails from remote machine via SSH Date: Thu, 23 Aug 2012 10:56:11 -0400 Message-ID: <878vd5fyic.fsf@gmail.com> References: <39716dc5-71b7-46d0-9ee3-9aff6a80f018@r4g2000vbn.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345733936 8139 80.91.229.3 (23 Aug 2012 14:58:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2012 14:58:56 +0000 (UTC) To: info-gnus-english-mXXj517/zsQ@public.gmane.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Aug 23 16:58:50 2012 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T4Yrx-0004tI-Sr for gegu-info-gnus-english@m.gmane.org; Thu, 23 Aug 2012 16:58:50 +0200 Original-Received: from localhost ([::1]:53631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Yrw-0002km-CB for gegu-info-gnus-english@m.gmane.org; Thu, 23 Aug 2012 10:58:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Yrn-0002iC-Kj for info-gnus-english-mXXj517/zsQ@public.gmane.org; Thu, 23 Aug 2012 10:58:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4Yrm-0003Om-7b for info-gnus-english-mXXj517/zsQ@public.gmane.org; Thu, 23 Aug 2012 10:58:39 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Yrm-0003OX-0o for info-gnus-english-mXXj517/zsQ@public.gmane.org; Thu, 23 Aug 2012 10:58:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T4Yrh-0004Yr-78 for info-gnus-english-mXXj517/zsQ@public.gmane.org; Thu, 23 Aug 2012 16:58:33 +0200 Original-Received: from 76-204-120-197.lightspeed.wlfrct.sbcglobal.net ([76.204.120.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Aug 2012 16:58:33 +0200 Original-Received: from gardellawg by 76-204-120-197.lightspeed.wlfrct.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Aug 2012 16:58:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: 76-204-120-197.lightspeed.wlfrct.sbcglobal.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-Archive: encrypt Cancel-Lock: sha1:RnaD2of34iUWxFy/8oxhCx0+I88= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.gnus.user:15742 Archived-At: Hello again! "." writes: > Hello, > > My server-side setup can be found here [1]. > > I'd like to read/write mail from another machine (it doesn't have a > public ip). I'd also like to store it there. > > I found this guide [2] (SSH / getmail part). I tried to use it but it > didn't work out. > Could you help me? (I'm not familiar with sh.) > > How to automatically delete all mails from the server after the > mentioned SSH-sync? > > [1] https://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/013fd87d1f1238ac > [2] http://www.gnu.org/software/emacs/manual/html_node/gnus/Mail-Source-Specifiers.html#Mail-Source-Specifiers I see that you are already using a Maildir setup on your server, so perhaps a simpler option than this rather involved getmail/movemail stuff would simply be to sync the Maildirs from one system to the other, using rsync or scp. If you intend Gnus to be your MUA on the client machine, you even have the option of setting up a maildir source using a remote TRAMP-style filename as the target, e.g. `/ssh:user@host:Maildir'. However, syncing the Maildirs in the background, outside of Gnus, will probably yield better performance. If your client has public-key authentication without a passphrase to the server, you can set up the maildir-syncing script as a cron job. The script could also include some command to clear out the server-side Maildir, but personally I think that is a bad idea unless there is some special reason for it. For sending, you could use a relay-only MTA such as msmtp, nullmailer, etc. on the client machine, and set up an SSH tunnel to the server's mail submission port, thus avoiding the security/authentication problems of SMTP. Since you already have an Emacs going on your server, I should also note the easy, lazy, no-hassle option: use the emacsclient functionality. With the Emacs server features enabled--by evaluating (server-start) or starting Emacs with `emacs --daemon'--you can easily access your server's Emacs instance from anywhere over SSH. Try `ssh -t emacsclient -c' to get a TTY emacsclient frame on your client box, or `ssh -Xt emacsclient -c' to get a GUI emacsclient frame via SSH X forwarding. If you have an always-on server at your disposal, this is a perfectly sane and pleasant way to use Emacs programs that you want to persist on the network for a long period of time, such as mailclients or IRC clients. -- I use grml (http://grml.org/)