need simple command line utility to read imap or pop3 mail unattended
Robert Heller
heller at deepsoft.com
Thu May 7 20:52:08 UTC 2020
At Thu, 7 May 2020 16:29:08 -0400 "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> On Thu, May 07, 2020 at 10:06:19PM +0200, Liam Proven wrote:
> > On Thu, 7 May 2020 at 22:02, Mike Marchywka <marchywka at hotmail.com> wrote:
> >
> > > but on a quick look I could not find out how
> > > read mail ( hotmail, yahoo, gmail, , etc)
> >
> > Do you mean webmail providers?
> >
> > Most of 'em now offer POP3 and IMAP access too. You often have to
> > manually turn it on in each account though.
> >
> > Google for the server settings, they're all out there in multiple places.
> >
> > Or have I misunderstood?
>
> I thought I said I have been using mutt and neomutt as previously
> recommended but it was not obvious they have a good way to
> read mail with a script. It looked like I had to start
> a UI. What I need is something I can easily script to read
> messages and copy them to a file or input to a bash script.
If you have a MTA on your linux box, you can use fetchmail to "fetch" the mail
from Yahoo, Gmail, Hotmail, whatever using POP3 or IMAP, and then queue it to
a local account on the local [linux] machine via the local MTA (eg Sendmail,
Postfix, etc.). *Then* in that account's $HOME directory, you can have a
Procmail Recipe file (~/.procmailrc, see 'man procmailrc' for details). I
believe most (all?) Linux MTAs can use Procmail as their local delivery agent
(and may default to Procmail). Procmail Recipes can send messages to files or
pipe them to scripts, depending on matching (regexp) headers and/or bodys.
All of this happens without any sort of UI (other than a text editor to edit
the files: .fetchmailrc and .procmailrc).
>
> There may be something like an email command processor package
> that accepts email from IMAP or POP3 already but I just
> need it to read- ideally it would use the mutt or neomutt
> config file but I can copy the info easily :)
>
> I made my own download code to backup the webmail accounts
> which I could easily modify but I'm doing all my work on
> Beaver and want this to run on 12.04 ( whatever that is called ).
> I copied over my last build and ldd laughed, copying the
> so's and setting LD_LIBRARY_PATH killed scp and ls lol.
>
>
> I might just need fetchmail or getmail or something but
> if there is a mail command package that may be nice too.
> You see this a lot now, interacting via email, not sure
> what is out there for that.
>
>
>
> >
> >
> > --
> > Liam Proven â Profile: https://about.me/liamproven
> > Email: lproven at cix.co.uk â gMail/gTalk/gHangouts: lproven at gmail.com
> > Twitter/Facebook/LinkedIn/Flickr: lproven â Skype: liamproven
> > UK: +44 7939-087884 â ÄR (+ WhatsApp/Telegram/Signal): +420 702 829 053
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
--
Robert Heller -- 978-544-6933 Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list