Difference between revisions of "Postfix"

From CBLFS
Jump to navigationJump to search
(New page: {| style="text-align: left; background-color: AliceBlue;" |- !Download Source: | http://gd.tuwien.ac.at/infosys/servers/isc/dhcp/dhcp-{{Dhcp-Version}}.tar.gz |} {| style="text-align: left;...)
 
m (update download URL)
 
(15 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| http://gd.tuwien.ac.at/infosys/servers/isc/dhcp/dhcp-{{Dhcp-Version}}.tar.gz
+
| ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-{{Postfix-Version}}.tar.gz
|}
 
{| style="text-align: left; background-color: AliceBlue;"
 
|-
 
!Download Patch:
 
| http://svn.cross-lfs.org/svn/repos/patches/dhcp/dhcp-{{Dhcp-Version}}-iproute2-1.patch
 
 
|}
 
|}
  
 
----
 
----
  
== Introduction to DHCP ==
+
{{Package-Introduction|The Postfix package contains a Mail Transport Agent.|http://www.postfix.org/}}
  
The DHCP package contains both the client and server programs for DHCP. '''dhclient''' (the client) is useful for connecting your computer to a network which uses DHCP to assign network addresses. '''dhcpd''' (the server) is useful for assigning network addresses on your private network.
+
== Dependencies ==
  
== Dependencies ==
+
=== Optional ===
  
=== Required (If not using the iproute2 patch) ===
+
* [[Pcre]]
* [[NetTools]]
+
* [[MySQL]]
 +
* [[PostgreSQL]]
 +
* [[OpenLDAP]]
 +
* [[OpenSSL]]
 +
* [[CyrusSASL]]
 +
* [[cdb]] or [[TinyCDB]]
  
 +
== Creating the Postfix User & Group ==
  
== User Add ==
+
  groupadd -g 33 postfix &&
  groupadd -g 32 postfix &&
+
  groupadd -g 34 postdrop &&
  groupadd -g 33 postdrop &&
 
 
  useradd -c "Postfix Daemon User" -d /dev/null -g postfix \
 
  useradd -c "Postfix Daemon User" -d /dev/null -g postfix \
  -s /bin/false -u 32 postfix &&
+
  -s /bin/false -u 33 postfix &&
 
  chown -v postfix:postfix /var/mail
 
  chown -v postfix:postfix /var/mail
  
 
== Non-Multilib ==
 
== Non-Multilib ==
  
Compile the package:
+
{{Postfix-Configuration}}
  
make makefiles \
+
Create the Makefiles and compile the package:
CCARGS='-DDEF_DAEMON_DIR=\"/usr/lib/postfix\" \
 
-DDEF_MANPAGE_DIR=\"/usr/share/man\" \
 
-DDEF_HTML_DIR=\"/usr/share/doc/postfix-2.3.3/html\" \
 
-DDEF_README_DIR=\"/usr/share/doc/postfix-2.3.3/README\"
 
<additional args>' \
 
<AUXLIBS='additional args'> '
 
  
TLS Authentication
+
  make makefiles CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" &&
+
  make
  CCARGS='-DUSE_TLS -I/usr/include/openssl'
 
  AUXLIBS='-L/usr/lib -lssl -lcrypto'
 
  
To use TLS you will also need Cyrus SASL-2.1.21.
+
Install the package
  
Cyrus-SASL
+
  sh postfix-install -non-interactive
   
 
CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
 
AUXLIBS='-L/usr/lib -lsasl2'
 
  
OpenLDAP
+
== Multilib ==
 
CCARGS='-I/usr/include -DHAS_LDAP'
 
AUXLIBS='-L/usr/lib -lldap -llber'
 
  
MySQL
+
=== 64Bit ===
 
 
CCARGS='-DHAS_MYSQL -I/usr/include/mysql'
 
AUXLIBS='-L/usr/lib -lmysqlclient -lz -lm'
 
  
PostgreSQL
+
{{Postfix-Configuration|libdir=lib64}}
  
CCARGS='-DHAS_PGSQL -I/usr/include/postgresql'
+
Create the Makefiles and compile the package:
AUXLIBS='-L/usr/lib -lpq -lz -lm'
 
  
TinyCDB
+
  make makefiles CCARGS="-m64 ${CCARGS}" AUXLIBS="${AUXLIBS}" &&
 
+
  make
  CCARGS='-DHAS_CDB'
 
  AUXLIBS='</path/to/CDB>/libcdb.a'
 
  
 
Install the package
 
Install the package
Line 77: Line 57:
 
  sh postfix-install -non-interactive
 
  sh postfix-install -non-interactive
  
== Multilib ==
+
== Configuration ==
 
 
=== 32Bit ===
 
 
 
 
 
 
 
=== N32 ===
 
 
 
 
 
=== 64Bit ===
 
  
 +
=== Bootscript ===
  
=== BootScript ===
+
Install the init script included in the [[Bootscripts]] package.
  
Install the init script included in the [[blfs-bootscripts]] package.
+
make install-postfix
  
make install-dhcp
+
[[Category:Non-GUI Clients]]

Latest revision as of 03:12, 28 April 2010

Download Source: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.5.10.tar.gz

Introduction to Postfix

The Postfix package contains a Mail Transport Agent.

Project Homepage: http://www.postfix.org/

Dependencies

Optional

Creating the Postfix User & Group

groupadd -g 33 postfix &&
groupadd -g 34 postdrop &&
useradd -c "Postfix Daemon User" -d /dev/null -g postfix \
-s /bin/false -u 33 postfix &&
chown -v postfix:postfix /var/mail

Non-Multilib

To build postfix we need to build the makefiles. Use the following commands to create the appropriate CCARGS and AUXLIBS variables:

export CCARGS="-DDEF_DAEMON_DIR=\\\"/usr/lib/postfix\\\" \
-DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\" \
-DDEF_HTML_DIR=\\\"/usr/share/doc/postfix-2.5.10/html\\\" \
-DDEF_README_DIR=\\\"/usr/share/doc/postfix-2.5.10/README\\\""
export AUXLIBS=""

PCRE Support:

export CCARGS="${CCARGS} -DHAS_PCRE -I/usr/include"
export AUXLIBS="${AUXLIBS} -L/usr/lib -lpcre"

TLS Authentication

export CCARGS="${CCARGS} -DUSE_TLS -I/usr/include/openssl"
export AUXLIBS="${AUXLIBS} -L/usr/lib -lssl -lcrypto"

To use TLS you will also need CyrusSASL

Cyrus-SASL

export CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
export AUXLIBS="${AUXLIBS} -L/usr/lib -lsasl2"

OpenLDAP

export CCARGS="${CCARGS} -I/usr/include -DHAS_LDAP"
export AUXLIBS="${AUXLIBS} -L/usr/lib -lldap -llber"

MySQL

export CCARGS="${CCARGS} -DHAS_MYSQL -I/usr/include/mysql"
export AUXLIBS="${AUXLIBS} -L/usr/lib -lmysqlclient -lz -lm"

PostgreSQL

export CCARGS="${CCARGS} -DHAS_PGSQL -I/usr/include/postgresql"
export AUXLIBS="${AUXLIBS} -L/usr/lib -lpq -lz -lm"

TinyCDB

export CCARGS="${CCARGS} -DHAS_CDB"
export AUXLIBS="${AUXLIBS} </path/to/CDB>/libcdb.a"

Create the Makefiles and compile the package:

make makefiles CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" &&
make

Install the package

sh postfix-install -non-interactive

Multilib

64Bit

To build postfix we need to build the makefiles. Use the following commands to create the appropriate CCARGS and AUXLIBS variables:

export CCARGS="-DDEF_DAEMON_DIR=\\\"/usr/lib64/postfix\\\" \
-DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\" \
-DDEF_HTML_DIR=\\\"/usr/share/doc/postfix-2.5.10/html\\\" \
-DDEF_README_DIR=\\\"/usr/share/doc/postfix-2.5.10/README\\\""
export AUXLIBS=""

PCRE Support:

export CCARGS="${CCARGS} -DHAS_PCRE -I/usr/include"
export AUXLIBS="${AUXLIBS} -L/usr/lib64 -lpcre"

TLS Authentication

export CCARGS="${CCARGS} -DUSE_TLS -I/usr/include/openssl"
export AUXLIBS="${AUXLIBS} -L/usr/lib64 -lssl -lcrypto"

To use TLS you will also need CyrusSASL

Cyrus-SASL

export CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
export AUXLIBS="${AUXLIBS} -L/usr/lib64 -lsasl2"

OpenLDAP

export CCARGS="${CCARGS} -I/usr/include -DHAS_LDAP"
export AUXLIBS="${AUXLIBS} -L/usr/lib64 -lldap -llber"

MySQL

export CCARGS="${CCARGS} -DHAS_MYSQL -I/usr/include/mysql"
export AUXLIBS="${AUXLIBS} -L/usr/lib64 -lmysqlclient -lz -lm"

PostgreSQL

export CCARGS="${CCARGS} -DHAS_PGSQL -I/usr/include/postgresql"
export AUXLIBS="${AUXLIBS} -L/usr/lib64 -lpq -lz -lm"

TinyCDB

export CCARGS="${CCARGS} -DHAS_CDB"
export AUXLIBS="${AUXLIBS} </path/to/CDB>/libcdb.a"

Create the Makefiles and compile the package:

make makefiles CCARGS="-m64 ${CCARGS}" AUXLIBS="${AUXLIBS}" &&
make

Install the package

sh postfix-install -non-interactive

Configuration

Bootscript

Install the init script included in the Bootscripts package.

make install-postfix
Retrieved from "?title=Postfix&oldid=20139"