Setting Up An Email For Postfix
Setting Up An Email For Postfix
Setting Up An Email For Postfix
INSTALLING
We need to create some users for Postfix to work with, as well as some groups. issue
the following commands:
cp /etc/passwd /etc/passwd-original
cp /etc/group /etc/group-original
Double-check before pressing <Enter>. Make sure that you get the CaSe right:
echo "postfix:*:12345:12345:Postfix:/no/where:/no/shell"
>>/etc/passwd
cd /usr/local/src
(#.#.# should be replaced with your version number. This is what I’ll use from now
on)
cd postfix-#.#.#
Install
make
make install
At this point you can do a very preliminary test, and start/stop postfix:
postfix start
postfix stop
The main.cf file is the actually file that controls how Postfix will treat mail. The
structure of the file is actually quite simple, and the commands’ explanation can be
found on Postfix’s web site. The main.cf file that’s supplied with Postfix includes
some settings and their explanation. We’ll renamed it to something else, and create
a new main.cf from scratch.
Let’s rename the original file, and then edit a brand new one:
cd /etc/postfix
mv main.cf main.cf.original
touch main.cf
vi main.cf
myhostname = example.sys
mydomain = example.sys
myorigin = $mydomain
mydestination = $mydomain
mynetworks_style = host
Explanation
myhostname This defines the full hostname for your server. Replace
example.sys with your host name. For example: somoe.sys
mydomain Your server’s domain name. Replace example.sys with your
host name. For example: somoe.sys
myorigin The domain name that mail coming from this machine will
appear to come from. You want this set to your domain name.
mydestination this parameter specifies the list of domains that the machine
considers itself. The default of $myhostname and
localhost.$mydomain should do here. Don't specify the virtual
domains that are hosted on the machine here!
mynetworks_style This tells Postfix which IPs can send mail through it. Specify
"mynetworks_style = host" when Postfix should "trust"
only the local machine.
INSTALLING AND CONFIGURING SQUIRRELMAIL
INSTALLING
Install Squirrelmail
Method 1:
rpm –ivh squirelmail-1.4.6-1.noarch.rpm
CONFIGURING
Setup Apache
Setup Squirrelmail
/usr/share/squirrelmail/config/./conf.pl
Set various configuration parameters important one is the domain found in server
settings section (option 2 on main panel)
INSTALLING AND CONFIGURING DOVECOT
INSTALLING
Note: you may have many dependencies, within the directory I have included all
dependencies rpm’s hence install each dependency as required
Hint: a quick way to install will be to install all rpms at once e.g
CONFIGURING
Vi /etc/dovecot.conf
mail_location: mbox:~mail:INBOX=/var/mail/%u
Start dovecot
/etc/init.d/dovecot start