Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

1 sayfadaki 2 sayfası 1, 2  Sonraki

Önceki başlık Sonraki başlık Aşağa gitmek

Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 01:31











As it is now, I've split the debian qmail installation up into 20 sections which are listed below. Simply start at step 1and follow it all the way to completion. By the time you reach step 20, you should have a kickass qmail server. You may notice that the Debian installation guide shares many of it's steps with the Redhat/Slackware guide. This is due to the close similarity of the 2 installations. On the portions of the install that are unique to Debian, you will be directed to a Debian specific page.
For a quick look at what this installation will provide you with, click here.

Before You Start! - When installing qmail, I would STRONGLY reccomend that you first conduct a test installation on a test server if you have one available. I cannot stress this enough. If you're new to qmail, chances are you will probably screw the install up the first time through. Do yourself a favor and screw up on a test server that has no importance to you! I had to learn this the hard way. Wink


Pre-installation steps

P1 - An introduction to the QMR installation / Setting your expectations
P2 - Pre-Installation Checklist

Installation steps

Part 1 - Download All the Needed Items for the Qmail installation
Part 2 - Installing Qmail itself
Part 3- Installing EZmlm and EZmlm-idx
Part 4- Installing Autoresponder
Part 5- Installing Vpopmail
Part 6- Installing VQadmin
Part 7- Installing maildrop
Part 8- Installing QmailAdmin
Part 9 - Finalizing the qmail installation
Part 10 - Disabling sendmail/exim
Part 11 - Starting up qmail
Part 12 - Installing Courier IMAP & IMAP SSL
Part 13 - Installation of the Squirrelmail web mail program
Part 14 - Clam Anti Virus & SpamAssassin
Part 15 - Installing qmail-scanner w/qms-analog
Part 16 - Installing Qmailanalog & Qlogtools
Part 17 - Installing Qtrap
Part 18 - Maintaining your qmail server
Part 19 - Mail client configuration
Part 20 - Feedback

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 01:33

