6.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

12-21-2011, 07:50 AM
Post: #1
[TUT] How to set up a debian email server
I've written a tutorial once for ubuntu (debian based) on another forum which their email section got shut down within a day or two of me writing so no one really had access to it that didn't see it within the first 48 hours of me posting. When I was learning about how to setup mail servers there was not a lot of updated or correct information out there, so in effort to bring some life to the email section of this forum I wrote this tutorial to share here. There are sections that are taken from other tutorials but this in it's entirety has never been shared as I just wrote it.

Acquire a debian vps or dedicated server, set your “A”and “MX”
records at the registrar to the ip of your server. Go to the control panel of
your server and set the rDNS to your domain if there is no user rdns management
then submit a ticket and request rdns be set to your domain. Log into your
server via ssh with either putty or terminal and complete the following;
Code:
aptitude update

aptitude upgrade

netstat –tap

(look for what process id# is sendmail)

kill -9 processid#forsendmail

/etc/init.d/apache2 stop

(go dl xampp for linux, as of writing this the link is like
this)

wget http://downloads.sourceforge.net/project/xampp/BETAS/xampp-linux-1.7.7.tar.gz

tar xvfz xampp-linux-1.7.7.tar.gz –C /opt

/opt/lampp/lampp start

/opt/lampp/lampp security

(change all passwords)

aptitude install postfix postfix-tls libsasl2-2 sasl2-bin
libsasl2-modules popa3d

aptitude install dovecot-imapd dovecot-pop3d dovecot-common

aptitude install nano

nano /etc/dovecot/dovecot.conf

“page down until you see disable_plain_text_authorization
and uncomment by removing the # and make sure it says no”

ctrl-o to write out and ctrl-x to exit

adduser mailaccountname

adduser bounceaccountname

adduser abuse

/etc/init.d/dovecot restart

nano /etc/postfix/main.cf

add the following:

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = yourdomainname.com

smtpd_recipient_restrictions =

permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

smtpd_sasl_security_options = noanonymous

ctrl-o to write out ctrl-x to exit

rm –r /var/run/saslauthd/

mkdir –p /var/spool/postfix/var/run/saslauthd

ln –s /var/spool/postfix/var/run/saslauthd

chgrp sasl /var/spool/postfix/var/run/saslauthd

adduser postfix sasl

nano /etc/dovecot/dovecot.conf

hit ctrl-w and type auth default hit enter

add 2 to auth default so it reads auth default2

and above it paste the following

auth
default {

mechanisms = plain login

passdb pam {

}

userdb passwd {

}

socket listen {

client {

path = /var/spool/postfix/private/auth

mode = 0660

user = postfix

group = postfix

}

}

}

ctrl-o to write out and ctrl-x to exit

/etc/init.d/saslauthd restart

/etc/init.d/postfix restart

/etc/init.d/dovecot restart

aptitude install squirrelmail

nano /opt/lampp/etc/httpd.conf

edit your DocumentRoot to /var/www/

scroll to the bottom and under various configs enter the
following:

Include /etc/squirrelmail/apache.conf

ctrl-o to write out and ctrl-x to exit

/opt/lampp/lampp stopapache

/opt/lampp/lampp startapache

chmod 777 /var/lib/squirrelmail/data/

now you can access your email accounts via http://yourdomain.com/squirrelmail
(do not  use root account for login)

Now you may install any mailer of your choice by following
their instructions, such as Interspire, Active Campaign, OEMpro, phplist, etc.
04-03-2012, 05:18 AM
Post: #2
RE: [TUT] How to set up a debian email server
very useful Tutorial, do have skype or yahoo mesenger ?
i want to discuss something if you have free time
10-03-2014, 04:12 AM
Post: #3
RE:
Hello zilla,

Thank you for this guide. i really would like to try this just for learning, but before i do it, i would like to ask if theres a new update on this guide?

Thank you.




48.gif