The Running Daemon  The Running Daemon
 Configuration

 

 How to partition?

You have the choice between two different ways of partitioning: The so-called "dangerous dedicated" mode and the "normal" mode.

The "dangerous dedicated" mode has its name because you dedicate a whole hard disk to FreeBSD. This makes partitioning very easy, because its done in the "Unix way" and you don't have to fight against the obnoxious way of the DOS-partitioning (primary, extended partions and logical drives). Its only "dangerous" because some DOS or Windows tools might not recognize that such a hard disk contains data. If you use your PC only with FreeBSD the "dangerous dedicated" mode is the way to go.

The normal mode will be used, if you don't have a complete hard disk to spare for FreeBSD. Than you have to put your FreeBSD partitions into a primary DOS partition. Now you have the strange situation that you have partitions (of FreeBSD) in a DOS-partition. To avoid confusion they were given different names slices and partitions. Which always confuses me because I can't remember which is which.

 

 Which filesystems do I need?

You should create the following filesystems:

Mountpoint Type Recommended size Comment
/ ufs at least 32M The root filesystem. Here will be everything you need for a basic UNiX system.
/usr ufs Huge The usr filesystem. Will contain all software you install on the machine
/var ufs 64M - Huge The var filesystem. Here will be everything what is logged, spooled. Depending for what you use your FreeBSD box into this filesystem will be written a lot (for example a news server).
none swap 128M or 2 - 2.5 times your RAM, whichever is greater The swap filesystem. Size should be at least 128M. Is needed for swapping.


I strongly recommend to create the following additional filesystems:
Mountpoint Type Recommended size Comment
/home ufs 32M - huge Here will be the home directories of your users. If you have a lot of users or plan to program a lot make your home filesystem big enough.
/tmp ufs 128M The temporary filesystem. Create one, because if /tmp is a directory in your root filesystem, some temporary written stuff may fill it up. Space needed depends on what you are doing, but 128M should give you a stable system.

If you do not create these additional filesystems they will reside in the root filesystem. This will lead to additional risks:

- Normally the root file system is will not change much. You could describe it as read-only filesystem.
- You might fill it up accidentally. Which could give you some headaches. (Try for example to use vi when / and /var are full.)

 

 Configuring fetchmail

If you have a dialup-connection to the internet the eMail sent to you is remote on a computer of your provider. To retrieve this remote mail you need a program which fetches the email from your provider's computer. There are various programs for collecting eMail using POP or IMAP and forwarding via port 25 to the local SMTP listener (here sendmail), enabling all the normal forwarding/filtering/aliasing mechanisms that would apply to local mail or mail arriving via a full-time TCP/IP connection.

I recommend fetchmail by E. Raymond for that purpose.

Installing and configuring fetchmail
  • Since fetchmail is updated regularly install it by using a port.
  • Generate a .fetchmailrc file in your home directory containing
    poll provider.com with proto POP3
       user "sam_miller" there with password "your_password" is sam here options fetchall
  • Now you can test your installation (if you are connected via ppp) by calling:
    fetchmail -v
    (-v for verbose)
  • If it works put a line like:
    !bg su sam -c fetchmail
    after the label for your provider in /etc/ppp/ppp.conf. This will trigger fetchmail after having been connected to your provider.
 Configuring sendmail

Suppose you have the username "sam" on your system. Suppose further you got the email address "sam_miller@provider.com" from your internet provider.

Now you want to masqerade your local name so that somebody receiving email by you will see your email address at your provider.

  • Create a file named mailadr.txt
  • Put in the file the following lines:
    sam:mailname sam_miller@provider.com
    sam_miller@provider.com:maildrop sam
  • Execute the following command:
    makemap btree /etc/mailadr.db < mailadr.txt
  • Search for the following line in sendmail.cf:
    # list of locations of user database file (null means no lookup)
  • Change the next line to:
    O UserDatabaseSpec=/etc/mailadr.db
  • Send a kill -1 to the sendmail daemon.