Part 1 - Download the Software
The first thing you'll need to do to get started is to download all the needed software packages for the entire qmail installation process. To make things easier for everyone, I've combined all the needed packages into 1 giant tarball (.tar.gz) bundle that you can download in one easy step. Most of the included packages are the latest versions as of March, 2005 (there are a few intentional exceptions) and I will make efforts keep the software bundle up to date as new versions are released. If your going to be using the Qmailrocks installation guide to install qmail, I would strongly reccomend that you download my software bundle. I've included several ready-made scripts and so forth, so everything will make more sense if you're on the same page as I am when going through the install.
So let's start the installation by getting the needed software. You will notice that below I create a new directory called /downloads and I place the Qmailrocks tarball in that directory before unpacking it. I would strongly reccomend you do this as the rest of the instructions on this site are geared toward this source directory structure. Anyway, lets get down to business.
mkdir /downloads
cd /downloads
Now download the Qmailrocks.org software bundle. The command below will download the bundle from the qmailrocks.org main server in Texas, USA. You can also download the bundle from a qmailrocks mirror site, if you wish)
wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz
(Alternatively, if you'd like to download individual packages or view a listing of all the packages, you may do so right here.)
Once you've downloaded qmailrocks.tar.gz, were going to place in a directory called "downloads" and then unpack it...
tar zxvf qmailrocks.tar.gz

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:32

Part 2 - Installing Qmail Itself
Now that you've downloaded all the needed packages, we can start the install. At this point you should have a qmailrocks source directory located at /downloads/qmailrocks. If you don't, go back to step 1. This step involves the setup of the very heart of you new qmail server. In this step, we'll install qmail itself, ucspi-tcp and daemontools. These 3 packages are the core of the qmail server and will be the foundation on which we build everything else. So don't screw it up!
(RH 9/RHEL/Fedora/Slackware users: click here before you start.)

To start things off, I've created a handy little shell script that takes care of the first portion of getting qmail, ucspi-tcp and daemontools intalled. Simply run this script from the command prompt of your Solaris box and you should be golden. The script will tell you what it's doing along the way.
/downloads/qmailrocks/scripts/install/qmr_install_linux-s1.script (click here to view this script)
If all goes well, you should have all the needed user and groups created as well as all the needed directories, permissions and ownership settings needed for the installation of qmail, ucspi-tcp and daemontools
Before we start to compile and install qmail, ucspi-tcp and daemontools, we're going to apply a group of patches to qmail. These patches will build all sorts of cool functionality directly into qmail before we install it. In total, we're going to add around 15 patches, but fortunately John Simpson has combined all but one of these patches into one giant patch file. But it gets even easier because I've thrown together a shell script that applies ALL the patches in one quick step. I'm making this so easy for you it's almost sickening. :)
Here's the basic gist of these patches: All critical patches included in this bundle will be automatically integrated in your qmail server's functioning. However, there are a few non-critical patches that have to be configured in order to work. These non-critical patches are included merely to give you a few extra little goodies that you can play with on your own time. Some of these "extra little goodies" are new to me too, so as I learn more about them I will certainly go into more detail.
So that you're not completely ignorant as to what theses patches are going to be doing to your qmail server, here's a quick list of what patches are included. I have color coded these patches so that you will know which ones are critical and which ones are not.
red patch = critical patch, as far as the QMR install is concerned, that is automatically integrated into your qmail server and requires no additional work on your part.
blue patch = a non-critical patch that merely adds some cool functionality. Blue asterisk patches also will be automatically integrated and require no additional work.
green patch = a non-critical patch that merely add some cool functionality, but which needs to be configured in order to be active.
maxrcpt patch - Allows the sysadmin to set limits a message's number of recipients. The default for this patch is set to 100.
mfcheck patch - causes qmail-smtpd to reject messages where the domain portion of the envelope sender is not a valid domain
quota patch - Turns "over quota" errors into HARD errors, not soft. A wake up call for those 2 or 3 jackasses on your server who never check their mail.
date-localtime patch - causes qmail to use the local timezone in any headers it generates.
qmailqueue - the classic patch that allows qmail-smtpd to call other programs to process messages. Through qmailqueue, we will later tie in Clam Antivirus and Spamassassin. However, many ofther programs can also be tied in if you so desire.
jms1-antispam patch - An anti-spam patch created by John Simpson, which works within qmail-scanner to trick spam servers into believing a spam message is delivered, when in fact it isn't. This is inactive by default, but you can play around with this if you want.
errno.patch - patches error.h to work correctly with libc-2.3, which is used by RedHat 9 and a few other Linux distributions
smtp-auth patch - good old smtp authentication
STARTTLS/AUTH patch - patch from qmail.org, modified by John Simpson to not advertise AUTH unless the command line elements are there, AND adding a check to not advertise or support AUTH unless the connection is secure.
forcetls patch - a patch created by Ryan Schlesinger to compensate for mail clients that do not support TLS. Using this patch, your qmail server will always accept an smtp connection encrypted with TLS. However, if any of your users have a mail client that does NOT support TLS, they will still be able to connect with just a plain AUTH connection. This is the default setting that this patch installs with. However, if you're a security nazi, this patch allows you to set your server so it will REQUIRE a TLS smtp connection no matter what. This patch simply gives you some flexibility with your TLS enabled qmail server.
The SPF patch - adds SPF checking to qmail-smtpd. SPF is a system where the owners of domain names can "publish" the list of IP addresses from which their users send mail. If another mail server sees an incoming message claiming to be "From" that domain, but not coming from an IP on their SPF list, that server can reliably reject the message as spam. More info can be found here.
qmail-0.0.0.0 patch - fixes a difference between how Linux interprets the IP address "0.0.0.0" and how the *BSD systems handle it. According to RFC 1122, the IP address 0.0.0.0 should always be treated as an address for "this host, this network". Part of qmail's loop-detection logic is determining whether or not a given IP address "is" the current machine. This patch "teaches" qmail that 0.0.0.0 is always the local machine.
qmail_local patch - fixes a possible bug in qmail-local having to do with how the first line of a .qmail file is interpreted, when it starts with whitespace.
sendmail-flagf patch - fixes how the "-f" option to /var/qmail/bin/sendmail is handled, so that it more closely matches how the original "sendmail" program's "-f" option worked.
bind-interface patch - a patch that lets you control the "source IP" from which outgoing connections appear from a machine with multiple IP addresses. This page on qmail.org describes the patch more clearly, as well as the format of the /var/qmail/control/bindroutes file which it uses.
8k-buffer-patch - increases the size of the memory buffer that qmail uses when querying the system for a list of all local IP addresses.
Ok, so enough talk. Let's apply these mega-patches and get this patching business out of the way...
/downloads/qmailrocks/scripts/util/qmail_big_patches.script (click here to view this script)
Now we build Qmail...
cd /usr/src/qmail/qmail-1.03
make man && make setup check
./config-fast your_fqdn_hostname (ex: ./config-fast mail.mydomain.com)
OK, qmail itself is now built and installed. Now let's generate a secure certificate that will be used to encrypt your server's TLS encrypted SMTP sessions...
make cert
When you run the above command you will be asked a series of questions regarding the generation of your certificate. They are non-technical questions...such as your location, business name, organaization name, common name and so forth. If you've ever generated an SSL cert before, this should be familiar stuff to you. If you haven't, simply follow the directions. It's easy. If you have trouble following the directions, you might as well give up now because you're a RETARD. Since the cert you are generating is already NOT from a trusted authority such as Verisign or Thawte, the information you provide here is not really THAT important, so don't sweat it.
Here's a sample of my cert cert configs. Don't be an idiot. Substitute in your own information.
Country Name (2 letter code) [GB]:US
State or Province Name (full name) [Berkshire]:Georgia
Locality Name (eg, city) [Newbury]:Atlanta
Organization Name (eg, company) [My Company Ltd]:qmailrocks.org
Organizational Unit Name (eg, section) []:mail
Common Name (eg, your name or your server's hostname) []:mail.qmailrocks.org
Email Address []:postmaster@thisdomain.org

If the cert is successfully generated it will be automatically installed at /var/qmail/control/servercert.pem, along with a symlink to that cert at /var/qmail/control/clientcert.pem
Now we set the right ownership for the newly create cert...
chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem
Now we build ucspi-tcp...
cd /usr/src/qmail/ucspi-tcp-0.88/
RH 9/RHEL/Fedora/Slackware users: You will need to patch ucspi-tcp with an additional errno patch:
patch < /downloads/qmailrocks/patches/ucspi-tcp-0.88.errno.patch
make && make setup check
If you don't get any errors, that's it for ucspi-tcp!
Now we build the daemontools....
cd /package/admin/daemontools-0.76
RH 9/RHEL/Fedora/Slackware users:You will need to patch daemontools with an additional errno patch:
cd /package/admin/daemontools-0.76/src
patch < /downloads/qmailrocks/patches/daemontools-0.76.errno.patch
cd /package/admin/daemontools-0.76
package/install
If no errors are reported, you've successfully compiled the daemontools package!
All done for now...
If you run take a look at the running processes on your server at this point, you should see the daemon "svscanboot" running. You can usually do this with a "ps -aux" command. Here's a screenshot of it. If you see "svscanboot" running, you're in good shape.OK, Qmail is almost totally installed but we're going to pause right here and install a bunch of handy tools and features that will make Qmail pretty and fun! After that, we'll make some final changes to Qmail and then crank it up!

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:33

Part 3 - EZmlm
EZmlm is a nice mailing list add-on to Qmail. I've used it several times myself and its actually one of the better mailing list programs out there. When we install Qmailadmin later on, you'll see that EZmlm integrates seamlessly into Qmailadmin to provide a very user friendly mailing list management interface. As an added bonus, Vpopmail (which we will install as well) will let you control what users can and cannot use mailing lists! Can't beat that!
So let's install it...
cd /downloads/qmailrocks/
tar zxvf ezmlm-0.53-idx-0.41.tar.gz
cd ezmlm-0.53-idx-0.41
make && make setup
If you don't get any errors, then ezmlm is all set up and ready to go!

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:33

Part 4 - Autoresponder
Autoresponder does exactly what you think it does. It allows us to set up autoresponders for mailboxes and so forth.
So let's install it...
cd /downloads/qmailrocks
tar zxvf autorespond-2.0.5.tar.gz
cd autorespond-2.0.5
make && make install
If you don't get any errors, then autoresponder is all set up and ready to go!

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:34

Part 5 - Vpopmail
PLease choose one of the following vpopmail installation options:
I would like to install vpopmail without MySQL intregation
(recommened for smaller email servers and for qmail/mysql newbies)
or
I would like to install vpopmail with MySQL integration
(Requires that mysql server be installed on your server. Recommended for larger email servers & ONLY for experienced mysql users)

Which option is best for me?
First of all, don't feel that a vpopmail installation without mysql is somehow inferior or inadequate. It's not. The choice of whether or not to use mysql with vpopmail, in my opinion, is a personal preference and basically comes down to 2 things:
1. How large is you mail server going to be?
If you are only planning on hosting a handful of domains on your mail server, I don't think it's really worth integrating mysql into it. I have a server that hosts about 50 domains on it right now and it does NOT have mysql integrated into vpopmail. It works perfectly fine. The qmailrocks.org mail server also does NOT have mysql built into it. It runs great. However, if you plan to host more than 50 domains or so, I'd say go with mysql. It makes it easier to manage a lot of domains and also makes porting the mail server to new equipment and locations easier. Of course, the decision is up to you. If you really want to use vpopmail with mysql on a server that hosts only 1 domain, knock yourself out. My opinion though, is that unless you are hosting a ton of domains, integrating mysql into vpopmail is simply making your mail server more complex than it needs to be. And as we all know, the more complex the plumbing, the easier it is to stop up the drain.
2. How comfortable are you with mysql?
If you're a newbie and you don't know jack shit about mysql, don't be a jackass. Just use the default vpopmail installation and save yourself the aggravation. I can't hold you hand though installing and setting up mysql, and you'll be hard pressed to find someone else that will. In short, don't get in over your head.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:36

Part 5 - Vpopmail
Vpopmail is one of the major components of this installation. Vpopmail allows us to do virtual domain mail hosting. It's got a lot of built in tools and features that make it a dream to work with. Even if you don't want to host mail for multiple domains, I would still recommend installing Vpopmail. It just makes the whole mail game easier. Plus, my installation centers around it, so if you don't install it you're going to have a headache.
So let's install it...
cd /downloads/qmailrocks
tar zxvf vpopmail-5.4.13.tar.gz
cd vpopmail-5.4.13
- Helpful Hint: Vpopmail configuration options -

The vpopmail "configure" command can have loads of options. Use "./configure --help" to see them all. In the syntax used in this installation, I specify to the type of logging that I want vpopmail to use. Vpopmail logs its activities to the server's syslog and there are several options you can use. I've used the "p" option, but feel free to adjust it to your needs. Here's are the details:
--enable-logging=n - logs nothing
--enable-logging=e - logs only errors (default)
--enable-logging=y - logs all attempts
--enable-logging=p - logs errors with passwords
--enable-logging=v - verbose. Logs all attempts with passwords
Now let's configure vpopmail...
./configure --enable-logging=p
make && make install-strip
If you don't get any errors, then Vpopmail is good to go!
Wait! I'm getting an error! What do I do?

If you are using GCC version 3.x, you may get a compilation error similar to this:
In file included from vconvert.c:35:
vmysql.h:53:22: missing terminating " character
vmysql.h:60:35: missing terminating " character
make[2]: *** [vconvert.o] Error 1

If you get this error, you will need to apply a patch to Vpopmail:
patch < /downloads/qmailrocks/patches/vmysql.patch
Once you've applied the patch, try running "make" and "make install" again and you should be ok.

So now let's go on to part 6...

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:36

Part 5 - Vpopmail w/MySQL
Vpopmail is one of the major components of this installation. Vpopmail allows us to do virtual domain mail hosting. It's got a lot of built in tools and features that make it a dream to work with. Even if you don't want to host mail for multiple domains, I would still recommend installing Vpopmail. It just makes the whole mail game easier. Plus, my installation centers around it, so if you don't install it you're going to have a headache.
This page details the configuration and installation of vpopmail with MySQL functionality. When used with mysql, all domain information (domain name, email users, passwords etc.) are all stored in a handy mysql database. The actual mail messages are NOT stored in the database and are still kept in the same areas as a standard vpopmail build. I would not recommend integrating mysql into vpopmail if you're only going to be hosting a few domains on your email server, but if you plan on hosting great numbers of domains then the mysql component is a practical solution. It also makes it easy to port your mail server to another machine if you ever have to upgrade or recover from a crash.
A note for NEWBIES: If you are a newbie to qmail and especially to mysql, I would strongly recommend that you NOT mess with this section and that you simply install a standard build of vpopmail. I'm not going to hold your hand on how to install mysql, how to configure mysql and how to administer a mysql server. You should only proceed with this section is you are very comfortable with mysql. I will ignore any and all newbie related questions to this section. In general, on a linux build, you will want to have both mysql-server and mysql-devel installed (along with any dependencies), but that's all l'm gonna say on the matter.
So let's install it...
If you recall, we already created a "vpopmail" system user and a "vchkpw" system group in step 2 when all the needed users and groups were created. So, now we will set up the vpopmail mysql connection config file under the vpopmail user's home directory.
mkdir ~vpopmail/etc
chown vpopmail:vchkpw ~vpopmail/etc
Obviously, you will want to substitute in your own vpopmail username and password below. You can make the username and password anything you wish.
echo "localhost|0|vpopmailuser|password|vpopmail" > ~vpopmail/etc/vpopmail.mysql
Now we set the proper ownership/permissions on the new mysql connection config file...
chown vpopmail:vchkpw ~vpopmail/etc/vpopmail.mysql
chmod 640 ~vpopmail/etc/vpopmail.mysql
The next step is to log into your mysql server as the "root" mysql user and create the vpopmail database as well as a vpopmail user with proper rights on that new database.
mysql -u root -p
Enter your mysql server's root password when prompted.
And now we create the new vpopmail database...
CREATE DATABASE vpopmail;
And we create a vpopmail user that will have access to that database.
The username and password that you create here MUST match the information that you entered in the config file above.
GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmailuser@localhost IDENTIFIED BY 'password';
And now let's quit...
quit
And let's test the new user we just created...
mysql -u vpopmailuser -p
Enter the vpopmail user's password when prompted. If you get in, you're golden. If you are denied access, you screwed up. Go back and repeat the above steps.
Ok, so that does it for the mysql setup portion. Now let's configure vpopmail to actually user the mysql functionality and then install it.
cd /downloads/qmailrocks
tar zxvf vpopmail-5.4.13.tar.gz
cd vpopmail-5.4.13
./configure --enable-logging=p --enable-auth-module=mysql --disable-passwd --enable-clear-passwd --disable-many-domains --enable-auth-logging --enable-sql-logging --enable-valias --disable-mysql-limits
make && make install-strip
If you don't get any errors, then Vpopmail is good to go! Further ahead in the installation, we'll create domains under vpopmail. At that time, if you wish, you can log back into mysql and confirm that the mysql entries have been created for the domain(s) you add.
Wait! I'm getting an error! What do I do?

If you are using GCC version 3.x, you may get a compilation error similar to this:
In file included from vconvert.c:35:
vmysql.h:53:22: missing terminating " character
vmysql.h:60:35: missing terminating " character
make[2]: *** [vconvert.o] Error 1

If you get this error, you will need to apply a patch to Vpopmail:
patch < /downloads/qmailrocks/patches/vmysql.patch
Once you've applied the patch, try running "make" and "make install" again and you should be ok.
So now let's go on to part 6...

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:37

Part 6 - Vqadmin
Vqadmin is simply a nice web based interface that will let us manage Vpopmail. Through the interface we can create new domains, new users, net quotas, enable services and much more.
So let's install it...
cd /downloads/qmailrocks
tar zxvf vqadmin-2.3.6.tar.gz
cd vqadmin-2.3.6
./configure --enable-cgibindir=/path/to/your/cgi-bin --enable-htmldir=/path/to/your/html/directory
(Example: ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/html )
make && make install-strip
If the installation is successfull, Vqadmin should install itself in the cgi-bin directory of your default website. Unless you tell it otherwise, that usually defaults to /var/www/cgi-bin. You can specify another location in the ./configure command above.
Now you will need to add the following to your server's Apache configuration file (usually httpd.conf)

/path/to/your/cgi-bin/vqadmin">
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow

In addition, within the Apache master config file you will want to set the "AllowOveride" option to "All". Example: AllowOverride All
cd /path/to/your/cgi-bin/vqadmin
Now you will want to create a .htaccess file to password protect the Vqadmin interface. There should already be a .htaccess file in the vqadmin directory, so all you need to do is configure it. We'll use the ever useful vi editor for this.
vi .htaccess
AuthType Basic
AuthUserFile /path/to/where/you/want/to/store/the/password/file/.htpasswd
AuthName vQadmin
require valid-user
satisfy any

chown apache .htaccess (you may need to change the chown to either "nobody", "apache" or "www" etc., depending on what user your installation of Apache is running as)
chmod 644 .htaccess
Now you need to create a corresponding .htpasswd file that's going to contain the username and encrypted password for the Vqadmin administrator...
htpasswd -bc /path/to/where/you/want/to/store/the/password/file/.htpasswd admin admin_password
chmod 644 /path/to/where/you/want/to/store/the/password/file/.htpasswd
Question: But what if I want to user another username other than "admin"?
Answer:: You will notice that in the above line, I'm adding an admin user called "admin". The name of the user needs to be "admin" because that is the username which Vqadmin sets up by default to have full admin rights. If you want to use a username other than "admin", you will need to edit the /cgi-bin/vqadmin/vqadmin.acl file and add your custom user to that file along with whatever rights you want it to have. Within that file, you will see where the user called "admin" is already set up to have all rights. That line looks like this:
admin VIMUDCA admin1user
In this line, the "admin" part specifies the username, the "VIMUDCA" part specifies that user's rights (a chart of all the possible rights is right above this line), and the "admin1user" part specifies the common name for the user which will be displayed when you log into Vqadmin. The common name is purely for aesthetic purposes.
Now restart Apache...
apachectl stop
apachectl start
If all has gone well, you should now be able to browse (in your web browser) to:
http://www.yourdomain.com/cgi-bin/vqadmin/vqadmin.cgi
Note: make sure you include "vqadmin.cgi" in the path or you will get a 403 forbidden error!
Enter the user "admin" and whatever password your assigned it.
You should now see the Vqadmin interface. Go ahead and add a new domain to your server! Pretty cool, huh? The "postmaster" user serves as the admin user for any new domain and we will use it to log into Qmailadmin, when we install that. As soon as we complete the install, that domain will be instantly able to get mail (assuming the MX is correctly pointing to your server). The nice thing about Vpopmail and Vqadmin is that you do not need to restart anything after you add a domain. Once you add it, it simply works! We're almost done!
Having problems? Search the QMR Forum for answers. The forum has gotten me out of countless jams.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:37

Part 7- Maildrop
Maildrop is a mail filtering agent which can be used to filter messages as they arrive on the server. You will probably notice, once this installation in complete, that you don't really use maildrop. However, it's a cool tool and it's worth having around if you ever decide to get crazy with filtering your imcoming mail. You can find documentation on maildrop right here.
Let's install it...
cd /downloads/qmailrocks
tar zxvf maildrop-1.6.3.tar.gz
cd maildrop-1.6.3
./configure --prefix=/usr/local --exec-prefix=/usr/local --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw --enable-maildirquota
make && make install-strip && make install-man
If you didn't get any errors, maildrop should be all set!
Having problems? Search the QMR Forum for answers. The forum has gotten me out of countless jams.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:38

Part 8 - Qmailadmin

Qmailadmin is going to provide us with a nice web based interface for administering mail accounts once they are setup through Vpopmail (or Vqadmin). From Qmailadmin we can create mailboxes, aliases, fowards, mail robots, mailing lists. You'll also find a few other handy functions as well. Qmailadmin is sort of the icing on the Qmail cake.
Let's install it...


click for full size preview
cd /downloads/qmailrocks
tar zxvf qmailadmin-1.2.9.tar.gz
cd qmailadmin-1.2.9
./configure --enable-cgibindir=/path/to/your/cgi-bin --enable-htmldir=/path/to/your/html/directory
note: The paths in the above configure script will need to be custom tailored to your systems configuration
make && make install-strip
That's it! Now browse to http://www.yourdomain.com/cgi-bin/qmailadmin and you should see the login screen. Login with the postmaster account and password for the domain that you created a while back using Vqadmin. Pretty cool, isn't it? Go ahead and create some additional mailboxes for your domain(s).
If you didn't get any errors, Qmailadmin should be all set!
note: if it's late and you're looking for a place to stop so you can sleep, this is a good place. Sendmail should still be handling mail on the server. After this page it's Qmail or bust!

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:38

Part 9 - Finalizing Qmail
Ok, we've installed a bunch of bells of whistles onto our qmail installation. Now it's time to wrap up the configuration for qmail itself. After that, we will stop and remove Sendmail from the server and then it's time to crank qmail up!
The first thing we're going to do is create the qmail supervise scripts, create the the qmail rc and qmailctl scripts and then set the needed permissions on all these scripts. Lucky for you, I've created a script to do all this for you. The script will give you a breakdown of what it is doing while it's running. If any errors occur, you'll see them. However, if you've configured everything right up until now, you shouldn't have any problems. You can check out the contents of this scripts right here.
So let's run the script...
/downloads/qmailrocks/scripts/finalize/linux/finalize_linux.script
Hey, that was easy. Now there are just a couple tweaks to make to these new scripts we just created...
vi /var/qmail/supervise/qmail-pop3d/run
Find "mail.example.com" and change it to your server's hostname. For example: mail.mydomain.com.
vi /var/qmail/supervise/qmail-smtpd/run
Find "mail.example.com" and change it to your server's hostname. For example: mail.mydomain.com
Next, we'll kill any running qmail processes so that we can implement some final configurations.
qmailctl stop
We setup selective relaying for localhost...
echo '127.:allow,RELAYCLIENT=""' >> /etc/tcp.smtp
qmailctl cdb
Now we create the common system aliases. These aliases are going to tell Qmail what to do with common server-generated mails. Stuff like bouncebacks, cron daily output and various other systemic sources. It's a good idea to redirect these aliases to a mailbox that you are going to check on a regular basis. You don't want to have your systemic mails piling up in some deep dark corner of your server doing no good and slowly filling your disk up.
echo some_address > /var/qmail/alias/.qmail-root
where "some_address" is the system user or email address you want these addresses aliased to.
echo some_address > /var/qmail/alias/.qmail-postmaster
where "some_address" is the system user or email address you want these addresses aliased to.
echo some_address > /var/qmail/alias/.qmail-mailer-daemon
where "some_address" is the system user or email address you want these addresses aliased to.
ln -s /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-anonymous
chmod 644 /var/qmail/alias/.qmail*
Alright. We've got qmail ready to go. One of the last things we need to do is to disable/uninstall Sendmail on the server and replace the Sendmail binary with a symlink to qmail, so that our server won't freak out with Sendmail being gone.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:38

Part 10 - Uninstalling Sendmail







The next step varies slightly depending on whether you're installing on Redhat, Debian or Slackware. Please choose the appropriate selection below

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:39


Part 10 - Disabling sendmail/exim
(Debian)
Well, the moment you've been waiting for is finally here. We're going to disable sendmail/exim from the server. On many *nix flavors, sendmail is a the typical MTA installed by default. However, an out of the box Debian install will typically have exim installed instead. sendmail is a very commonly used command on most *nix servers, so Debian compensates for this by having symbolic sendmail links that point to exim. For example, on a Debian box /usr/sbin/sendmail is merely a symbolic link pointing to exim. Interestingly enough, qmail works the same way. So all we are going to do is (1) disable exim and then (2) create new sendmail symbolic links that point to qmail instead of exim. Additionally, Postfix (another MTA) is often installed on many out of the box Debian installs, so we'll make sure Postfix is uninstalled as well.
So, let's start off by disabling exim. In case you're curious, we're going to disable exim as opposed to uninstalling it because uninstalling exim causes all sorts of packages the freak out. So it's best to keep in on the system, and just disable it.
First, we'll stop exim...
/etc/init.d/exim stop
Now, we will prevent exim from starting up on boot. We do this by modifying the runlevel scripts for each runlevel. I'm only going to disable exim for runlevel 2, since most out of the box Debian installed default to a runlevel of 2.
cd /etc/rc2.d
mv S20exim K20exim
Now let's remove any old sendmail symbolic links...
rm -f /usr/lib/sendmail
rm -f /usr/sbin/sendmail
Now we will need to set up an "artificial" sendmail, which is just a symbolic link to qmail's "sendmail". Qmail is equipped with it's own "sendmail" binary at /var/qmail/bin/sendmail, which is merely a direct inject into qmail.
ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
That's it! If all has gone well, sendmail should be uninstalled and the qmail sendmail should be in its place. A listing of the 2 sendmail symbolic links should look like this:
lrwxrwxrwx 1 root root 23 Dec 19 15:27 /usr/sbin/sendmail -> /var/qmail/bin/sendmail
lrwxrwxrwx 1 root root 23 Dec 19 15:27 /usr/lib/sendmail -> /var/qmail/bin/sendmail
If you're listing of the sendmail symbolic links does NOT show them pointing to qmail's sendmail binary, you've screwed up. Go back and make sure you get it right.
Finally, we will uninstall Postfix, if it happens to be installed. I know that on my out of the box Debian sever, Postfix was installed. So, if you're in the same boat, pay attention. If you are certain that Postfix is not installed on your server, you can save yourself about 3 seconds and skip this next command.
dpkg --purge --force-depends postfix
The above command will uninstall Postfix, if it's installed. If it's not installed, you will get a message telling you so. Hey, that was easy.
If you've got it all right, it's now time to give qmail a final test and then crank it up!

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:39

Part 11 - Starting qmail
Alright, qmail should be ready to go! But before we crank it up, let's run a script that will check the key components of the installation and make sure everything is alright.
To do this test, I have borrowed Dave Sill's "inst_check" script, but I've made a few custom modifications to accomodate for the subtle differences between the Qmailrocks installation and the Life With Qmail installation. Basically, the Qmailrocks installation has a slightly different logging setup and some slight variations in permissions settings. If you've installed according to this site, use my version of the script, as using Dave's version will result in a lot of "error" detections that are false positives due to the differences in the 2 installs. When you run the script, it will check for some key required files and folders and will also check permissions and owership settings on many key items. It a needed file does not exist or if the ownership/permissions settings are wrong on a key file, it will tell you and then make a suggestion as to how to correct the error. This script does NOT check the CONTENT or SYNTAX of your scripts, but only for the scripts' existence and their ownership/permissions settings. If you've screwed up the syntax of on the run scripts, this tool will not detect it. So you ready? Let's do it...
/downloads/qmailrocks/scripts/util/qmr_inst_check
If you get a "congratulations" type of message, you're all set. If you get some errors, just follow the directions to fix the errors and then re-run the script until you get all errors corrected and you get a "congratulations" message.
Assuming, you've passed the installation check script, let's crank Qmail up!
qmailctl stop
qmailctl start
You can find out how things are running by:
qmailctl stat
You should see an output like this:
/service/qmail-send: up (pid 29956) 2 seconds
/service/qmail-send/log: up (pid 29960) 2 seconds
/service/qmail-smtpd: up (pid 29963) 2 seconds
/service/qmail-smtpd/log: up (pid 29968) 2 seconds
/service/qmail-pop3d: up (pid 29971) 2 seconds
/service/qmail-pop3d/log: up (pid 29972) 2 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

If you, don't see anything like that or if you see error messages, click here for troubleshooting tips.
Congratulations, Qmail is now officially up and running and you should be able to send and receive mail on the server.
Let's test your new server's POP3 service...
telnet localhost 110
you should see something like this:
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
+OK <16658.1054485137@yourserver.com>
user postmaster@mydomain.com (enter your username here. remember to use the full e-mail address)
+OK
pass your_password
+OK

quit
+OK
Connection closed by foreign host.

This is the sign of a successfull POP connection to the server!
Now try sending mail to that same user from another location. Telnet to 110 again and run the "list" command and you should see the message that your send...
telnet localhost 110
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
+OK <16658.1054485137@yourserver.comt>
user postmaster@mydomain.com (again, remember to log in with the full email address of the user)
+OK
pass your_password
+OK
list
+OK
1 323 (there's your message!)
.

quit
+OK
Connection closed by foreign host.

And now let's test your server's SMTP service to make sure the TLS functionaltiy is there...
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 somewhere.anywhere.com ESMTP
ehlo localhost
250-somewhere.anywhere.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
starttls
220 ready for tls
quit
quit
Connection closed by foreign host.
[root@somewhere control]#

In the above SMTP session, I have higlighted the important aspects in DARK RED. After you give the server the initial "ehlo localhost" command, you should get a response back that lists "250-STARTTLS", signaling that the server is in fact equipped for TLS functionality. Then, after you issue the "starttls" command, you should get the :"220 ready for tls" response if the server is able to successfully start the TLS session.
If you happen to get an error that states "454 TLS not available: missing RSA private key (#4.3.0)" after you issue the "starttls" command, you will want to check 2 things:
1) Verify that the cert actually exists at /var/qmail/control/servercert.pem. If it's not there, go back to step 2 and repeat the cert creation step.
2) Verify that the cert is owned by vpopmail:qmail. If it's not, then make it so like this:
chown vpopmail:qmail /var/qmail/control/servercert.pem
Alright! If you have reached this point, then Qmail is now successfully up and running. Technically speaking, you could quit right here and have a functioning mail server. However, we still have a few options that we're going to plug into Qmail before we're done. In the next pages we will:
Install Courier IMAP & IMAP SSL.
Install Squirrelmail web based mail interface (requires that IMAP be installed).
Install Qmail-Scanner, an alternative queueing device.
Install Spamassassin, to tag all incoming spam.
Install Clam Anti Virus - To quarantine e-mails containing known viruses
Install qmailanalog, so that you can get nightly server stats.
Install Qtrap, to filter out messages containing undesirable words that may make it past Spamassassin.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:40

Part 12 - Installing Courier IMAP & IMAP SSL








The next step varies slightly depending on whether you're installing on Redhat or on Debian. Please choose the appropriate selection below

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:40


Part 12 - Installing Courier IMAP & IMAP SSL
(Debian)
Now that you have Qmail up and running, we're going to add a few extras onto it. For starters, we're going to install Courier IMAP & IMAP SSL. This will, obviously, enable IMAP connections to the mail server and it is a necessary ingredient for most popular web based mail clients such as Horde, SQwebmail and Squirrelmail. Courier IMAP is the preferred IMAP server to install because it has built in support the vchkpw mail user setup that Vpopmail utilizes. In short, Courier IMAP works with Vpopmail and virtual domains.
So let's install it....
apt-get install courier-imap-ssl
Note 1: You may get a message stating that imap is already installed. I like to be safe, so on my Debian box I uninstalled imap with the command "apt-get remove courier-imap-ssl" and then reinstalled it with the above command
Note 2: You may get asked if you want a bunch of dependencies installed. Just answer yes (Y).
cd /etc/courier
vi imapd
change AUTHMODULES="authdaemon to AUTHMODULES="authvchkpw"
change AUTHMODULES_ORIG="authdaemon" to AUTHMODULES_ORIG="authvchkpw"
vi imapd-ssl
make sure IMAPDSSLSTART=YES
Save and exit.
Special note for people running a small home or office network:
If you are planning on having multiple users connect to your IMAP server from a single IP address, such as in a small home or office network, you may want to increase the "MAXPERIP" setting with the /usr/local/etc/imapd config file. This setting establishes the maximum number of IMAP connections that can be made from a single IP address. An example of this might be if you have a small office network runing on a single DSL or Cable IP address and your mail server is outside of that network. While each computer in your internal network may have it's own private IP address, to the outside world anyone coming from your network has the single routeable IP address assigned to your DSL or Cable connection. The default setting for "MAXPERIP" is 4 so f you have a similar network setup and more than 4 people trying to access your IMAP server, you may want to increase this setting accordingly to avoid connection errors. Within the /usr/local/etc/imapd file, the line you are looking for looks like this:
MAXPERIP=4
Now let's restart all the IMAP related services...
cd /etc/init.d
./courier-imap stop

./courier-authdaemon stop

./courier-imap-ssl stop

./courier-imap start

./courier-authdaemon start

./courier-imap-ssl start

If you've got "nmap" installed, run the command "nmap localhost". You should see both 143 and 993 now open and listening.
Now let's test it...
telnet localhost 143
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE STARTTLS] Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc. See COPYING for distribution information.
a login postmaster@mydomain.com my_password
a OK LOGIN Ok. (successful login!)
a logout (logs you out)
* BYE Courier-IMAP server shutting down
a OK LOGOUT completed
Connection closed by foreign host.

