Discussion:
use curl imaps for mutt mailboxes
(too old to reply)
Aleksandar Lazic
2018-06-02 00:18:22 UTC
Permalink
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.s

Loading...