View previous topic :: View next topic |
Author |
Message |
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Wed Dec 03, 2003 10:04 pm Post subject: HOWTO: qmail vpopmail qmail-scanner courier squirrelmail |
|
|
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 |
8) 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 |
10) install squirrelmail
Code: | > emerge squirrelmail
> perl /var/www/localhost/htdocs/squirrelmail/config/conf.pl
set up squirrelmail
You can also set up the vpopmail squirrelmail plugin as follows. For this to work though, you'll need to run apache as vpopmail:vpopmail by editing /etc/apache2/conf/commonapache2.conf. This may be a security risk, so follow at your own risk:
> wget http://www.squirrelmail.org/plugins/vpopmail.1.00-1.4.0.tar.gz
> cd /<your squirrelmail dir>/plugins
> tar -zxvf /<location of vpopmail.1.00-1.4.0.tar.gz>
> cd vpopmail
> nano -w config.php
$vpopmail_autorespondpath = '/usr/local/bin';
> perl /var/www/localhost/htdocs/squirrelmail/config/conf.pl
activate the vpopmail plugin
|
Last edited by sabrex on Sat Feb 07, 2004 6:41 am; edited 18 times in total |
|
Back to top |
|
|
dodger10k Tux's lil' helper
Joined: 27 Jun 2003 Posts: 97
|
Posted: Sun Dec 07, 2003 2:14 am Post subject: |
|
|
First of all thanks for this howto. I set everything up as you wrote it and when booting everything seems to start properly.
But looking deeper qmailctl gives me this:
Quote: | /service/qmail-send: up (pid 11007) 1 seconds
/service/qmail-send/log: up (pid 6215) 784 seconds
/service/qmail-smtpd: up (pid 6217) 784 seconds
/service/qmail-smtpd/log: up (pid 6222) 784 seconds
find: queue/mess/*: No such file or directory
find: queue/todo/*: No such file or directory
messages in queue: -1
messages in queue but not yet preprocessed: -1 |
First of all I was wondering about the "-1" mails in queue but more I was wondering about the uptime of qmail-send, which obviously doesn´t seem to be correct.
And then a ps gives me this:
Quote: | root 1550 0.0 0.0 1316 228 ? S 02:44 0:00 readproctitle service errors: ...: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire qmail-send/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?
root 6210 0.0 0.0 1328 268 ? S 02:56 0:00 supervise qmail-send
root 6212 0.0 0.0 1328 264 ? S 02:56 0:00 supervise qmail-smtpd
qmaill 6215 0.0 0.0 1336 268 ? S 02:56 0:00 /usr/bin/multilog t s2500000 /var/log/qmail/qmail-send
qmaild 6217 0.0 0.0 2680 792 ? S 02:56 0:00 /usr/bin/tcpserver -p -v -R -x /etc/tcp.smtp.cdb -c 40 -u 201 -g 200 0.0.0.0 smtp /var/qmail/bin/qmail-smtpd mail.itaw.de /var/vpopmail/bin/vchkpw /bin/true
qmaill 6222 0.0 0.0 1336 268 ? S 02:56 0:00 /usr/bin/multilog t s2500000 /var/log/qmail/qmail-smtpd
qmails 11942 0.0 0.0 0 0 ? Z 03:12 0:00 [qmail-send] <defunct>
root 11948 0.0 0.0 1532 488 pts/0 R 03:12 0:00 grep qmail
|
What´s going wrong here? Any hints would be appreciated |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Mon Dec 08, 2003 2:19 am Post subject: |
|
|
not 100% sure what the problem could be, but it looks like it could be related to the smtp-auth step (step 10). If you don't need smtp-auth, then you don't need to follow step 10. Try to reverse the changes you made in step 10 and see if that fixes things up. Also, this howto assumes that you are running 1.03-r13 or higher. If not, then I suggest doing an `emerge qmail` again to update it.
also, re-run the tcprules command from step 9 just to be safe, since your errors seem to indicate something may be wrong with tcp.smtp.cdb ... |
|
Back to top |
|
|
SpoKKe n00b
Joined: 05 Feb 2003 Posts: 43
|
Posted: Mon Dec 08, 2003 12:26 pm Post subject: :( pop3 auth failed |
|
|
Hi,
I've tried to install all the mailservers programs indicated in your simple and very util post, the installation was perfect, no erros no problem, the only problem is that the pop3 auth fail !!
I've installed vqadmin for create the virtual domains under vpopmail, i create the domain then the mail account, then i try to auth whit my mail-client and always the same error :
Dec 8 13:25:24 elk pop3d: Connection, ip=[80.182.80.113]
Dec 8 13:25:24 elk pop3d: LOGIN: DEBUG: ip=[80.182.80.113], command=USER
Dec 8 13:25:24 elk pop3d: LOGIN: DEBUG: ip=[80.182.80.113], command=PASS
Dec 8 13:25:24 elk pop3d: LOGIN: DEBUG: ip=[80.182.80.113], username=XXXXXX
Dec 8 13:25:24 elk pop3d: LOGIN: DEBUG: ip=[80.182.80.113], password=XXXXXXX
Dec 8 13:25:24 elk authdaemon: authdaemon: s_connect() failed: Connection refused
Dec 8 13:25:29 elk pop3d: LOGIN FAILED, ip=[80.182.80.113]
Dec 8 13:25:30 elk pop3d: LOGIN: DEBUG: ip=[80.182.80.113], command=QUIT
Dec 8 13:25:30 elk pop3d: Disconnected, ip=[80.182.80.113]
Can you tell me someting about it?
I can't debug more specfic errors with courier ;(
Tnks
Spokke |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Mon Dec 08, 2003 5:40 pm Post subject: |
|
|
spokke, make sure that you have followed step 7. Specifically, make sure that authmodulelist only contains authvchkpw, and no other modules. |
|
Back to top |
|
|
SpoKKe n00b
Joined: 05 Feb 2003 Posts: 43
|
Posted: Mon Dec 08, 2003 6:05 pm Post subject: OK :) |
|
|
Now I'll try to reemerge the complete procedure
But i'va another question regard the point 7:
Why you change the MAILDIR variable from .maildir to Maildir?
The default qmail gentoo installation change the Maildir in .maildir, why you make another change?
(sorry for my english it'snt good) |
|
Back to top |
|
|
salk n00b
Joined: 05 Aug 2003 Posts: 37 Location: Johannesburg, South Africa
|
Posted: Tue Dec 09, 2003 11:35 am Post subject: ezmlm |
|
|
Hi sabrex,
Absolutly brilliantly easy howto
I have been looking for something like this for ages.
now... linking up ezmlm ... do you know if its a hassle ? what do you suggest. _________________ Steven Mac Intyre
http://steven.macintyre.name |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Tue Dec 09, 2003 7:10 pm Post subject: Re: ezmlm |
|
|
salk wrote: | Hi sabrex,
Absolutly brilliantly easy howto
I have been looking for something like this for ages.
now... linking up ezmlm ... do you know if its a hassle ? what do you suggest. |
Thanks I got pretty frustrated setting up qmail/vpopmail myself, so after I finally figured it all out, decided to write a howto. Partly so I'd have a reference for the future, and also to help out the great Gentoo community...
As for ezmlm, here's step 11 ... although I'm not sure if it will do exactly what you want it to. This is for setting up qmailadmin, which utilizes ezmlm, though I'm not sure if it uses the ezmlm-idx-mysql package or not. You may just want to emerge ezmlm-idx instead if things don't work out.
11) install qmailadmin
Code: | > emerge qmail-autoresponder ezmlm-idx-mysql
> wget http://www.inter7.com/qmailadmin/qmailadmin-1.0.6.tar.gz
> tar -zxvf qmailadmin-1.0.6.tar.gz
> ./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/bin --enable-vpopuser=vpopmail --enable-vpopgroup=vpopmail --enable-ezmlmdir=/usr/bin --enable-ezmlmidx=y
> make
> make install |
|
|
Back to top |
|
|
salk n00b
Joined: 05 Aug 2003 Posts: 37 Location: Johannesburg, South Africa
|
Posted: Wed Dec 10, 2003 7:08 am Post subject: |
|
|
Hi All,
Not sure if anyone else will get this ... but i usually get the crap
I had to add qmail as a group before emerging qmail. _________________ Steven Mac Intyre
http://steven.macintyre.name |
|
Back to top |
|
|
capitanjackal n00b
Joined: 26 Aug 2003 Posts: 69 Location: Quarata (CALIFORNIA)
|
Posted: Thu Dec 11, 2003 9:56 am Post subject: |
|
|
compliments for this howto!
but a simple question:
how can I know if qmail-scanner is going ?
Are scand and spamd logs reported in:
/var/log/mail/current ?
Strange thing:
su qmaild -c "/var/qmail/bin/qmail-scanner-queue.pl -g", give me the prompt without warning, while doppione etc # setuidgid qmaild "/var/qmail/bin/qmail-scanner-queue.pl -g" give:
setuidgid: fatal: unable to run /var/qmail/bin/qmail-scanner-queue.pl -g: file does not exist
I think that my problem is the suid of perl...
thanks
Giacomo _________________ Meglio una Fiat 500 con 500 watts che una Fiat Punto con punti watts!
PS: ho comprato la punto! sono un l00s3r |
|
Back to top |
|
|
Ritter n00b
Joined: 26 Nov 2003 Posts: 15
|
Posted: Fri Dec 19, 2003 7:46 pm Post subject: clamav |
|
|
I cant seem to prove that the clamav is really doing anything, I can send myself all forms of the eicar test virus signature and always get:
Code: | Received: from ***@mydomain.tld by yorke by uid 201 with qmail-scanner-1.16
(clamscan: 0.60. spamassassin: 2.60. Clear:SA:0(0.1/5.0):.
Processed in 2.197057 secs); 19 Dec 2003 19:36:20 -0000 |
Can anyone suggest how to prove or verify that clamav is really working?
I have this in /var/spool/qmailscan/qmail-queue.log:
Code: | 19/12/2003 12:36:18:7407: +++ starting debugging for process 7407 by uid=201 at 19/12/2003 12:36:18
19/12/2003 12:36:18:7407: setting UID to EUID so subprocesses can access files generated by this script
19/12/2003 12:36:18:7407: program name is qmail-scanner-queue.pl, version 1.16
19/12/2003 12:36:18:7407: incoming SMTP connection from via smtp from 24.2.89.214
19/12/2003 12:36:18:7407: w_c: mkdir /var/spool/qmailscan/yorke10718625784267407
19/12/2003 12:36:18:7407: w_c: start dumping incoming msg into /var/spool/qmailscan/working/tmp/yorke10718625784267407 [1071862578.18521]
19/12/2003 12:36:18:7407: w_c: rename new msg from /var/spool/qmailscan/working/tmp/yorke10718625784267407 to /var/spool/qmailscan/working/new/yorke10718625784267407 [1071862578.18873]
19/12/2003 12:36:18:7407: d_m: starting /usr/bin/reformime -x/var/spool/qmailscan/yorke10718625784267407/ </var/spool/qmailscan/working/new/yorke10718625784267407 [1071862578.18925]
19/12/2003 12:36:18:7407: d_m: finished /usr/bin/reformime -x/var/spool/qmailscan/yorke10718625784267407/ [1071862578.20244]
19/12/2003 12:36:18:7407: d_m: Checking all attachments to see if they're MS-TNEF
19/12/2003 12:36:18:7407: d_m: is /var/spool/qmailscan/yorke10718625784267407/1071862578.7409-0.yorke is a TNEF file?: 256 [1071862578.20759]
19/12/2003 12:36:18:7407: d_m: is /var/spool/qmailscan/yorke10718625784267407/eicar.com is a TNEF file?: 256 [1071862578.21203]
19/12/2003 12:36:18:7407: d_m: Manually unpack any zip files as some virus scanners don't do zip under Unix!
19/12/2003 12:36:18:7407: d_m: unpacking message took 0.023407 seconds
19/12/2003 12:36:18:7407: unsetting QMAILQUEUE env var
19/12/2003 12:36:18:7407: g_e_h: return-path is "jlarson@candlefire.org", recips is "jakl@candlefire.org"
19/12/2003 12:36:18:7407: from=Jason k Larson <jlarson@candlefire.org>,subj=test, x-qmail-scanner-message-id=<3FE35301.9040103@candlefire.org> via smtp from 24.2.89.214
19/12/2003 12:36:18:7407: ini_sc: start scanning
19/12/2003 12:36:18:7407: p_s: starting scan of directory "/var/spool/qmailscan/yorke10718625784267407"...
19/12/2003 12:36:18:7407: p_s: '81:ILOVEYOU' = 'Virus-subject' = 'Love Letter Virus/Trojan'
19/12/2003 12:36:18:7407: p_s: type is a header!
19/12/2003 12:36:18:7407: p_s: checking for objects containing subject: ILOVEYOU
19/12/2003 12:36:18:7407: p_s: '82:message/partial' = 'Virus-content-type' = 'Message/partial MIME attachments blocked by policy'
19/12/2003 12:36:18:7407: p_s: type is a header!
19/12/2003 12:36:18:7407: p_s: checking for objects containing content-type: message/partial
19/12/2003 12:36:18:7407: p_s: '85:.{100,}' = 'Virus-date' = 'MIME Header Buffer Overflow'
19/12/2003 12:36:18:7407: p_s: type is a header!
19/12/2003 12:36:18:7407: p_s: checking for objects containing date: .{100,}
19/12/2003 12:36:18:7407: p_s: '86:.{100,}' = 'Virus-mime-version' = 'MIME Header Buffer Overflow '
19/12/2003 12:36:18:7407: p_s: type is a header!
19/12/2003 12:36:18:7407: p_s: checking for objects containing mime-version: .{100,}
19/12/2003 12:36:18:7407: p_s: '87:.{100,}' = 'Virus-resent-date' = 'MIME Header Buffer Overflow'
19/12/2003 12:36:18:7407: p_s: type is a header!
19/12/2003 12:36:18:7407: p_s: checking for objects containing resent-date: .{100,}
19/12/2003 12:36:18:7407: p_s: type is a header!
19/12/2003 12:36:18:7407: p_s: 'eicar.com' = '69' = 'EICAR Test Virus'
19/12/2003 12:36:18:7407: p_s: type is a size!
19/12/2003 12:36:18:7407: p_s: 'happy99.exe' = '10000' = 'Happy99 Trojan'
19/12/2003 12:36:18:7407: p_s: type is a size!
19/12/2003 12:36:18:7407: p_s: 'zipped_files.exe' = '120495' = 'W32/ExploreZip.worm.pak virus'
19/12/2003 12:36:18:7407: p_s: type is a size!
19/12/2003 12:36:18:7407: p_s: skipping auto-generated file 1071862578.7409-0.yorke
19/12/2003 12:36:18:7407: p_s: checking eicar.com against perlscanner database...
19/12/2003 12:36:18:7407: p_s: file eicar.com is lowercased to eicar.com and has extension .com
19/12/2003 12:36:18:7407: p_s: compare eicar.com against perlscanner database
19/12/2003 12:36:18:7407: p_s: finished scan of dir "/var/spool/qmailscan/yorke10718625784267407" in 0.007507 secs
19/12/2003 12:36:18:7407: ini_sc: recursively scan the directory /var/spool/qmailscan/yorke10718625784267407/
19/12/2003 12:36:18:7407: scanloop: starting scan of directory "/var/spool/qmailscan/yorke10718625784267407"...
19/12/2003 12:36:18:7407: clamscan: starting scan of directory "/var/spool/qmailscan/yorke10718625784267407"...
19/12/2003 12:36:18:7407: run /usr/bin/clamscan -r --tempdir=/var/spool/qmailscan/yorke10718625784267407 --disable-summary --unzip --unrar --unace --unarj --zoo --lha --jar --tar --tgz /var/spool/qmailscan/yorke10718625784267407 2>&1
19/12/2003 12:36:18:7407: --output of clamscan was:
--
19/12/2003 12:36:18:7407: clamscan: finished scan of dir "/var/spool/qmailscan/yorke10718625784267407" in 0.403599 secs
19/12/2003 12:36:18:7407: SA: run /usr/bin/spamc -c -f < /var/spool/qmailscan/working/new/yorke10718625784267407
19/12/2003 12:36:18:7407: spamassassin: finished scan of dir "/var/spool/qmailscan/yorke10718625784267407" in 1.746304 secs
19/12/2003 12:36:18:7407: scanloop: finished scan of "/var/spool/qmailscan/yorke10718625784267407"...
19/12/2003 12:36:18:7407: ini_sc: scanning message took 2.158656 seconds
19/12/2003 12:36:18:7407: q_r: fork off child into /var/qmail/bin/qmail-queue...
19/12/2003 12:36:18:7407: cleanup: /bin/rm -rf /var/spool/qmailscan/yorke10718625784267407/ /var/spool/qmailscan/working/new/yorke10718625784267407
19/12/2003 12:36:20:7407: all finished. Total of 2.391649 secs |
Any help figuring this out would be greatly appreciated.
Last edited by Ritter on Fri Dec 26, 2003 7:46 pm; edited 1 time in total |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Sat Dec 20, 2003 2:19 am Post subject: Re: clamav |
|
|
Ritter wrote: | I cant seem to prove that the clamav is really doing anything, I can send myself all forms of the eicar test virus signature and always get:
<snip>
Any help figuring this out would be greatly appreciated. |
Go through step 5 again. I have made some changes recently that may accomplish this, although I haven't tested it much. Tell me if making those changes makes a difference. |
|
Back to top |
|
|
soroh6 Apprentice
Joined: 07 Nov 2002 Posts: 232
|
Posted: Wed Dec 24, 2003 4:25 am Post subject: SquirrelMail? |
|
|
Um.. so, I go to mydomain/squirrelmail, but it won't let me login..
Just says invalid user/pass.. any ideas? Heh.
-edit-
Hm, I can't even login via localhost:143 ... _________________ :: soroh -*~ |
|
Back to top |
|
|
Guybrush Tux's lil' helper
Joined: 06 Feb 2003 Posts: 99 Location: 48°27'N, 11°8'O
|
Posted: Wed Dec 24, 2003 2:01 pm Post subject: |
|
|
THANKS ALOT!
My email-Server which was already running qmail (for smtp and pop3), courier-imap (for imap) and vpopmail for authenticating all 3 protocols didn't function well after upgrading my qmail-installation. But after following the steps (leaving out the spam things) got it up and running again.
I'm going to try to include SpamAssassin for Spam filtering as described in this thread soon.
And btw, has anyone tried to include a virus scanner as well?
Once again, great tutorial. |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Thu Dec 25, 2003 5:55 pm Post subject: |
|
|
Guybrush wrote: |
And btw, has anyone tried to include a virus scanner as well?
|
The section on spamassassin also covers virus filtering via clamav. |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Fri Dec 26, 2003 1:07 am Post subject: |
|
|
I'm having problems getting it to authenticate. I cannot send nor check mail, it always tells me that "Login Failed"
I don't know which log files I should post, so could someone please help me out?
Thanks!
EDIT: I've gotten qmailadmin and vqadmin working fine now.
EDIT2: Now I have the problem of getting logins working. I can't login and I do not know what is wrong. I have created the users, and they are in the database, but I do not know why they keep giving me login failed, both with Thunderbird and with Squirrelmail (which I may not have set up correctly to deal with virtual domains)
Thanks for your help! |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Sat Dec 27, 2003 5:35 am Post subject: |
|
|
irasnyd wrote: | I'm having problems getting it to authenticate. I cannot send nor check mail, it always tells me that "Login Failed"
I don't know which log files I should post, so could someone please help me out? |
Step 7 is the most important here. Specifically, make sure that you have removed all other authmodules other than vchkpw. You do not need to set up squirrelmail to work with vpopmail. If courier-imap is set up to use vchkpw, then squirrelmail will automatically do the same.
As for the log files, the login info would be in the files in /var/log/mail/ |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Sat Dec 27, 2003 11:40 am Post subject: |
|
|
I've just looked at it alot longer, and have turned on logging in both the courier-imapd and courier-pop3d. They both are getting the correct usernames and passwords. (as far as I know the username should be of the form ira@mydomain.com (with the domain after it. I have tried it both with and without))
EDIT: I now have it logging in via Mozilla Thunderbird, but squirrelmail still is not working.
What I had to change to get it working was to change /etc/courier-imap/imapd and /etc/courier-imap/pop3d
Code: |
AUTHMODULES="authvchkpw"
|
I don't have any idea why squirrelmail isn't working, so if anyone knows please do tell.
Here is my /etc/courier-imap/authdaemonrc file:
Code: |
root@server root # cat /etc/courier-imap/authdaemonrc
##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
#
# Copyright 2000-2001 Double Precision, Inc. See COPYING for
# distribution information.
#
# authdaemonrc created from authdaemonrc.dist by sysconftool
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# This file configures authdaemond, the resident authentication daemon.
#
# Comments in this file are ignored. Although this file is intended to
# be sourced as a shell script, authdaemond parses it manually, so
# the acceptable syntax is a bit limited. Multiline variable contents,
# with the \ continuation character, are not allowed. Everything must
# fit on one line. Do not use any additional whitespace for indentation,
# or anything else.
##NAME: authmodulelist:0
#
# The authentication modules that are linked into authdaemond. The
# default list is installed. You may selectively disable modules simply
# by removing them from the following list. The available modules you
# can use are: authcustom authcram authuserdb authvchkpw authmysql authpam
authmodulelist="authvchkpw"
##NAME: authmodulelistorig:1
#
# This setting is used by Courier's webadmin module, and should be left
# alone
authmodulelistorig="authcustom authcram authuserdb authvchkpw authmysql authpam"
##NAME: daemons:0
#
# The number of daemon processes that are started. authdaemon is typically
# installed where authentication modules are relatively expensive: such
# as authldap, or authmysql, so it's better to have a number of them running.
# PLEASE NOTE: Some platforms may experience a problem if there's more than
# one daemon. Specifically, SystemV derived platforms that use TLI with
# socket emulation. I'm suspicious of TLI's ability to handle multiple
# processes accepting connections on the same filesystem domain socket.
#
# You may need to increase daemons if as your system load increases. Symptoms
# include sporadic authentication failures. If you start getting
# authentication failures, increase daemons. However, the default of 5
# SHOULD be sufficient. Bumping up daemon count is only a short-term
# solution. The permanent solution is to add more resources: RAM, faster
# disks, faster CPUs...
daemons=5
##NAME: version:0
#
# When you have multiple versions of authdaemond.* installed, authdaemond
# just picks the first one it finds. Set "version" to override that.
# For example: version=authdaemond.plain
version=""
##NAME: authdaemonvar:0
#
# authdaemonvar is here, but is not used directly by authdaemond. It's
# used by various configuration and build scripts, so don't touch it!
authdaemonvar=/var/lib/courier-imap/authdaemon
|
Any ideas what is wrong? Anything else I can post to help make debugging this easier?
Thanks. |
|
Back to top |
|
|
guitard00d Tux's lil' helper
Joined: 19 Dec 2003 Posts: 81 Location: Minatare, NE, USA, Earth
|
Posted: Sun Dec 28, 2003 9:07 am Post subject: Re: HOWTO: qmail vpopmail qmail-scanner courier squirrelmail |
|
|
Well, I followed your instructions to the letter and it appears that everything is working because I can send mail to root@ my domain.
But, since I'm new to qmail, I don't know how to create virtual domains and create user accounts (I'm talking about non-system accounts). I've been using sendmail for years and when I switched to Gentoo, I decided that it would be better to switch to qmail because of the virtual domain features and added security.
Would you know of a HOWTO for administering this setup for virtual domains? _________________ I know you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant...
--Richard Nixon |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Sun Dec 28, 2003 7:42 pm Post subject: Re: HOWTO: qmail vpopmail qmail-scanner courier squirrelmail |
|
|
guitard00d wrote: | Well, I followed your instructions to the letter and it appears that everything is working because I can send mail to root@ my domain.
But, since I'm new to qmail, I don't know how to create virtual domains and create user accounts (I'm talking about non-system accounts). I've been using sendmail for years and when I switched to Gentoo, I decided that it would be better to switch to qmail because of the virtual domain features and added security.
Would you know of a HOWTO for administering this setup for virtual domains? |
You can either use qmailadmin to administer accounts via the web, or use the vpopmail binaries located in /var/vpopmail/bin (I recommend the latter)
- To add a new domain with vpopmail, run `vadddomain yourdomain.com` ... it will ask you to set up a postmaster password.
- To add a new user, run `vadduser user@yourdomain.com password` ... if you leave out the password, it will ask you to create one for the user.
Those are the main two commands needed to get you up and running. valiasdomain creates an alias to the domain itself, so that all_users@domain2.com will have an alias to all_users@domain1.com. valias simply creates an alias to the email address itself. Just play around with them and you'll get the hang of it.
Note, qmailadmin currently handles valias differently than the vpopmail binaries. I suggest sticking to one or the other for alias administeration. valias uses the mysql database, whereas qmailadmin uses qmail files (for aliases only, it still uses mysql for everything else). Future versions of qmailadmin will use the valias binary, but that is not yet the case. |
|
Back to top |
|
|
guitard00d Tux's lil' helper
Joined: 19 Dec 2003 Posts: 81 Location: Minatare, NE, USA, Earth
|
Posted: Sun Dec 28, 2003 9:58 pm Post subject: |
|
|
sabrex wrote: | spokke, make sure that you have followed step 7. Specifically, make sure that authmodulelist only contains authvchkpw, and no other modules. |
I have the same problem, I have authmodulelist="authvchkpw" in my /etc/courier-imap/authdaemonrc and I've created a virtual domain using vadddomain, but when I try to log in as postmaster@[my domain] with imap or pop3, it always fails.
Any idea where else to look for the problem? I'm new to this qmail, vpopmail and courier thing, so I'm really wandering aimlessly trying to figure out what's what here. _________________ I know you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant...
--Richard Nixon |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Sun Dec 28, 2003 10:21 pm Post subject: |
|
|
guitard00d wrote: | I have the same problem, I have authmodulelist="authvchkpw" in my /etc/courier-imap/authdaemonrc and I've created a virtual domain using vadddomain, but when I try to log in as postmaster@[my domain] with imap or pop3, it always fails.
Any idea where else to look for the problem? I'm new to this qmail, vpopmail and courier thing, so I'm really wandering aimlessly trying to figure out what's what here. |
I take it that the domain is properly hosted through bind (named)? So `ping mail.yourdomain.com` resolves properly, etc? Also, are the entries going into the vpopmail mysql database properly when you add a domain, user, etc?
I really can't think of why else you can't log in. Make sure that the mysql database is indeed working, and that the username/password combination for the vpopmail database is the same as in /etc/vpopmail.conf |
|
Back to top |
|
|
guitard00d Tux's lil' helper
Joined: 19 Dec 2003 Posts: 81 Location: Minatare, NE, USA, Earth
|
Posted: Sun Dec 28, 2003 10:54 pm Post subject: |
|
|
sabrex wrote: | I take it that the domain is properly hosted through bind (named)? So `ping mail.yourdomain.com` resolves properly, etc? Also, are the entries going into the vpopmail mysql database properly when you add a domain, user, etc?
I really can't think of why else you can't log in. Make sure that the mysql database is indeed working, and that the username/password combination for the vpopmail database is the same as in /etc/vpopmail.conf |
I can ping mail.maxgfx.net and it definitely resolves and the MySQL database is working because I can look at it in phpmyadmin and see all the users in vpopmail.vpopmail table. Obivously vadddomain and vadduser are talking to MySQL, otherwise those entries wouldn't be in there. It just appears that courier-imapd and courier-pop3d can't read from the database.
Doesn't any of this software have any kind of logging facilites that would allow me to pinpoint the problem?
EDIT FOLLOW-UP
pop3d: /usr/lib/courier-imap/authlib/authvchkpw: No such file or directory
Why wouldn't that file exist? _________________ I know you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant...
--Richard Nixon |
|
Back to top |
|
|
guitard00d Tux's lil' helper
Joined: 19 Dec 2003 Posts: 81 Location: Minatare, NE, USA, Earth
|
Posted: Mon Dec 29, 2003 12:23 am Post subject: |
|
|
guitard00d wrote: | EDIT FOLLOW-UP
pop3d: /usr/lib/courier-imap/authlib/authvchkpw: No such file or directory
|
Is there any way to force courier-imap to build with authvchkpw included? Obviously something is broken in the ebuild because it's not detecting vpopmail installed on the system. That's the reason I can't authenticate via pop3 or imap on my system. Does anybody know a quick way to fix this or somehow force courier-imap to build this module? _________________ I know you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant...
--Richard Nixon |
|
Back to top |
|
|
sabrex n00b
Joined: 28 Nov 2003 Posts: 45
|
Posted: Tue Dec 30, 2003 2:40 am Post subject: |
|
|
guitard00d wrote: | guitard00d wrote: | EDIT FOLLOW-UP
pop3d: /usr/lib/courier-imap/authlib/authvchkpw: No such file or directory
|
Is there any way to force courier-imap to build with authvchkpw included? Obviously something is broken in the ebuild because it's not detecting vpopmail installed on the system. That's the reason I can't authenticate via pop3 or imap on my system. Does anybody know a quick way to fix this or somehow force courier-imap to build this module? |
I'm not sure, but I think you found out the cause of the problem, as I do indeed have that file in that directory. Other than making sure you have the correct USE flags before compiling, and compiling things in the same order as outlined in the HOWTO, I'm not sure what else to suggest. Perhaps unmerge (emerge -C) and the emerge all of the packages? |
|
Back to top |
|
|
|
|
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
|
|