Hint: The "a" that you see before my login commands is required.
If you were able to log in , as in the example above, you're all set. IMAP is installed!

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:40

Part 13 - Installing Squirrelmail








The next step varies slightly depending on whether you're installing on Redhat or on Debian. Please choose the appropriate selection below

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:40

Part 13 - Installing Squirrelmail
Now that we have Qmail running with IMAP, we can install a webmail client to make mail accessible via a web browser. My choice for this was Squirrelmail. Squirrelmail is both easy to install and it has lots of nice plugins to broaden its abilities. I know that a lot of people out there like to use Horde. I like Horde myself and I've installed it on my Qmail server alongside Squirrelmail. However, Horde is a major pain in the ass to install. Anyone who's ever intalled it will tell you that. I just don't want to take the responsibility for it on this site. Some people also like to use SQwebmail. No offense, but I don't like SQwebmail.
Anyway, let's install Squirrelmail...
The first order of business to make sure PHP is installed and correctly configured. So let's get that out of the way...
In order for Squirrelmail to work correctly, you'll need to check a couple things about your PHP installation:
1. First of all, make sure some rendition of PHP 4 is installed. If it's not, kick yourself in the ass and then go install it. Sorry, I'm not going to give a PHP installation tutorial. To be safe, you will want the following config options to be active in your PHP installation.
--enable-track-vars
--enable-force-cgi-redirect
--with-gettext
--with-mysql
If you're running Redhat, however, PHP can be easily installed as an RPM either manually or with "up2date". A default RPM installation of PHP will usually cover you. The only extra RPMs you'll want to install is "php-mysql".
2. Make sure you have PHP uploads turned ON. This is done by editing a line in your php.ini file. The location of the php.ini file can vary, but it's usually located at /etc/php.ini. If it's not, don't panic. Just run the old "locate php.ini" command. Wink Here's the line you will want to check/edit:
file_uploads = On
That's it for the PHP setup. Now let's download Squirrelmail...
You can download the latest stable version of Squirrelmail from: http://www.squirrelmail.org/download.php
I recommend downloading the .tar.gz version of the latest release.
Now change directories to the web directory of the website you want to serve Squirrelmail off of. In my case, I used /var/www/html
tar zxvf /path/to/squirrelmail-x.x.x.tar.gz (enter whatever version you downloaded)
Now rename the untarred folder to something more friendly...
mv squirrelmail-x.x.x webmail
And now let's configure Squirrelmail...
mkdir /var/sqattachements
chown -R apache:apache /var/sqattachements (or whatever user apache runs as)
cd webmail
chown -R apache:apache data (or whatever user apache runs as)
cd config
./conf.pl
This will run the Squirrelmail setup script which will allow you to customize the installation as well as set your server settings. Most of the important settings are in area #2, which is dubbed "Server Settings". Here are the specs I recommend:
General
-------
1. Domain : 1.2.3.4 (Enter the IP of your server here. Don't be an idiot and actually use 1.2.3.4)
2. Invert Time : false
3. Sendmail or SMTP : SMTP

IMAP Settings
--------------
4. IMAP Server : localhost
5. IMAP Port : 143
6. Authentication type : login
7. Secure IMAP (TLS) : false
8. Server software : other
9. Delimiter : detect

SMTP Settings
-------------
4. SMTP Server : localhost
5. SMTP Port : 25
6. POP before SMTP : false
7. SMTP Authentication : login
8. Secure SMTP (TLS) : false


Depending on what version of Squirrelmail you are installing, the setup menu may differ slightly. But you get the idea. If you like, there a several other features of Squirrelmail you can customize that, while not critical, are sometimes fun. Also, check out Squirrelmail's site for tons of cool plugins. Make sure you save all settings before exiting the configuration menu.
Once you've configured Squirrelmail to your liking, it's time to configure Apache to serve our new webmail interface...
Notice: The following Apache configuration entry below will show you what I MYSELF have for my server's Apache configuration. Apache configurations will vary, so this may or may not work for you. Also, this is not meant to be a lesson in how to configure Apache. If you are confused about configuring Apache, I would reccomend that you STOP here and go find a tutorial on Apache. Please do not email me asking me to explain Apache configuration methods to you. I am currently working on a comprehensive Apache tutorial site (apacherocks.org), but until it's complete, you will need to seek Apache help and advice elsewhere.
There are probably about a million ways to do this, but here's what I do. I edit the httpd.conf Apache configuration file and add the following block:
1.2.3.4:80>
ServerName mail.mydomain.com

ServerAlias mail.*
ServerAdmin postmaster@mydomain.com
DocumentRoot /var/www/webmail

Here's a breakdown of what's above:
- This indicates I'm setting up my mail interface as a virtual host, rather than IP based. Obviously, you're going to want to replace 1.2.3.4 with the IP address of your web server. Additionally, what you have here may vary from server to server and is dependent on how you have your Apache configured. Be cautious!
ServerName mail.mydomain.com - The official name of the webmail server virtual host.
ServerAlias mail.* - This line establishes a wildcard serveralias called mail.*. With this setup, any domain that is pointed to your server and that has an A record called "mail", will be able to get to the webmail interface by simply going to http://mail.whateverdomain.com. This is a pretty cool little feature and makes accessing the webmail interface easy for all of your users.
ServerAdmin postmaster@mydomain.com - The server administrative contact. This is not required, but I like to include it.
DocumentRoot /var/www/webmail - The document root of your webmail interface. This will vary, depending on where you chose to install Squirrelmai. In this example, you can see that I installed it at /var/www/webmail
- The closing tag to the virtualhost.
Make sure you restart Apache after making the above changes.
Ok, now that Apache is all configured, let's test the new webmail interface...
http://www.yourdomain.com/webmail
We'll sign in with the postmaster account under the domain you should have created earlier using Vqadmin...
Username: postmaster@yourdomain.com
Password: your_password
If all has gone well, Squirrelmail should log your right into your account! From here you will be able to both send and receive mail as well as a host of other additional functions. Again, Squirrelmail has tons of really cool plugins, and you can check them out at Squirrelmail's plugins page. Installing the plugins is pretty easy and their site can help you out. Now that was nice and painless, wasn't it? If I had tried to explain installing Horde instead, you would probably be holding a gun to your head right now, wishing for quick end to the misery. OK, I'm only kidding. :)

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:41

Part 14 - Clam Antivirus & SpamAssassin








The next step varies slightly depending on whether you're installing on Redhat or on Debian. Please choose the appropriate selection below

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:43

[table cellSpacing=0 cellPadding=0 width=801 border=0][tr][td vAlign=top]

Part 14 - Clam Antivirus & SpamAssassin
(Debian)

[/td][/tr]
[tr][td vAlign=top]Alright, the next 2 steps are going to be the trickiest of the entire installation. First, on this page, we're going to install Clam Antivirus and Spamassassin. Then, on the next page, we will install qmail-scanner which will tie ClamAV and Spamassassin into the operation of our qmail server. I'm going to warn you again that these next two steps are typically a pain in the ass. I am constantly trying to make these steps as universal and easy as possible, but the ease of these steps depends heavily on how your system is configured and how experienced you are. If you've never done this before, you can pretty much bet you're going to have a problem or 2 along the way. But don't give up. If you get into a bind, feel free to consult the qmailrocks mailing list, mailing list archive, IRC channel or chat forum. Using these 4 resources, you've got an excellent chance of getting any help you may need. OK, it's time to put some hair on your chest!
First, let's make sure you have all the required perl modules and required packages. All of the perl modules below are required for Spamassassin and Qmail-Scanner to work. I'll talk more about this further down in the install.
The following Perl Modules/packages are required:
Digest::SHA1
Digest::HMAC

Net::DNS
Time::HiResHTML::Tagset
HTML::Parser

Pod::Usage
Parse::Syslog

Interpreters::Storable
Statistics::Distributions
You will also need these other packages:
perl-suid
unzip


- Helpful Hints -
Checking/Installing Perl Modules

How do I know if my server has these perl modules?
The following script will check your system for the above modules.
You MUST run this script as a NON-ROOT user!!
/downloads/qmailrocks/scripts/util/check_perlmods.script
If you see an output similar to this: /usr/local/lib/perl5/site_perl/5.6.1/mach/Time/HiRes.pm , you're good to go! However, if you get a "not found" type response for any of the above modules, you will need to install them.
Ok, so if I don't have the module(s), how do I down and install it(them)?
Apt-get makes easy work of this. Here's the syntax for installing each of the above modules:
apt-get install libdigest-sha1-perl
apt-get install libdigest-hmac-perl
apt-get install libnet-dns-perl
apt-get install libtime-hires-perl
apt-get install libhtml-parser-perl
apt-get install libparse-syslog-perl
apt-get install libstorable-perl
Viola! All better.
Ok, so at this point you should have all 4 of the above Perl modules installed on your system. So let's install Clam Anti Virus and then Spammassin..
Installing Clam Anti Virus..
cd /downloads/qmailrocks/
tar zxvf clamav-x.xx..tar.gz
cd clamav-x.xx
useradd -s /sbin/nologin -d /tmp clamav
groupadd clamav
useradd -s /sbin/nologin -d /bin/false qscand
groupadd qscand
./configure --prefix=/usr --sysconfdir=/etc
make && make check && make install
mkdir /var/log/clamav /var/lib/clamav

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:43

chown -R clamav:clamav /var/log/clamav /var/lib/clamav
Now we'll do a few configuration settings to the /etc/clamd.conf file...
vi /etc/clamd.conf
"Example" - should be commented out.
"LogFile" - should be set to /var/log/clamav/clamd.log
"LogTime" - should be uncommmented.
"LogSyslog" - should be uncommented.

"PidFile" - should be uncommented and set to /var/run/clamav/clamd.pid
"User" - should be set to qscand

"ScanMail" - should be uncommented.
And some settings to the /etc/freshclam.conf file...
vi /etc/freshclam.conf
"Example" - should be commented out.
DatabaseDirectory - should be uncommented and set to /var/lib/clamav

Ok, Clam AV is now installed, but let's go ahead and set it up so that it will auto-update every night with the latest virus definitions! First we will want to set up the proper logging for the updater....
/usr/bin/freshclam -l /var/log/clamav/clam-update.log
If the server is able to get updates, you should see an output similar to this:
ClamAV update process started at Thu Dec 16 16:14:51 2004
Downloading main.cvd
[*]
main.cvd updated (version: 28, sigs: 26630, f-level: 3, builder: tomek)
Downloading daily.cvd
[*]
daily.cvd updated (version: 633, sigs: 1794, f-level: 3, builder: tkojm)
Database updated (28424 signatures) from database.clamav.net (24.73.112.74).

Woohoo! You're updated with the latest virus definiations from the Clam database!
Now we just set a crontab to run every night, which will run the auto-update procedure! In the example below, I've set mine to run every day at 1:35 AM. The odd run time came reccomended from ClamAV, if you're wondering. Running freshclam at times other than the top of an hour reduces the load on their servers. so feel free to adjust the time to something even more offbeat, like 1:33 AM or something. The guys at ClamAV will thank you.
crontab -e (make sure you run this command as root)
35 1 * * * /usr/bin/freshclam --quiet -l /var/log/clamav/clam-update.log
Now save your new crontab and exit.
Now we need to create an init script for clamd...
cp /downloads/qmailrocks/scripts/misc/debian_clamd /etc/init.d/clamd
mkdir /var/run/clamav
chown -R qscand:qscand /var/run/clamav
And now let's crank up clamd...
/etc/init.d/clamd stop
/etc/init.d/clamd start
If clamd has started successfully, a "ps -aux | grep clamd " command should reveal it...
qscand 11613 0.0 0.5 5972 4984 ? S 07:17 0:00 /usr/sbin/clamd
Once you have clamd successfully operating, let's configure the server so that clamd will start up on boot. Fortunately, Debian has a utility made just for doing this..
update-rc.d clamd start 75 2 3 4 5 .
The above command should create the needed init symlinks for the 2, 3, 4 and 5 runlevels. You're all set!
We're all done with Clam AV. Now let's install SpamAssassin...
cd /downloads/qmailrocks
tar zxvf Mail-SpamAssassin-3.0.2.tar.gz
cd Mail-SpamAssassin-3.0.2
perl Makefile.PL (answer all questions. Use the default answers provided if you are unsure)
make && make install
Ok, Spamassassin is installed. Let's make some tweaks. First, we're going to add a user/group called "spamd" under which Spamassassin will be run...
groupadd spamd
useradd -g spamd -s /bin/false -m -d /home/spamassassin spamd
Next, we set the spam threshold value and rewrite subject variable...
vi /etc/mail/spamassassin/local.cf
Replace the contents of the local.cf file with the following config settings:
rewrite_subject 1
required_hits 5

Save and exit from the file.
And now, let's put a Spamassassin startup script in place...
cp /downloads/qmailrocks/scripts/misc/debian_spamd /etc/init.d/spamd
mkdir /var/run/spamd
chown -R spamd:spamd /var/run/spamd
The init script contains a variable specifying the location of spamd. Let's make sure it's correct. First, find out where spamd resides...
whereis spamd
You should get an answer like /usr/local/bin/spamd or /usr/bin/spamd or something like that. Make a note of where spamd is located.
Now, open the /etc/init/dspamd init script for editing....
vi /etc/init.d/spamd
Make sure that the following variable reflect the correct location of spamd:
DAEMON=/correct/path/to/spamd
And now let's crank up Spamassassin...
/etc/init.d/spamd stop
/etc/init.d/spamd start
If spamd has started successfully, a "ps -aux | grep spam " command should reveal it...
spamd 283 0.0 2.1 21152 19328 ? S 04:33 0:01 /usr/local/bin/spamd -x -u spamd -H /home/spamd -d --pidfile=/var/run/spamd/spamd.pid
spamd 339 0.0 2.1 21152 19328 ? S 04:33 0:00 spamd child
spamd 340 0.0 2.1 21152 19328 ? S 04:33 0:00 spamd child
spamd 341 0.0 2.1 21152 19328 ? S 04:33 0:00 spamd child
spamd 342 0.0 2.1 21152 19328 ? S 04:33 0:00 spamd child
spamd 343 0.0 2.1 21152 19328 ? S 04:33 0:00 spamd child

Once you have spamassin successfully operating, let's configure the server so that spamd will start up on boot. We'll do this just like we did with clamd...
update-rc.d spamd start 75 2 3 4 5 .
The above command should create the needed init symlinks for the 2, 3, 4 and 5 runlevels. You're all set!
If all has gone well, both Spamassassin and Clam Anti Virus should now be installed! With both of these programs installed, we can now install qmail-scanner.[/td][/tr][/table]

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:45

Part 15 - qmail-scanner w/qms-analog
(Debian)

If you will recall, when we compiled qmail earlier in this installation, we applied a patch to qmail called "qmailqueue.patch". This patch allows qmail to be configured to run with a substitute queuing mechanism. That's exactly what were about to do here. We're going to tell qmail to use Qmail-Scanner as the queuing mechanism. Qmail-scanner is going to allow us to integrate Clam Antivirus and SpamAssassin into our qmail server's mail queue. Once qmail-scanner is installed, there will be a master script that is filled with configuration options that help you to tailor the functionality of Clam Antivirus and SpamAssassin to your needs. To expand the number of configuration options, we are also going to apply a patch to qmail-scanner. For this patch, we will be using Mark Teel's qms-analog patch. Qms-analog incorporated the widely used qmail-scanner-st patch but it also adds some cool reporting functionality as well which we will utilize later in this installation guide. So let's get on it!

cd /downloads/qmailrocks

Unpack qmail-scanner...

tar zxvf qmail-scanner-1.25.tgz

Now unpack qms-analog...

tar zxvf qms-analog-0.4.2.tar.gz

Install qms-analog itself. This will come in handy in the next step when we install Qmailanalog.

cd qms-analog-0.4.2

make all

Next, we copy needed qms-analog files to the qmail-scanner source directory...

cp qmail-scanner-1.25-st-qms-YYYYMMDD.patch /downloads/qmailrocks/qmail-scanner-1.25/

Now, let's apply the qms-analog patch...

cd /downloads/qmailrocks/qmail-scanner-1.25

patch -p1 < qmail-scanner-1.25-st-qms-YYYYMMDD.patch

Now we will configure qmail-scanner and install it. Ordinarily, you would run the ./configure script to configure and install qmail-scanner. However, Mark Teel has donated a handy little config script that does most of the work for you.This script is called "qms-config-script" and, if you look above, you should have already copied this config script into the qmail-scanner source directory.

How you go about configuring and installing qmail-scanner from this point on depends on how you server's installation of Perl is configured. For the purposes of this installation, there are 2 Perl setups.

1. Perl is configured to allow for setuid functions.

2. Perl is not configured for setuid functionality and, in fact, does not permit it.

We'll start off with the configuration step for a server that allows setuid. However, if you run into setuid errors, you can jump to a set of instructions for servers that do not allow setuid functionality.

So let's do it...

First, you need to configure the script for your needs...

cd /downloads/qmailrocks/qmail-scanner-1.25

vi qms-config

You will notice several fields that need to be customized to fit your needs. Let's have a look. I've highlighted the fields you should customize in RED

#!/bin/sh

if [ "$1" != "install" ]; then
INSTALL=
else
INSTALL="--install"
fi

./configure --domain yourdomain.com \
--admin postmaster \
--local-domains "yourdomain.com,yourotherdomain.com" \
--add-dscr-hdrs yes \
--dscr-hdrs-text "X-Antivirus-MYDOMAIN" \
--ignore-eol-check yes \
--sa-quarantine 0 \
--sa-delete 0 \
--sa-reject no \
--sa-subject ":SPAM:" \
--sa-delta 0 \
--sa-alt yes \
--sa-debug no \
--notify admin \
"$INSTALL"

Now save and exit out of the config file. That was easy, wasn't it.

And now we will run a test config for qmail-scanner...

chmod 755 qms-config

./qms-config

Answer YES to all questions. If you get no errors, you can then run the script in "install" mode and this will install qmail-scanner on your server.

If the config test produced any error messages, stop here!

If you got a "setuid" related error when you ran the above script it is most likely due to you Perl installation not supporting setuid functionality. You can click here for alternate non-setuid configuration instructions.

If you get any other errors, check out these troubleshooting tips.


If you didn't get any errors on the test run above, then you should be ok to run the "real" installation script below. So let's do it...

./qms-config install

Again, answer YES to all questions. If you get no errors, you can then run the script in "install" mode and this will install qmail-scanner on your server. If you do get errors, check out these troubleshooting tips.

The install script will create the Qmail-Scanner script at /var/qmail/bin/qmail-scanner-queue.pl Assuming everything goes well and you don't get any errors, it's now time to test the qmail-scanner installation....

setuidgid qmaild /var/qmail/bin/qmail-scanner-queue.pl -g

If the initial test is successful, you should see the following output:

perlscanner: generate new DB file from /var/spool/qmailscan/quarantine-attachments.txt
perlscanner: total of 9 entries.

Woohoo, qmail-scanner is installed correctly. Now it's time to tie qmail-scanner into qmail itself.

vi /var/qmail/supervise/qmail-smtpd/run

To instruct Qmail to use Qmail-Scanner as the alternative queuing mechanism, we add the following line to the SMTP "run" script right under the first line (#!/bin/sh):

QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" ; export QMAILQUEUE

..and we change the "softlimit" in that same script...

change softlimit to 40000000

Note: It is absolutely vital that you change the "Softlimit" setting in this script. If you don't, qmail may fail to deliver mail!!!

So now the qmail-smtp/run file should look like this:

#!/bin/sh
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" ; export QMAILQUEUE
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi
exec /usr/local/bin/softlimit -m 40000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/var/qmail/bin/qmail-smtpd your_domain.com \
/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1

Once you've got the qmail-smtpd file modified, save the changes and exit from the file. Now we will finalize the qmail-scanner installation by going over some post-install configuration options. After that, we'll fire everything up and take qmail-scanner for a test drive!

Click Here to continue



If your Perl installation does NOT allow for setuid functionality

cd /downloads/qmailrocks/qmail-scanner-1.25/contrib

make install

Now we will customize the qmail-scanner configuration script...

cd /downloads/qmailrocks/qmail-scanner-1.25

cp /downloads/qmailrocks/qms-analog-0.4.2/qms-config-script-cwrapper ./

vi qms-config-cwrapper

You will notice several fields that need to be customized to fit your needs. Let's have a look. I've highlighted the fields you should customize in RED

#!/bin/sh

if [ "$1" != "install" ]; then
INSTALL=
else
INSTALL="--install"
fi

./configure --domain yourdomain.com \
--admin postmaster \
--local-domains "yourdomain.com,yourotherdomain.com" \
--add-dscr-hdrs yes \
--dscr-hdrs-text "X-Antivirus-MYDOMAIN" \
--ignore-eol-check yes \
--sa-quarantine 0 \
--sa-delete 0 \
--sa-reject no \
--sa-subject ":SPAM:" \
--sa-delta 0 \
--sa-alt yes \
--sa-debug no \
--notify admin \
--skip-setuid-test \
"$INSTALL"

Now save and exit out of the config file. That was easy, wasn't it.

And now we will run a test config for qmail-scanner...

chmod 755 qms-config-cwrapper

./qms-config-cwrapper

Answer YES to all questions. If you get no errors, you can then run the script in "install" mode and this will install qmail-scanner on your server. If you do get errors, check out these troubleshooting tips.

./qms-config-cwrapper install

Again, answer YES to all questions. If you get no errors, you can then run the script in "install" mode and this will install qmail-scanner on your server. If you do get errors, check out these troubleshooting tips.

vi /var/qmail/bin/qmail-scanner-queue.pl

Then change the first line of /var/qmail/bin/qmail-scanner-queue.pl
to "#!/usr/bin/perl (in other words, remove the "-T" from the perl call.)

chmod 0755 /var/qmail/bin/qmail-scanner-queue.pl

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:45

The install script will create the Qmail-Scanner script at /var/qmail/bin/qmail-scanner-queue.pl Assuming everything goes well and you don't get any errors, it's now time to test the qmail-scanner installation....

/var/qmail/bin/qmail-scanner-queue -g

If the initial test is successful, you should see the following output:

perlscanner: generate new DB file from /var/spool/qmailscan/quarantine-attachments.txt
perlscanner: total of 9 entries.

Woohoo, qmail-scanner is installed correctly. Now it's time to tie qmail-scanner into qmail itself.

vi /var/qmail/supervise/qmail-smtpd/run

To instruct Qmail to use Qmail-Scanner as the alternative queuing mechanism, we add the following line to the SMTP "run" script right under the first line (#!/bin/sh):

QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue" ; export QMAILQUEUE

..and we change the "softlimit" in that same script...

change softlimit to 40000000

Note: It is absolutely vital that you change the "Softlimit" setting in this script. If you don't, qmail may fail to deliver mail!!!

So now the qmail-smtp/run file should look like this:

#!/bin/sh
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue" ; export QMAILQUEUE
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi
exec /usr/local/bin/softlimit -m 40000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/var/qmail/bin/qmail-smtpd your_domain.com \
/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1

Once you've got the qmail-smtpd file modified, save the changes and exit from the file. Now we will finalize the qmail-scanner installation by going over some post-install configuration options. After that, we'll fire everything up and take qmail-scanner for a test drive!

Click Here to continue




To activate all the changes we just made, we're going to have to completely stop and restart qmail.

Stop it...

qmailctl stop

and start it...

qmailctl start

And a quick check of the qmail processes, just to be safe..

qmailctl stat

Now it's time to test the whole damn thing to see if Qmail-Scanner, Spamassassin and Clam AV are all working correctly. Fortunately, Qmail-Scanner comes with it's own testing script that does a fantastic job. So let's test it!

cd /downloads/qmailrocks/qmail-scanner-1.25/contrib

chmod 755 test_installation.sh

./test_installation.sh -doit

A successful test should produce the following output. 2 messages should be quarantined by Clam Antivirus in /var/spool/quarantine/new and 2 messages should be set to whatever mailbox you specified in the Qmail-scanner configuration script. Don't worry if you don't get virus notification emails. The normal notification emails that get sent out upon virus detection usually don't work during the test.

setting QMAILQUEUE to /var/qmail/bin/qmail-scanner-queue.pl for this test...

Sending standard test message - no viruses...
done!

Sending eicar test virus - should be caught by perlscanner module...
done!

Sending eicar test virus with altered filename - should only be caught by commercial anti-virus modules (if you have any)...

Sending bad spam message for anti-spam testing - In case you are using SpamAssassin...
Done!

Finished test. Now go and check Email for postmaster@mydomain.com

If you get 2 messages in your inbox and you see 2 messages in the quarantine folder, it's time to crack open a cold one! You've successfully installed all 3 packages! Woohoo!

- Helpful Hints -

Post Install configuration tips for Qmail-Scanner

Although Qmail-Scanner should work pretty much "out of the box" so to speak, you can make some customizations to it's configuration by editing the qmail-scanner-queue.pl script located at /var/qmail/bin/qmail-scanner-queue.pl. The qmail-scanner-queue.pl script controls a lot of the functionality of both Clam AV and Spamassassin. Check it out for yourself and you will see that there are quite a few items you have control over. I wouldn't recommend touching most of them. In fact, the only setting that I changed in mine is in the Spamassassin section:

Can I have Spamassassin tag suspected spam with a custom subject line?

Yes. Edit the /var/qmail/bin/qmail-scanner-queue.pl file and find the following line:

my $spamc_subject=``;

Now type a custom spam subject. This subject line will be added to any mails that Spamassassin tags as suspected spam. Here's an example:

my $spamc_subject=`Hi, I'm Spam`;

The "spamc_subject" setting determines what message Spamassassin will append to the "subject" of e-mails which it deems as SPAM.

Can I delete e-mails that Spamassassin labels as spam?

Yes. Edit the /var/qmail/bin/qmail-scanner-queue.pl file and find the following line:

my $sa_delete='0';

Now replace the '0' with a number that represents how far above your SpamAssassin "required_hits" variable that Qmail-scanner should start deleting messages at. For example, if you SpamAssassin required_hits variable is set to "5" and you set the "sa_delete" variable to "1.0", then any message that has a spam score of 1.0 over the "5" mark would be deleted. In other words, any mail with a score of 6 or more would be trashed automatically. So for this example, you would change the "sa_delete" variable as follows:

my $sa_delete='1.0';

Is is safe to tell qmail-scanner to delete e-mails that SpamAssassin marks as spam?

Spamassassin has been tested to have up to a 99% accuracy rating in terms of detecting real spam and leaving legitimate e-mail alone. I've been using it for over a year now and have never gotten a false positive. Therefore, I feel safe in telling it to just delete the stuff.

There are a host of other Spam and Virus handling directives that can be customized with the qmail-scanner.pl file. You can check out the qmail-scanner patch website at http://xoomer.virgilio.it/j.toribio/qmail-scanner/ for all the details.

Other than that, I left my qmail-scanner-queue.pl script as is.


Summary of functionality:

If you've gotten to this point, you should have Clam Anti-Virus, Spamassassin and Qmail-Scanner all working together. When a messages comes into the server, Qmail-Scanner takes the message and pipes it out to both Clam Anti-Virus and Spamassassin. If the message contains a virus, Clam AV quarantines it a /var/spool/qmailscan/quarantine and then send a notification e-mail to whoever you specified in the Qmail-Scanner installation. If the message does not contain a virus, it is then scanned by Spamassassin. Depending on the score that Spamassassin assigns to the message and whether or not that score breaks the SPAM threshold set by you in the /var/qmail/.spamassassin/user_prefs file, Spamassassin will either let the message go unaltered to its destination or it will tag the message as SPAM. If the message is tagged as SPAM, it will still arrive at its destination, but with an altered "subject" that will signal to the recipient that this was tagged as SPAM. The text that gets appended to the "subject" of the e-mail is set in the /var/qmail/bin/qmail-scanner-queue.pl file. (For example: If you set qmail-scanner-queue.pl to tag all SPAM with "HI, I'M SPAM!", mail tagged as such will be delivered to the recipient with "HI, I'M SPAM" added to the subject. Once the message is tagged, the recipient can then configure his/her mail client to deal with those tagged message in whatever manner he/she sees fit.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Admin Bir Çarş. Mayıs 07 2008, 03:46

Part 16 - QmailAnalog w/qlogtools & qms-analog
Qmailanalog performs some basic log analysis on those qmail log files and then outputs them to a desired location. In my case, I run qmailanalog every night and output the results to e-mail. Along with qmailanalog, we're going to install the "qlogtools" package. Qlogtools, as its name implies, provides an array of tools which can be used to analyze the qmail logs. We're going to use one of the qlogtool packages, tai64n2tai, to convert the timestamps on the log files from a machine readable format to a human readable format which will come to us when we get the finished report. After we've installed both Qmailstats and Qlogtools, we will create a script which you can run on a nightly basis to generate e-mail stats. The script will also incorporation qms-analog, which we installed with qmail-scanner previously. The qms-analog output will give add qmail-scanner stats to our nightly report.
First, let's install qmailanalog...
cd /downloads/qmailrocks/
tar zxvf qmailanalog-0.70.tar.gz
cd qmailanalog-0.70
RH 9/RHEL/Fedora/Slackware users: You will need to patch qmailanalog with an additional errno patch:
patch < /downloads/qmailrocks/patches/0.70-errno.patch
make && make setup check
That's it. Qmailanalog is installed!
Now let's install qlogtools...
cd /downloads/qmailrocks/
tar zxvf qlogtools-3.1.tar.gz
cd qlogtools-3.1
RH 9/RHEL/Fedora/Slackware users: You will need to patch qlogtools with an additional errno patch:
patch < /downloads/qmailrocks/patches/qlogtools_errno.patch
mkdir /usr/local/man (if directory already exists, you're good to go)
make
./installer
OK. The qlogtools library of tools should now be installed.
Now we will implement a script to run Qmailanalog and then you can hook that script into the server's crontab to get stats generated every night.
The script below is a solid script that sends an email to the server administrator with both the qmailanalog output as well as qms-analog's readout of qmail-scanner's activities. Pretty sweet, huh?
cp /downloads/qmailrocks/qms-analog-0.4.2/qmailstats /var/qmail/bin
vi /var/qmail/bin/qmailstats

#!/bin/sh
## qms-analog and qmailanalog invocation script
##
## Note: For better readability of the nightly stats email, set your email
## client font to a fixed width font - then all the columns line up
## very nicely.
##

PATH=/usr/local/qmailanalog/bin:/var/qmail/bin:/bin:/usr/bin:/usr/local/bin
QMAILSTATS="/tmp/q.$$"
EMAILMSG="/tmp/qms.$$"
umask 077
DATE=`date +'%D'`

## prepare qmail log entries for qmailanalog routines
cat /var/log/qmail/qmail-send/* /var/log/qmail/qmail-pop3d/* /var/log/qmail/qmail-smtpd/* | tai64n2tai | awk '{$1=substr($1,1,index($1,".")+6);print}' | matchup > $QMAILSTATS 5>/dev/null

## build the email message header
echo "To: your_postmaster@yourdomain.com" > $EMAILMSG
echo "From: your_postmaster@yourdomain.com" >> $EMAILMSG
echo "Subject: Nightly Qmail Stats Report for $DATE" >> $EMAILMSG
echo "" >> $EMAILMSG
echo "" >> $EMAILMSG

## qms-analog invocation
#
# USAGE: qms-analog hours-of-history
#
# hours-of-history (0 - n) hours of history to collect
# 0 => all records
# sort-key (optional) sort key for account statistics
# msgbw (default) msg bandwidth - successful msgs
# alpha alphanumeric by account name
# virus number of viruses received
# saavg Spamassassin avg score
# sadet Spamassassin msgs detected
#
# Examples:
# "qms-analog 24" - use only records within the last 24 hours,
# sort by msg bandwidth
# "qms-analog 168" - use only records within the last 7 days,
# sort by msg bandwidth
# "qms-analog 0" - use all records, sort by msg bandwidth
# "qms-analog 0 alpha" - use all records, sort alphabetically
# "qms-analog 0 saavg" - use all records, sort by Spam average score
#
# Note: Add or remove statistical time frames to suit your preference -
# "last 24 hours" and "all records" are uncommented below by default.
##

#### Last 24 hours
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~ L a s t 2 4 H o u r s ~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
cat /var/spool/qmailscan/qms-events.log | qms-analog 24 >> $EMAILMSG
####

#### Last 7 days
#echo "" >> $EMAILMSG
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~ L a s t 7 D a y s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
#cat /var/spool/qmailscan/qms-events.log | qms-analog 168 >> $EMAILMSG
####

#### Last 30 days
#echo "" >> $EMAILMSG
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
#echo "~~~~~~~~~~~~~~~~~~~~~~~~~~ L a s t 3 0 D a y s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
#cat /var/spool/qmailscan/qms-events.log | qms-analog 5040 >> $EMAILMSG
####

#### All records in qms-events.log
echo "" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~ A l l R e c o r d s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
cat /var/spool/qmailscan/qms-events.log | qms-analog 0 >> $EMAILMSG
####

## qmailanalog invocation
echo "" >> $EMAILMSG
echo "" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
zoverall < $QMAILSTATS >> $EMAILMSG
echo "" >> $EMAILMSG
echo "" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
zfailures < $QMAILSTATS >> $EMAILMSG
echo "" >> $EMAILMSG
echo "" >> $EMAILMSG
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $EMAILMSG
zdeferrals < $QMAILSTATS >> $EMAILMSG
echo "" >> $EMAILMSG

## pipe the message into qmail-inject
cat $EMAILMSG | qmail-inject

## delete temp files
rm -f $QMAILSTATS
rm -f $EMAILMSG

Now set the script executable...
chmod 750 /var/qmail/bin/qmailstats
Now run the script...
/var/qmail/bin/qmailstats
Check your email and you should get a report with some pretty cool stuff in it! Your report should look something like this.
OK, if the qmailstats script is working, you will now want to create a crontab entry to run this script every night.
So, as the "root" user let's set up a cron entry...
crontab -e
0 3 * * * /var/qmail/bin/qmailstats 1>/dev/null 2>/dev/null
Save and exit from the crontab editor and you should be all set. The above entry will run the qmailstats script every night at 3:00AM.

_________________
rüzgar ne kadar güçlü essede;kayadan götüreceği tozdur...



۞ Forumumuzu Yaşatan O Sizin Güzel yorumlarınızdır YORUMLARINIZI EKSİK ETMEYİN ۞

Admin
site yöneticisi
site yöneticisi

Erkek
Mesaj Sayısı : 846
Nerden : adana
İş/Hobiler : internet
Üye Puanı : 4
Forum Puanı : 113454
Kayıt tarihi : 23/03/08

Kullanıcı profilini gör http://internetalemi.forumsclub.com

Sayfa başına dön Aşağa gitmek

Geri: Debian Linux qmail kurulumu ayrıntılı anlatım 20 part!!!

Mesaj tarafından Sponsored content Bugün 17:57


Sponsored content


Sayfa başına dön Aşağa gitmek

1 sayfadaki 2 sayfası 1, 2  Sonraki

Önceki başlık Sonraki başlık Sayfa başına dön


 
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz