View previous topic :: View next topic |
Author |
Message |
vivi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Quake3/quake3_bones.gif)
Joined: 12 Jul 2003 Posts: 46 Location: Local Group Galaxy- Milky Way - Sol(ar) System - Earth - Europe - Belgium - Vlaanderen - Denderleeuw
|
Posted: Tue Feb 10, 2004 2:04 pm Post subject: Basic mailserver : qmail courier-imap and user DB |
|
|
Hi ,
I am a mailserver newbie who had read qmail is a good mailprogram.
Following the information on :
http://lifewithqmail.org
and
http://www.skunkworx.org/guides/QmailOnGentoo.txt
I have been able to install it
Now I use Sylpheed as mail client and want to run a IMAP service and SMTP service on my localhost.
What is the easy way to do this ? (I do not need full configuration , at least not for the moment)
Do I need other programs than qmail ?
How to add SMTP and IMAP users ?
Thanks,
Vivi
Last edited by vivi on Thu Feb 12, 2004 10:25 am; edited 2 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Diggs Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/148041757745523c7d2be73.jpg)
Joined: 07 Oct 2003 Posts: 239 Location: LoSt In NeT SpAcE
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
vivi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Quake3/quake3_bones.gif)
Joined: 12 Jul 2003 Posts: 46 Location: Local Group Galaxy- Milky Way - Sol(ar) System - Earth - Europe - Belgium - Vlaanderen - Denderleeuw
|
Posted: Thu Feb 12, 2004 10:19 am Post subject: |
|
|
Thanks a lot ,
The link :
https://forums.gentoo.org/viewtopic.php?t=111817
seems to be very interesting however still too!!! complicated for my setup as I need a BASIC setup. For now I do not need spam control , scanning , virus , etc....
How can the script from that link (doing a copy paste below) ,
be changed so I only have:
-an MTA : install qmail
-an account database : install vpopmail
-an LDA : ? install maildrop ?
-an IMAP interface : install courier-imap
-Admin tool : install qmailadmin
Futher at which points can you do
telnet smtp ?
telnet pop3 ?
telnet imap ?
Can I configure pine to use mailboxes for testing ?
Thanks,
Vivi
------------------------------------------------------------
Copy/paste :
1) ensure that the proper USE flags are set
Code:
> nano -w /etc/make.conf
add apache2, maildir, and mysql as USE flags.
2) install qmail
Code:
First of all, make sure that you unmerge the other mail handlers that may be installed, such as ssmtp, sendmail, or postfix:
> emerge -C ssmtp sendmail postfix
> emerge qmail
> ebuild /var/db/pkg/net-mail/qmail-1.03-r13/qmail-1.03-r13.ebuild config
> ln -s /var/qmail/supervise/qmail-send /service/qmail-send
> ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd
> rc-update add svscan default
> /etc/init.d/svscan start
3) install vpopmail
Code:
> emerge vpopmail
First log into mysql as your mysql root user and pass. Then:
> create database vpopmail;
> use mysql;
> grant select, insert, update, delete, create, drop on vpopmail.* to vpopmail@localhost identified by 'your password';
> flush privileges;
If you have problems with vpopmail not accepting mail properly,
please ensure that /etc/vpopmail.conf is chmod 600 and
owned by vpopmail:vpopmail
4) install spam database clients. net-ping and dcc may need to be force-emerged.
Code:
> emerge pyzor
> emerge /usr/portage/dev-perl/net-ping/net-ping-2.31.ebuild
> emerge razor
> emerge /usr/portage/net-mail/dcc/dcc-1.2.28.ebuild
5) install f-prot and Mail-SpamAssassin. they must be running before installing qmail-scanner.
Code:
> emerge f-prot Mail-SpamAssassin
> nano -w /etc/conf.d/spamd.conf
SPAMD_OPTS="-d -u vpopmail -v -x -C /etc/mail/spamassassin/local.cf"
> rc-update add spamd default
> /etc/init.d/spamd start
You'll want to set up a cron.daily job to update the f-prot definitions automatically:
> nano -w /etc/cron.daily/virus-update.cron
#!/bin/bash
/opt/f-prot/check-updates.pl -cron -quiet
> chmod 755 /etc/cron.daily/virus-update.cron
> crontab -e
# min hour day month weekday command
0 1 * * * /etc/cron.daily/virus-update.cron
Now to set up spam processing rules:
> nano -w /etc/mail/spamassassin/local.cf
required_hits 5.0
rewrite_subject 1
subject_tag *****SPAM*****
report_safe 1
report_header 1
use_bayes 1
auto_learn 1
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
ok_languages all
ok_locales all
6) install qmail-scanner. for this to work, you may have to force the install of maildrop.
Code:
> emerge /usr/portage/net-mail/maildrop/maildrop-1.5.3-r1.ebuild
> emerge qmail-scanner
Please log into the "qmaild" account and run
/var/qmail/bin/qmail-scanner-queue.pl -g
If you see the error "Can't do setuid", or "Permission denied", then
refer to the FAQ.
(e.g. "setuidgid qmaild "/var/qmail/bin/qmail-scanner-queue.pl -g"
or "su qmaild -c "/var/qmail/bin/qmail-scanner-queue.pl -g")
The 'subject_tag' variable in /etc/mail/sendmail/local.cf does not seem to change the subject of detected spam. As a workaround, do this:
> nano -w /var/qmail/bin/qmail-scanner-queue.pl
my $spamc_subject='*****SPAM*****';
Now update tcp.smtp to activate qmail-scanner
> nano -w /etc/tcp.smtp
# Qmail-Scanner disabled for mail from 127.0.0.1
127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-queue"
# Qmail-Scanner enabled (virus only) for mail from local network
192.168.1.:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
# Qmail-Scanner enabled (virus and spam) for mail from external internet
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
save tcp.smtp and then:
> tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
> chmod 644 /etc/tcp.smtp*
7) install courier-imap as imap and pop3 server
Code:
> emerge courier-imap
> nano -w /etc/courier-imap/authdaemonrc
authmodulelist="authvchkpw"
> nano -w /etc/courier-imap/imapd
IMAPDSTART=YES
MAILDIR=Maildir
> nano -w /etc/courier-imap/pop3d
POP3DSTART=YES
MAILDIR=Maildir
> rc-update add courier-imapd default
> rc-update add courier-pop3d default
> /etc/init.d/courier-imapd start
> /etc/init.d/courier-pop3d start
update the smtpd config to allow smtp-auth using vpopmail
Code:
> nano -w /var/qmail/control/conf-smtpd
QMAIL_SMTP_POST="mail.mydomain.com /var/vpopmail/bin/vchkpw /bin/true"
> svc -t /var/qmail/supervise/qmail-smtpd
> chmod u+s /var/vpopmail/bin/vchkpw
The following step makes sending mail a lot faster under some circumstances, and I highly recommend that you do the following if you notice delays of 30 to 45 seconds sending mail:
> nano -w /var/qmail/control/conf-common
TCPSERVER_OPTS="-H -R -l 0" (that's lower-case L followed by zero)
9) install qmailadmin
Code:
> emerge ezmlm-idx-mysql
> wget http://www.inter7.com/devel/autorespond-2.0.2.tar.gz
> tar -zxvf autorespond-2.0.2.tar.gz
> cd autorespond-2.0.2
> make
> make install
> wget http://www.inter7.com/qmailadmin/qmailadmin-1.0.6.tar.gz
> tar -zxvf qmailadmin-1.0.6.tar.gz
> cd qmailadmin-1.0.6
> ./configure --enable-htmldir=/var/www/localhost/htdocs/ --with-htmllibdir=/var/www/localhost/htdocs/qmailadmin --enable-cgibindir=/var/www/localhost/cgi-bin/ --enable-autoresponder-bin=/usr/local/bin --enable-ezmlmdir=/usr/bin --enable-ezmlmidx=y --enable-vpopuser=vpopmail --enable-vpopgroup=vpopmail
> make
> make install |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Robelix l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1526712478443629230203f.gif)
Joined: 21 Jul 2002 Posts: 760 Location: in a World created by a Flying Spaghetti Monster
|
Posted: Fri Feb 27, 2004 1:33 pm Post subject: |
|
|
Hi vivi!
Is there any good reason that you use qmailadmin-1.0.6 and not the 1.2.0_rc2 from protage?
Robelix _________________ mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|