[Top][All Lists]

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

Re: Get mails from remote machine via SSH

From: William Gardella
Subject: Re: Get mails from remote machine via SSH
Date: Thu, 23 Aug 2012 10:56:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

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] 
> [2] 

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 (

reply via email to

[Prev in Thread] Current Thread [Next in Thread]