|
|
| (3 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| 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.
| | For the mail server, see [[Mail Server]] |
|
| |
|
| = Installing =
| | For postfix expression evaluation programming tips, see [[Postfix Expressions]] |
|
| |
|
| == 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.
| | {{Programs}} |
| | |
| 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 =
| |
| | |
| 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'''
| |
| | |
| <syntaxhighlight lang="ini">
| |
| SMTP=localhost
| |
| smtp_port=25
| |
| </syntaxhighlight>
| |
| | |
| 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:
| |
| | |
| <syntaxhighlight>
| |
| $ pear install Net_Socket
| |
| $ pear install Auth_SASL
| |
| $ pear install Net_SMTP
| |
| $ pear install Mail
| |
| </syntaxhighlight>
| |
| | |
| This will install some PHP files to <code>/path/to/php/lib/php</code>. If you look there, you'll see a PHP file and a directory both named <code>Mail</code>.
| |