need simple command line utility to read imap or pop3 mail unattended

Mike Marchywka marchywka at hotmail.com
Fri May 8 00:28:57 UTC 2020


I got fetchmail to work but if I get it from the 12.04 repo it was built circa 2011 and needs
new ssl libs ( why I finally gave up on this lol ). I was able to build from source pointing to
newer ssl lib and it seems to work well. I just wrote a dummy mda ( cat - ) to echo the
input and this seems to be what I need.  With heavy use of LD_LIBRARY_PATH this
got the one message from a specific yahoo folder in the .fetchmailrc file, 

./fm/fetchmail-6.4.4/fetchmail  --ssl --sslproto TLS1 --nosslcertck --all   --keep

But I'll have to see options for running it every few minutes now... Ideally 
I can get yahoo to put specific incoming mail into this folder instead of
inbox.


note new address
 Mike Marchywka 306 Charles Cox Drive Canton, GA 30115
 2295 Collinworth  Drive Marietta GA 30062.  formerly 487 Salem Woods Drive Marietta GA 30067 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency


________________________________________
From: ubuntu-users <ubuntu-users-bounces at lists.ubuntu.com> on behalf of Robert Heller <heller at deepsoft.com>
Sent: Thursday, May 7, 2020 4:52 PM
To: Ubuntu user technical support, not for general discussions
Cc: Ubuntu user technical support, not for general discussions; Robert Heller
Subject: Re: need simple command line utility to read imap or pop3 mail unattended

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