curl / Mailing Lists / curl-users / Single Mail


use curl imaps for mutt mailboxes

From: Aleksandar Lazic <>
Date: Sat, 2 Jun 2018 02:18:22 +0200

Hi all.

Because I like curl and use it for a lot of solutions I just wanted to
share a small snippled which I use in mutt to create the mailboxes

.. some mutt stuff

mailboxes `curl -sSu 'USERNAME':'PASSWORD' imaps://imap.DOMAIN.COM:993|awk -F'"' 'function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } {if ( NF == 3 ) { print "="ltrim($3); next ; } else if ( NF == 5 ) print "=\""ltrim($4)"\"" ; next ; }' |tr '\015\r\n' ' ' `

As you can see I use awk to create the required line.

=INBOX =...

I know there are sooooo many differnt solutions for this but due to the
fact that curl is on almost every plattform which I use with build in
imap protocol I use it what's there ;-)?

Thanks all which have build such a great tool ;-)

Very best regards
Received on 2018-06-02