View previous topic :: View next topic |
Author |
Message |
destr0yr Tux's lil' helper
Joined: 29 Nov 2003 Posts: 80 Location: Kelowna, BC.
|
Posted: Mon Jan 12, 2004 1:48 pm Post subject: |
|
|
Hi. Great howto.. followed it exactly (i think), however, i am having troubles with the .maildir and ./Maildir. When i create an account with vpopmail, it adds the domain/domain.com/username/.maildir I know i can run the vpopmail-Maildir-dotmaildir-fix.sh every time i create a new user, however, this is rather annoying... any suggestions? |
|
Back to top |
|
|
wetkitty n00b
Joined: 26 Sep 2003 Posts: 16 Location: Baker City, OR
|
Posted: Mon Jan 12, 2004 3:53 pm Post subject: Clamav |
|
|
Quote: | Are you absolutely sure it's working? I thought it was too, until I tried to send myself a test virus. |
Yes and no - The first day I set it up I sent a test virus and it worked properly, after you asked I sent another to double check and it came right on through. I'm running f-prot on the back up server since I borked the main one trying to switch away from clam av (permission problem I think, when I get a resolution I'll post it too)
Quote: | Have you figured out a way to automatically delete stuff from .Trash after it's been there for a while? A lot of my users are using regular pop3, and not imap, so they never even see the Trash folder. Would be nice if there was a way to automatically delete old stuff in that folder. |
/etc/courier-imapd/imapd
Code: | # IMAP_EMPTYTRASH=Trash:7,Sent:30 |
is the default, I changed mine to:
Code: | IMAP_EMPTYTRASH=Trash:3 |
_________________ 2x Sony VAIO FX-215's w/Stage1 installs |
|
Back to top |
|
|
nianderson Guru
Joined: 06 May 2003 Posts: 369 Location: Lawrence, KS
|
Posted: Mon Jan 12, 2004 6:55 pm Post subject: |
|
|
well it appears i have a problem with vpopmail ... after setting everything up and starting all the services .....
Code: |
/var/vpopmail/bin/vadddomain nanderson.com test
|
then
Code: |
/var/vpopmail/bin/vadddomain nick@nanderson.com test
|
run the fix maildir script just in case
Code: |
/var/vpopmail/bin/vpopmail-Maildir-dotmaildir-fix.sh
|
now check if i can login to my account
Code: |
telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
USER nick@nanderson.com
+OK Password required.
PASS test
-ERR Login failed.
|
any ideas?? |
|
Back to top |
|
|
JeffreyCentex n00b
Joined: 12 Jan 2004 Posts: 4 Location: New Braunfels, TX
|
Posted: Mon Jan 12, 2004 10:27 pm Post subject: |
|
|
Several Revisions here to help some people out...
First, the new vpopmail ebuilds use the .maildir format... So in this case, don't change the MAILDIR variable in the courier-imap ebuilds...
However, this breaks the QMAILADMIN ebuild which is hardcoded to use /Maildir... I patched my QmailAdmin sources to change the references to /.maildir and everything works...
--
Also, if people have a difficult time using authenticated SMTP, make sure you go to the conf-common file and change the following entries:
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
This will allow authenticated SMTP... (I'm not sure whether this is required or not for those of you using MySQL)...
--
I also have somewhat revised the howto to remove the MySQL integration.. This is proving much more stable on my machine and much easier to configure (VPOPMAIL and Courier did not want to authenticate with MySQL). If anyone wants to know these steps, post back... |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Mon Jan 12, 2004 10:46 pm Post subject: |
|
|
JeffreyCentex wrote: | Several Revisions here to help some people out...
First, the new vpopmail ebuilds use the .maildir format... So in this case, don't change the MAILDIR variable in the courier-imap ebuilds...
However, this breaks the QMAILADMIN ebuild which is hardcoded to use /Maildir... I patched my QmailAdmin sources to change the references to /.maildir and everything works...
--
Also, if people have a difficult time using authenticated SMTP, make sure you go to the conf-common file and change the following entries:
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
This will allow authenticated SMTP... (I'm not sure whether this is required or not for those of you using MySQL)...
--
I also have somewhat revised the howto to remove the MySQL integration.. This is proving much more stable on my machine and much easier to configure (VPOPMAIL and Courier did not want to authenticate with MySQL). If anyone wants to know these steps, post back... |
I'd like to know how to patch the qmailadmin ebuild to use .maildir instread of Maildir. I'd also like to know how to get everything working without mysql, it seems not to be working for me very well. |
|
Back to top |
|
|
JeffreyCentex n00b
Joined: 12 Jan 2004 Posts: 4 Location: New Braunfels, TX
|
Posted: Mon Jan 12, 2004 10:49 pm Post subject: |
|
|
I did it the hard way - grabbed a copy of qmailadmin, untarred it, ran grep to find out which files referred to /Maildir and edited them to refer to /.maildir...
I did the same with vqadmin...
I would expect the ebuilds for these will be modified soon to reflect the .maildir since the vpopmail change was recent. |
|
Back to top |
|
|
nianderson Guru
Joined: 06 May 2003 Posts: 369 Location: Lawrence, KS
|
Posted: Mon Jan 12, 2004 11:13 pm Post subject: |
|
|
maybe i am missing something but in step 7 if i change authmodule in /etc/courier-imap/pop3d to authvchkpw i can login as postmaster, but vpopmail dosnt appear to make any users with vadduser. all i see in /var/vpopmail/domains/nanderson.com is postmaster
and
Code: | mail nanderson.com # vadduser nick@nanderson.com
vadduser: error: user 'nick@nanderson.com' already exists.
mail nanderson.com # vuserinfo nick@nanderson.com
no such user nick@nanderson.com
mail nanderson.com # |
obviously something wrong with vpopmail or my config but i cant figure out what it is |
|
Back to top |
|
|
Diggs Apprentice
Joined: 07 Oct 2003 Posts: 239 Location: LoSt In NeT SpAcE
|
Posted: Tue Jan 13, 2004 4:06 am Post subject: |
|
|
JeffreyCentex wrote: |
First, the new vpopmail ebuilds use the .maildir format... So in this case, don't change the MAILDIR variable in the courier-imap ebuilds...
|
Sorry I don't understand a point:
1) In qmail's build i have to set:
Code: |
USE="maildir mysql etc etc..." emerge qmail vpopmail etc etc
|
Then i have to set ".maildir/" in qmail's conf or i leave it as it is? (standard "Maildir") _________________ IRCNET NICK: diggs on IRCNET
http://leonardo.netsons.org/
Gioca a Tremulous! Player [!!!] Diggs [ITA] |
|
Back to top |
|
|
nianderson Guru
Joined: 06 May 2003 Posts: 369 Location: Lawrence, KS
|
Posted: Tue Jan 13, 2004 4:22 am Post subject: |
|
|
i believe .maildir is the way qmail is by default as is courier-imap qmailadmin has Maildir hard coded and thats probabbly why you see alot of the changes to .maildir ect.... so
if you dont touch any config files .maildir will be what is used. if you want to use qmailadmin then you will either have to either go through the source and change Maildir to .maildir or change the config files to use Maildir (that includes the new vpopmail ebuild)
if im wrong im sure someone will correct me . |
|
Back to top |
|
|
Diggs Apprentice
Joined: 07 Oct 2003 Posts: 239 Location: LoSt In NeT SpAcE
|
Posted: Tue Jan 13, 2004 7:38 am Post subject: |
|
|
Well
I'm going to re-start the procedure following last additions for this how-to and fixing for qmailadmin.
Your Sincerely,
Leonardo Luzzi _________________ IRCNET NICK: diggs on IRCNET
http://leonardo.netsons.org/
Gioca a Tremulous! Player [!!!] Diggs [ITA] |
|
Back to top |
|
|
Diggs Apprentice
Joined: 07 Oct 2003 Posts: 239 Location: LoSt In NeT SpAcE
|
Posted: Tue Jan 13, 2004 9:31 am Post subject: |
|
|
YEAH! JeffreyCentex's additional notes are good! IT WORKS!!!
I'm very happy
I have only to fix qmailadmin - I will wait for it!!! _________________ IRCNET NICK: diggs on IRCNET
http://leonardo.netsons.org/
Gioca a Tremulous! Player [!!!] Diggs [ITA] |
|
Back to top |
|
|
Gatak Apprentice
Joined: 04 Jan 2004 Posts: 174
|
Posted: Tue Jan 13, 2004 2:22 pm Post subject: CRAM-MD5 |
|
|
There is a patch for vpopmail 5.3.27 at http://www.fehcom.de/qmail/smtpauth.html to allow it to work with CRAM-MD5 and replace the qmail's checkpassword program.
Also, I learned that vpopmail 5.4.0-rc2 will include CRAM-MD5 support. |
|
Back to top |
|
|
JeffreyCentex n00b
Joined: 12 Jan 2004 Posts: 4 Location: New Braunfels, TX
|
Posted: Wed Jan 14, 2004 4:48 am Post subject: |
|
|
Sorry... I've been away...
I actually followed the guide on page 1 and supplemented it with some of the instructions at http://www.qmailrocks.com.
If you build Courier IMAP and Vpopmail without MySQL support, it will work with no configuration (it puts a username and password file in the ~vpopmail/domains/mydomainname.com directory). I don't know if this was causing my problems when trying to use Authenticated SMTP from outside my local LAN, but changing to the vpopmail uid and gid in the qmail control file helped solve it on my end...
Also, if anyone is interested, you can add a domain wide filtering script that will automatically move spam mail to a spam folder as well as run any user maildrop filter scripts...
From Matt Simerson's toaster page:
Quote: |
Q: How do I add mail filtering for a domain using maildrop?
cd ~vpopmail/domains/example.com
fetch -o mailfilter http://www.tnpi.biz/internet/mail/toaster/etc/mailfilter-domain
echo "| /usr/local/bin/maildrop mailfilter" > .qmail
chown vpopmail:vpopmail mailfilter .qmail; chmod 600 mailfilter
Optional: Edit mailfilter to taste. |
Make sure you change your path references (this was written for FreeBSD). If you want to have any user scripts, put a .mailfilter file in your /.maildir directory.
I'll post post a copy of my mailfilter script tomorrow if anyone wants it...
Also, FWIW, clamav works OK on my system.... |
|
Back to top |
|
|
JeffreyCentex n00b
Joined: 12 Jan 2004 Posts: 4 Location: New Braunfels, TX
|
Posted: Wed Jan 14, 2004 4:59 am Post subject: |
|
|
Actually, here is my filter setup:
/etc/mail/maildrop
Code: |
SHELL="/bin/sh"
import EXT
import HOST
VPOP="| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/var/vpopmail/bin/vuserinfo -d $EXT@$HOST`
##
# title: mailfilter-domain
# author: Matt Simerson
# version 2.0
# http://www.tnpi.biz/internet/mail/toaster/etc/mailfilter-domain
#
# Usage: Install this file in ~vpopmail/domains/example.com/mailfilter
#
# Create a .qmail-default file with the following:
# "| maildrop /etc/mail/maildrop"
#
# After your satisifed that this is working properly, comment out all
# the lines that start with "log"
##
#log "==== BEGIN maildrop processing for $EXT@$HOST ==="
if ( $VHOME eq "" )
{
to "$VPOP"
}
##
# Comment out this section if you run SpamAssassin via qmailscanner
# Spamassassin is slow enough, no point in doubling your expense
#
# Note that if you want to pass a message larger than 250k to spamd
# and have it processed, you'll need to also set spamc -s. See the
# spamc man page for more details.
##
if ( $SIZE < 256000 ) # Filter if message is less than 250k
{
exception {
xfilter '/usr/bin/spamassassin'
}
}
##
# Include any rules set up for the user - this gives the
# administrator a way to override the domain's mailfilter file
#
# this is also the "suggested" way to set individual values
# for maildrop such as quota.
##
`test -r $VHOME/.mailfilter`
if( $RETURNCODE == 0 )
{
exception {
include $VHOME/.mailfilter
}
}
##
# create the maildirsize file if it doesn't already exist
# (could also be done via "deliverquota user@dom.com 10MS,1000C)
##
`test -e $VHOME/.maildir/.maildirsize`
if( $RETURNCODE == 1)
{
`/var/vpopmail/bin/vuserinfo -Q $EXT@$HOST`
`test -s "$VHOME/.maildir/.maildirsize"`
if ( $RETURNCODE == 0 )
{
`/usr/sbin/chown vpopmail:vpopmail $VHOME/.maildir/.maildirsize`
`/bin/chmod 640 $VHOME/.maildir/.maildirsize`
}
}
##
# Set MAILDIRQUOTA. If this isn't set, maildrop and deliverquota
# will not enforce quotas for message delivery.
#
# I find this much easier than creating yet another config file
# to store this in. This way, any time the quota is changed in
# vpopmail, it'll get noticed by maildrop immediately.
##
MAILDIRQUOTA=`/usr/bin/head -n1 $VHOME/.maildir/.maildirsize`
##
# The message should be tagged, so let's bag it.
##
if ( /^X-Spam-Status: *Yes/)
{
`test -d $VHOME/.maildir/.Spam` # make sure .Spam folder exists
if( $RETURNCODE == 1 )
{
`maildirmake -f Spam $VHOME/.maildir`
}
exception {
xfilter "/usr/bin/deliverquota $VHOME/.maildir/.Spam"
}
if( $RETURNCODE == 77)
{
to "|/var/qmail/bin/bouncesaying '$EXT@$HOST is over quota'"
}
exit
}
##
# Include any other rules that the user might have from
# sqwebmail or other compatible program
##
`test -r $VHOME/.maildir/.mailfilter`
if( $RETURNCODE == 0 )
{
exception {
include $VHOME/.maildir/.mailfilter
}
}
exception {
xfilter "/usr/bin/deliverquota $VHOME/.maildir"
}
##
# check to make sure the message was delivered
# returncode 77 means that out maildir was overquota - bounce mail
##
if( $RETURNCODE == 77)
{
to "|/var/qmail/bin/bouncesaying '$EXT@$HOST is over quota'"
}
|
In the domain directory under vpopmail (i.e., ~vpopmail/domains/mydomain.com), create or edit the following file:
.qmail-default
Code: |
| maildrop /etc/mail/maildrop
|
For personal rules, make a file named .mailfilter under your maildir directory (i.e., ~vpopmail/domains/mydomain.com/myusername/.maildir/.mailfilter).
Code: |
SHELL="/bin/sh"
import EXT
import HOST
VPOP="| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/var/vpopmail/bin/vuserinfo -d $EXT@$HOST`
if ( $VHOME eq "" )
{
LOG " ERROR: VHOME isn't set, falling back to vdelivermail"
LOG "=== EXIT === "
to "$VPOP"
}
###
#
# Computer Mailing List Forwards
#
###
if ( /alg@austinlug.org/)
{
xfilter "/usr/bin/deliverquota -c $VHOME/.maildir/.Computer-Mailing-Lists.Austin-LUG"
exit
}
if ( /alamo.satlug.org/)
{
xfilter "/usr/bin/deliverquota -c $VHOME/.maildir/.Computer-Mailing-Lists.San-Antonio-LUG"
exit
}
|
Replace the rules to match your configuration..
With this setup, you can have Qmail automatically sort the mail into subfolders, setup notifications, etc.
Hope this helps everyone.... |
|
Back to top |
|
|
cristi1979 Tux's lil' helper
Joined: 10 Nov 2003 Posts: 149
|
Posted: Thu Jan 15, 2004 1:11 pm Post subject: |
|
|
at step 8 i got this:
>svc -t /var/qmail/supervise/qmail-smtpd/
> ./run: line 1: Configuration: command not found
Anyone knows why? |
|
Back to top |
|
|
salk n00b
Joined: 05 Aug 2003 Posts: 37 Location: Johannesburg, South Africa
|
|
Back to top |
|
|
BlackB1rd Tux's lil' helper
Joined: 13 Aug 2003 Posts: 131 Location: /Europe/Netherlands/Haarlem
|
Posted: Sun Jan 18, 2004 11:22 pm Post subject: |
|
|
I've followed this howto, but didn't include vpopmail (don't need virtual domain support) and courier-pop3d. I was wondering if there is some way to activate the SpamAssassin with the qmail-pop3d? This is because I had already configured this mail server with qmail as smtp and pop3 server. It would be nice if I can set up the spamfilter for qmail |
|
Back to top |
|
|
destr0yr Tux's lil' helper
Joined: 29 Nov 2003 Posts: 80 Location: Kelowna, BC.
|
Posted: Mon Jan 19, 2004 3:35 am Post subject: |
|
|
BlackB1rd wrote: | I've followed this howto, but didn't include vpopmail (don't need virtual domain support) and courier-pop3d. I was wondering if there is some way to activate the SpamAssassin with the qmail-pop3d? This is because I had already configured this mail server with qmail as smtp and pop3 server. It would be nice if I can set up the spamfilter for qmail |
www.lifewithqmail.org
pretty much the same way you would without vpopmail... do the install or spamassassin (emerge Mail-Spamassassin) and a decent anti virus prog (clamav, fprot) then do qmail-scanner. make sure you edit the conf-common and the tcp.smtp to set the QMAILQUEUE variable to pass through qmail-scanner-queue.pl. |
|
Back to top |
|
|
BlackB1rd Tux's lil' helper
Joined: 13 Aug 2003 Posts: 131 Location: /Europe/Netherlands/Haarlem
|
Posted: Mon Jan 19, 2004 1:53 pm Post subject: |
|
|
destr0yr wrote: |
www.lifewithqmail.org
pretty much the same way you would without vpopmail... do the install or spamassassin (emerge Mail-Spamassassin) and a decent anti virus prog (clamav, fprot) then do qmail-scanner. make sure you edit the conf-common and the tcp.smtp to set the QMAILQUEUE variable to pass through qmail-scanner-queue.pl. |
Thanks, but I already did take those steps. My question is qmail-pop3d specific, is there some line I've to add in /var/qmail/control/conf-pop3d? The received mail doesn't seem to get trough the scanner, because there's no report in /var/spool/qmailscan/qmail-queue.log and no mail headers are re-written. Though, smtp works fine with this scanner. It's just that tiny pop3 thing |
|
Back to top |
|
|
Lillstrumpa n00b
Joined: 10 Dec 2003 Posts: 29 Location: Örebro, Sweden
|
Posted: Mon Jan 19, 2004 6:40 pm Post subject: |
|
|
When I try to do
Code: | /var/vpopmail/bin/vadduser user@stupidomain.something.com somepassword |
it tells me
Code: | vmysql: sql error[3]: Table 'vpopmail.vpopmail' doesn't exist |
Must have missed something but can anyone please give me a hint? |
|
Back to top |
|
|
destr0yr Tux's lil' helper
Joined: 29 Nov 2003 Posts: 80 Location: Kelowna, BC.
|
Posted: Mon Jan 19, 2004 8:47 pm Post subject: |
|
|
Lillstrumpa wrote: | Must have missed something but can anyone please give me a hint? |
set everything in vpopmail.conf ?
Code: |
nano -w /etc/vpopmail.conf
|
make sure you have mysql running and followed step #3 in the howto. |
|
Back to top |
|
|
Kilian n00b
Joined: 24 Jun 2002 Posts: 74 Location: Canada
|
Posted: Tue Jan 20, 2004 6:51 am Post subject: |
|
|
Been trying this for a few days now. SMTP-auth et alle seems to work fine, but whenever I send, the server replies with 'X-Q'. Inspection of my log files gets me this:
Quote: | Jan 19 23:39:43 blizzard X-Qmail-Scanner-1.16: [blizzard10745807824263035] Unable to close pipe to /var/qmail/bin/qmail-queue (#4.3.0) -
Jan 19 23:39:44 blizzard X-Qmail-Scanner-1.16: [blizzard10745807824263035] Unable to queue message (111). (#4.3.0) - Illegal seek |
Any hints? |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Tue Jan 20, 2004 4:50 pm Post subject: |
|
|
dylanr wrote: |
Code: | X-Spam-Status: No, hits=0.0 required=4.0 |
I figured this out. For anyone else having this problem, the issue is that SA's rules are installed into /usr/share/spamassassin. Copy/move them to /etc/mail/spamassassin and all is well.
|
Thanks!
And while we're at it, let's train our bayesian Filter for all users:
This is from the SpamAssassin Wiki
Quote: |
In local.cf, tell SpamAssassin where to find the Bayesian database files:
Code: | bayes_path /etc/mail/spamassassin/bayes |
This tells the system that the Bayesian filter database files will be /etc/mail/spamassassin/bayes_msgcount, _seen and _toks. Feel free to move it wherever you want.
Now start feeding the Bayesian filter spam and ham messages. Tell sa-learn to use /etc/mail/spamassassin as the configuration directory (i.e. where to find the bayes_msgcount, _seen and _toks files):
Code: | sa-learn --spam -C /etc/mail/spamassassin --showdots --dir /path/to/directory/full/of/spam/msgs |
Code: | sa-learn --ham -C /etc/mail/spamassassin --showdots --dir /path/to/directory/full/of/ham/msgs |
|
You can download huge amounts of archived spam from ftp://spamarchive.org/pub/archives/submit
Note that if you're using mbox format (like me), replace --dir with --mbox and point it to an mbox file. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
Kilian n00b
Joined: 24 Jun 2002 Posts: 74 Location: Canada
|
Posted: Tue Jan 20, 2004 5:36 pm Post subject: |
|
|
Kilian wrote: | Been trying this for a few days now. SMTP-auth et alle seems to work fine, but whenever I send, the server replies with 'X-Q'. Inspection of my log files gets me this:
Quote: | Jan 19 23:39:43 blizzard X-Qmail-Scanner-1.16: [blizzard10745807824263035] Unable to close pipe to /var/qmail/bin/qmail-queue (#4.3.0) -
Jan 19 23:39:44 blizzard X-Qmail-Scanner-1.16: [blizzard10745807824263035] Unable to queue message (111). (#4.3.0) - Illegal seek |
Any hints? |
Go this fixed now. Turned out my queue directory was entirely missing, for whatever reason. For future reference if anyone has this problem, here's the quick fix (instead of searching for hours):
Code: | cd /var/qmail
mkdir queue
chmod 777 queue
bin/queue-fix queue |
|
|
Back to top |
|
|
jk0 n00b
Joined: 14 Jan 2004 Posts: 44
|
Posted: Tue Jan 20, 2004 11:12 pm Post subject: |
|
|
I am having problems emergine Qmail, heres is whats happening:
Code: |
root@services jkearney # emerge -p qmail
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] sys-apps/ucspi-tcp-0.88-r5
[ebuild N ] net-mail/queue-fix-1.4-r2
[ebuild N ] net-mail/dot-forward-0.71-r1
[ebuild N ] net-mail/cmd5checkpw-0.22
[blocks B ] net-mail/ssmtp ("virtual/mta" from pkg net-mail/qmail-1.03-r13)
[ebuild N ] sys-apps/daemontools-0.76-r3
[ebuild N ] net-mail/checkpassword-0.90-r1
[ebuild N ] net-mail/qmail-1.03-r13
root@services jkearney #
|
So basicly its not letting me emerge qmail... any ideas? |
|
Back to top |
|
|
|