# Compile postfix in a jail



## mrz (Sep 4, 2010)

Hi!

Some months ago i've compiled postfix from ports in a jail. There was no errors. 
Today i wanted to recompile it with TLS support, but when i wanted to install it (make reinstall), it failed at the following row:

```
Skipping /usr/local/sbin/postlock...
Skipping /usr/local/sbin/postlog...
Skipping /usr/local/sbin/postmap...
Skipping /usr/local/sbin/postmulti...
Skipping /usr/local/sbin/postsuper...
Skipping /usr/local/sbin/postdrop...
Skipping /usr/local/sbin/postqueue...
Updating /usr/sbin/sendmail...
mv: rename /tmp/junk to /usr/sbin/sendmail: Read-only file system
*** Error code 1
```

/usr/local/ is writable by the jail.
/usr/sbin is read only.

How can i solve this situation?

Thanks


----------



## anomie (Sep 4, 2010)

Clearly the install process wants to put a binary in /usr/sbin. Is it read-only intentionally (on your part)? If so, you're going to need to make it temporarily writable.


----------



## mrz (Sep 5, 2010)

My jail filesystems has two parts. A read only and a writeable. The read only is a local mounted ro nullfs (called master). All of my jails using this for the redundant things. The /usr/local is in the writeable part.

I've stopped the jail, remounted the master part as rw, started the jail, compiled and installed postfix without any errors. Stopped the jail and remounted the master part as ro. And now everything is okay.

I don't think this is a correct solution for this situation, but worked. So thanks for it.


----------



## kpa (Sep 5, 2010)

/usr/sbin/sendmail is a symbolic link to /usr/sbin/mailwrapper, why would mail/postfix installation want to do anything with it?


----------



## SirDice (Sep 6, 2010)

kpa said:
			
		

> /usr/sbin/sendmail is a symbolic link to /usr/sbin/mailwrapper, why would mail/postfix installation want to do anything with it?



Because of this option:

```
INST_BASE       "Install into /usr and /etc/postfix"                    off
```


----------



## mrz (Sep 8, 2010)

I've ran make config before the make, and i've unchecked this option (INST_BASE). This is why i not understand this thing...


----------

