From charlesreid1

(Created page with "Postfix (http://en.wikipedia.org/wiki/Postfix_%28software%29) is a mail agent used to send and receive email. I use it to field mail coming from and going to addresses with my w...")
 
No edit summary
Line 8: Line 8:


When you install it from a package manager, the configuration file ends up in <code>/etc/postfix/main.cf</code> - so go there to set your Postfix configuration.
When you install it from a package manager, the configuration file ends up in <code>/etc/postfix/main.cf</code> - so go there to set your Postfix configuration.
Following http://www.mysql-apache-php.com/#mailserver I then installed Dovecot, a POP3/IMAP server.  It uses Postfix to work properly.  I installed it by running
<syntaxhighlight>
$ apt-get install dovecot-common
</syntaxhighlight>
and made changes following the above website. The configuration file is in <code>/etc/dovecot/dovecot.conf</code>.  It creates a user dovecot in the group mail. 
i  dovecot-common                      - secure mail server that supports mbox and mail
p  dovecot-dev                          - header files for the dovecot mail server     
p  dovecot-imapd                        - secure IMAP server that supports mbox and mail
p  dovecot-pop3d                        - secure POP3 server that supports mbox and mail
/etc/defaults/saslauthd
set START=no to START=yes


= MediaWiki with Postfix =
= MediaWiki with Postfix =

Revision as of 04:50, 20 October 2010

Postfix (http://en.wikipedia.org/wiki/Postfix_%28software%29) is a mail agent used to send and receive email. I use it to field mail coming from and going to addresses with my web site's domain name.

Installing

Configuring

I cheated with Postfix - I used aptitude to install Postfix. If you want to build it from source, go for it, but I can't help you much.

When you install it from a package manager, the configuration file ends up in /etc/postfix/main.cf - so go there to set your Postfix configuration.

Following http://www.mysql-apache-php.com/#mailserver I then installed Dovecot, a POP3/IMAP server. It uses Postfix to work properly. I installed it by running

$ apt-get install dovecot-common

and made changes following the above website. The configuration file is in /etc/dovecot/dovecot.conf. It creates a user dovecot in the group mail.


i dovecot-common - secure mail server that supports mbox and mail p dovecot-dev - header files for the dovecot mail server p dovecot-imapd - secure IMAP server that supports mbox and mail p dovecot-pop3d - secure POP3 server that supports mbox and mail


/etc/defaults/saslauthd set START=no to START=yes



MediaWiki with Postfix

The main reason for getting Postfix set up was so that I could give MediaWiki email capabilities. The chain of software looks like this:

MediaWiki --> PHP --> Postfix

So first I had to make sure Postfix and PHP could communicate properly. I edited my PHP.ini file (see also PHP), and put the following SMTP (simple mail transfer protocol, http://en.wikipedia.org/wiki/Smtp) information there:

php.ini

SMTP=localhost
smtp_port=25

Port 25 is the default SMTP port. Next, I had to install a PEAR module (PEAR adds functionality to PHP) to deal with SMTP stuff. I actually installed 4 PEAR modules:

$ pear install Net_Socket
$ pear install Auth_SASL
$ pear install Net_SMTP
$ pear install Mail

This will install some PHP files to /path/to/php/lib/php. If you look there, you'll see a PHP file and a directory both named Mail.