Difference between revisions of "Postfix How-To"

From Secure Computing Wiki
Jump to: navigation, search
Line 20: Line 20:
 
<pre># cd /usr/ports/mail/postfix
 
<pre># cd /usr/ports/mail/postfix
 
# make install clean</pre>
 
# make install clean</pre>
<li>When asked for options, select PCRE, DOVECOT, TLS, BDB, MYSQL, and VDA
+
<li>When asked for options, select PCRE, DOVECOT, TLS, BDB, MYSQL, and VDA.
 +
<li>You will be asked if you want to activate postfix in /etc/mail/mailer.conf - select yes.
 +
<pre>Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y</pre>
 +
<li>Add the following lines to /etc/rc.conf:
 +
<pre>sendmail_enable="NO"
 +
sendmail_submit_enable="NO"
 +
sendmail_outbound_enable="NO"
 +
sendmail_msp_queue_enable="NO"</pre>
 +
<li>Add the following lines to /etc/periodic.conf:
 +
<pre>daily_clean_hoststat_enable="NO"
 +
daily_status_mail_rejects_enable="NO"
 +
daily_status_include_submit_mailq="NO"
 +
daily_submit_queuerun="NO"</pre>
 +
 
 +
</ol>
 +
==== Initialize the Database ====
 +
<ol><li>Download the SQL file
 +
<pre># fetch http://www.purplehat.org/downloads/postfix_guide/postfix-db.sql</pre>
 +
</ol>

Revision as of 13:09, 24 April 2007

  • Loosly follows the How-To at www.purplehat.org.

Install MySQL

  1. Install MySQL 5.0 Port:
    #cd /usr/ports/databases/mysql50-server
    #make all install clean
  2. Add MySQL to system startup in /etc/rc.conf:
    #echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf
  3. Start MySQL
    #/usr/local/etc/rc.d/mysql-server start
  4. Secure MySQL root account:
    #mysql -u root mysql
    >UPDATE user SET Password=PASSWORD(’mysql_root_password‘) WHERE user=’root’;
    >FLUSH PRIVILEGES;
    >quit

Postfix Installation

  1. Install Postfix port:
    # cd /usr/ports/mail/postfix
    # make install clean
  2. When asked for options, select PCRE, DOVECOT, TLS, BDB, MYSQL, and VDA.
  3. You will be asked if you want to activate postfix in /etc/mail/mailer.conf - select yes.
    Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y
  4. Add the following lines to /etc/rc.conf:
    sendmail_enable="NO"
    sendmail_submit_enable="NO"
    sendmail_outbound_enable="NO"
    sendmail_msp_queue_enable="NO"
  5. Add the following lines to /etc/periodic.conf:
    daily_clean_hoststat_enable="NO"
    daily_status_mail_rejects_enable="NO"
    daily_status_include_submit_mailq="NO"
    daily_submit_queuerun="NO"

Initialize the Database

  1. Download the SQL file
    # fetch http://www.purplehat.org/downloads/postfix_guide/postfix-db.sql