From charlesreid1

Revision as of 03:58, 20 October 2010 by Admin (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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.