curl-users
use curl imaps for mutt mailboxes
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
line.
```
.. 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 =...
http://www.mutt.org/doc/manual/#mailboxes
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
Aleks
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-02