# Pine-maildir How-to

## dub

First of all, hello! everyone.... I want to put here a quick how-to of pine-maildir because if you search the forums you will see  many topics about it and none with good instructions to set it up. So, since I recently installed a mail system with postfix and pine-maildir, I'll put the steps in here...

  I hope I can make someones life easier...  :Smile: 

  First, you need postfix already installed, configured and running... And your postfix should be using the spool maildir style. I'm not going to tell you how to do this.. this is just a pine-maildir mini howto. But it isn't too much trouble... check the forum or the postfix documentation...

  Once your postfix is working...

```
#emerge pine-maildir
```

  then...

```
#pine -conf > /usr/local/lib/pine.conf
```

  In this file, pine will store its general configuration.....

  edit /usr/local/lib/pine.conf...

```
#nano /usr/local/lib/pine.conf
```

  and personalize the following options:

```

# Sets domain part of From: and local addresses in outgoing mail.

user-domain=foo.bar.com                     <-- here put yourhostname.yourdomain

# List of SMTP servers for sending mail. If blank: Unix Pine uses sendmail.

smtp-server=foo.bar.com                      <-- same as user-domain, if you don't set this, pine could hang when trying to send a mail....

# Path of (local or remote) INBOX, e.g. ={mail.somewhere.edu}inbox

# Normal Unix default is the local INBOX (usually /usr/spool/mail/$USER).

inbox-path="INBOX"{~/.maildir/new}inbox    <-- here is the trick, copy paste it....

```

save and close.. and... now as a normal user

```
$pine
```

this will create a ~/mail directory, where pine stores the saved, postponed, read and sent mails.. It will also create the ~/addressbook* files where it stores your address book...And it will be getting the new mails from ~/.maildir/new/, where postfix drops them....

Well.. that's all.. If something isn't working for you and/or you set it up different but with same results.... please.. post.......

EOF

----------

## zoner

Another solution of pine & maildir

```
#use="maildir" emerge pine
```

then edit in /etc/pine.conf (for all users on system)

and there is line:

inbox-path=

replace it or add follow 

inbox-path=#md/.maildir

or if old .pinerc are in ~/ home directory, can edit that too or delete first

----------

## kallamej

 *zoner wrote:*   

> Another solution of pine & maildir
> 
> ```
> #use="maildir" emerge pine
> ```
> ...

 

Note that this is only supported in the still ~marked pine-4.58-r3. See also this bug.

----------

## meulie

 *dub wrote:*   

> First of all, hello! everyone.... I want to put here a quick how-to of pine-maildir because if you search the forums you will see  many topics about it and none with good instructions to set it up. So, since I recently installed a mail system with postfix and pine-maildir, I'll put the steps in here...
> 
>   I hope I can make someones life easier... 
> 
>   First, you need postfix already installed, configured and running... And your postfix should be using the spool maildir style. I'm not going to tell you how to do this.. this is just a pine-maildir mini howto. But it isn't too much trouble... check the forum or the postfix documentation...
> ...

 

```
emerge search pine-maildir

Searching...   

[ Results for search key : pine-maildir ]

[ Applications found : 0 ]
```

  :Confused: 

----------

## kashani

pine-maildir was dropped a few months ago for the official support of maildir pine. The latest Pine 4.60, with maildir support, has been marked stable on x86 recently. Add maildir to your USE variables and compile pine. 

kashani

----------

## kallamej

Actually, the maildir USE flag is dropped as well as the maildir driver is included in the chappa-all patch. Furthermore, it is not officially supported by the Pine team.

----------

## cobalt027

So does this mean there is no "gentoo" way to get pine to use maildir instead of mbox?

----------

## cobalt027

Came across this on the intarwebs:

Workaround: Have pine talk to your .maildirs through courier. It involves installing and configuring courier, but hey, it works.

Full article: http://www.neverending.org/~ftobin/resources/pine-maildir/

Important stuff from my .pinerc file:

          inbox-path={localhost}INBOX

          default-fcc={localhost}INBOX.sent-mail

          default-saved-msg-folder={localhost}INBOX.saved-messages

          postponed-folder={localhost}INBOX.postponed-msgs

I highly recommend reading the full article. Good stuff in there, and its short.

----------

## kashani

 *cobalt027 wrote:*   

> So does this mean there is no "gentoo" way to get pine to use maildir instead of mbox?

 

No, it means two year old threads might be out of date.  :Smile: 

Current ebuilds of Pine use the chappa-all patch which includes .maildir/ support. I'm not sure it was ever not supported, but it defintely is today.

kashani

----------

## trossachs

Clearly it was a very long time since this original post, but still very handy.

Two things, my incoming mail folder is listed as:

```
.FIRST_NEW-MAIL
```

and so I have printed this within my .pinerc file as:

```
{localhost/novalidate-cert}.FIRST_NEW-MAIL
```

However, Pine says that it cannot find the maildir. I even tried it with this:

```
{localhost/novalidate-cert}.FIRST_NEW-MAIL/
```

but to no avail. I have checked out the URL within the post for additional information, but the site is no longer available. Any ideas as I would really like to go back to a CLI mail client; also secure with SSH too!   :Smile: 

----------

## kallamej

If you access your maildir locally, you should set "maildir-location" to wherever your maildir INBOX is located. By default it is (~/)Maildir. If you access it via an imap server, it is most likely to call the main maildir INBOX regardless of what the on disk folder is called.

----------

## trossachs

When I used to use Courier, my maildirs were listed as such:

```
.Common_Documentation
```

Now that I have changed over to Dovecot, (brilliant speed for access) the same maildir, should I choose to recreate it, would now be printed:

```
.INBOX.Common_Documentation
```

How can I get Pine to recognise both listings?

----------

## kallamej

I don't use courier style folders myself, but please take a look at Eduardo Chappa's maildir page. This is probably what you need.

----------

