# Authoritative text for Postfix on FreeBSD?



## stoomaroo (Feb 23, 2010)

I have been combing through these forums looking for a *FreeBSD* oriented Postfix installation & configuration guide.  Although the following link looks like the leading contender, http://www.purplehat.org/?page_id=4 , I am hunting around looking for something a little more authoritative.  

Looking at http://www.postfix.org/INSTALL.html , I figured I couldn't go wrong, but some of the sections seem deprecated (if you build the accounts as indicated in in step 6.2 prior to the [CMD="make"] install[/CMD] in 6.3, the install grinds to halt with errors such as "Account postfix already exists").  Some of the instructions also reference files that (I assume) need to be built manually -- but do not mention how.  I'm not sure how out( up-to?) date it is.

"Postfix" by Richard Blum (printed text) seems to be a clear and concise book, but most of the configuration is geared for a linux install, and this appears to have different directory structures and configuration settings (not to mention the various warnings I have seen in this forum).

Is there a "King of all Media" that exists for Postfix on FreeBSD?  I don't mind reading larger/heavier texts, and as I already work in email for a living, and my proxies/firewalls/DNS are already all set -- the basics of email 101 (201, 301...etc) are already pretty sound.

If the Postfix docs don't exist, the Handbook has direct references to sendmail configs & architecture.  Would this be a better starting point?

-stoomaroo


----------



## DutchDaemon (Feb 23, 2010)

Are you familiar with the ports(7) system and with mail/postfix?


----------



## stoomaroo (Feb 24, 2010)

*Ports 'n Postfix*

In terms of "what does familiarity constitute", I am able to determine the port(s) required to build Postfix, identify the dependencies, ensure the port tree is up-to-date and [CMD="make"]install clean[/CMD] all of the above. (Well, in fact, honestly the [CMD="make"]install clean[/CMD] takes care of it all for me.)

All dependencies are compiled correctly, and installed. I get the feeling that finding the software and getting the code compiled is coming along ok.  Where I get killed is in the configuration.

Using the man pages and the resources I mentioned above, I am able to partially configure the postfix system.  My problem occurs once I run into an error (example: I need to build the aliases.db using [CMD=""]/usr/bin/newaliases[/CMD] but this is an "unknown command" -- i.e. looking in /usr/bin/ gives nothing).  I can check its man page [CMD="man"]newaliases[/CMD] only it doesn't tell me where it is located.  I *assumed* it was a port that I could also install-- but sadly I cannot find it.

+++

So in the end...perhaps I have answered my own question.


----------



## stoomaroo (Feb 24, 2010)

*Fixed one thing...*

That's [CMD="cd"]/usr/bin[/CMD] then [CMD="newaliases"] [/CMD].

All in one statement failed.

-stoomaroo


----------



## stoomaroo (Feb 24, 2010)

*...and then perhaps I'll learn the "Preview Post" button first.*



> That's cd /usr/bin then .



...i meant:  That's [CMD="cd"]/usr/bin[/CMD] then : [CMD=""]newaliases[/CMD]


----------



## J65nko (Feb 24, 2010)

You never tried the following?

```
# newaliases
```
Or if you really want to know where it is

```
$ which newaliases
```

After installing the postfix port it will ask whether you want it to adjust the mailer.conf(5) for you. If you answer yes, postfix will have been installed correctly. Only thing left is the configuration files.

With the nice docs at http://www.postfix.org/documentation.html the configuration should not be too big of a problem


----------



## phoenix (Feb 24, 2010)

Note also that postfix uses *postalias* for rebuilding the aliases.db.  This is the canonical way to build the postfix aliases file.

However, postfix also includes sendmail compatible tools.  For example, */usr/bin/newaliases* is just a link to */usr/sbin/mailwrapper*, which is configured via */etc/mail/mailer.conf*.  If you have configured mailer.conf correctly, running "newaliases" with actually run /usr/local/sbin/sendmail in "newalises" mode.

Any Postfix book will cover everything you need to know about Postfix.  The only "change" you have to make is to remember that everything is stored under /usr/local instead of /.


----------



## stoomaroo (Feb 24, 2010)

*It clicked, late and finally...*

@J65nko :

I discovered the [CMD="locate"]newaliases[/CMD] command (the [CMD="which"]newaliases[/CMD] non-path counterpart?).  The only problem was that I followed some documentation indicating to run [CMD=""]/usr/bin/newaliases[/CMD] but since I'm a BSD noob, I followed it to the letter, and I didn't realize that commands sitting in my path can be executed pretty much anywhere...and that I don't need to type the explicit path.

@phoenix :



> The only "change" you have to make is to remember that everything is stored under /usr/local instead of /.



...as soon as I figured that out, late last night, everything else fell into place.  Postfix was being properly built on my system (and I am now able to send mail to the world - RFC-compliant, of course) .  The other resources I referenced earlier now make perfect sense.

The rest of the reading should take me from here.

Many thanks again.

-stoomaroo


----------

