Setting up Apache and Postfix

Let’s create the aliases in httpd.conf so that we can use webmail and postfixadmin.
# joe /etc/httpd/conf/httpd.conf

At the end of the file, add the Following:

### WEBMAIL ###
Alias /squirrelmail /usr/share/squirrelmail/
<Directory /usr/share/squirrelmail/>
Options Indexes
AllowOverride none
DirectoryIndex index.php
Order allow,deny
allow from all
</Directory>
### POSTFIX ADMIN ###
Alias /postfixadmin /usr/share/postfixadmin/
<Directory /usr/share/postfixadmin/>
Options Indexes
AllowOverride none
DirectoryIndex index.php
Order allow,deny
allow from all
</Directory>

 

Save the file and restart Apache.

# service restart httpd

Now edit main.cf of Postfix, Leave the file as follows.

Change the fields as needed:

 

  • · myhostname
  • · mydomain
  • · mynetworks
  • · smtpd_banner
  • · permit_mynetworks

 

myhostname = mail.exemple.com
mydomain = exemple.com.br

mynetworks = 127.0.0.0/8, 192.168.0.0/16

smtpd_banner = $myhostname ESMTP WELCOME!!
permit_mynetworks = 127.0.0.0/8, 192.168.0.0/16

Be the First to Comment!