View previous topic :: View next topic |
Author |
Message |
dballant n00b
Joined: 22 Dec 2004 Posts: 2
|
Posted: Sat Jun 25, 2005 7:30 pm Post subject: Problems with maildop/qmail/vpopmail |
|
|
Hi,
I am having problems trying to get maildrop working in my mail server. Have been using this configuration on a Redhat box for over a year and recently moved to a Gentoo solution. Getting maildrop to work is the only part that is failing.
To build the server, I have used the following gentoo documentation: http://www.gentoo.org/doc/en/qmail-howto.xml
Everything is running well but I get permission problems when I try to introduce maildrop. I am getting the following errors in the qmail-send logs:
Code: | @4000000042bdac521ae5d764 new msg 1109815
@4000000042bdac521ae5e704 info msg 1109815: bytes 1568 from <dougalb@gmail.com> qp 2638 uid 210
@4000000042bdac521d5d0954 starting delivery 4890: msg 1109815 to local hippotje.com-dougal@hippotje.com
@4000000042bdac521d5dfb84 status: local 1/10 remote 0/20
@4000000042bdac522a5dbdc4 delivery 4890: deferral: maildrop:_error_writing_to_mailbox.//usr/bin/maildrop:_Unable_to_deliver_to_mailbox./
@4000000042bdac522a5dcd64 status: local 0/10 remote 0/20 |
I have checked the permissions of all the maildrop related files and the maildir:
Code: | xen2 qmail-send # ls -la /usr/bin/maildrop
-rwxr-x--- 1 vpopmail mail 166816 May 18 19:25 /usr/bin/maildrop
xen2 qmail-send # ls -la /etc/maildrop/mailfilter
-rw------- 1 vpopmail vpopmail 545 May 18 20:28 /etc/maildrop/mailfilter |
Finally this is my .qmail-default and corresponding mailfilter.
Code: | xen2 qmail-send # cat /var/vpopmail/domains/hippotje.com/.qmail-default
| /usr/bin/maildrop /etc/maildrop/mailfilter
xen2 qmail-send # cat /etc/maildrop/mailfilter
import EXT
import HOST
import HOME
MAX = 15
VHOME=`/var/vpopmail/bin/vuserinfo -d $EXT@$HOST`
VPOP="| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
JUNKFOLDER=".Spam"
if ($VHOME)
{
`test -d "$VHOME/.maildir/$JUNKFOLDER"`
if( $RETURNCODE != 1 )
{
if ( $SIZE < 262144 )
{
exception {
xfilter "/usr/bin/spamc -f -u $EXT@$HOST"
}
}
}
if (/^X-Spam-Flag: *YES/)
{
to "$VHOME/.maildir/$JUNKFOLDER/"
}
else
{
to "$VHOME/.maildir/"
}
}
else
{
to $VPOP
} |
Does anybody have any advice? This is the key to my complete mail server!! |
|
Back to top |
|
|
tumbak Apprentice
Joined: 10 Jan 2004 Posts: 230 Location: supposedly Palestine
|
Posted: Thu Jul 14, 2005 1:18 pm Post subject: |
|
|
the mailfilter file should have only read permissions on it.
Code: | -r-------- 1 vpopmail vchkpw 1094 Jun 21 09:09 mailfilter |
and here is my mailfilter, it might help
Code: |
SHELL="/bin/bash"
import EXT
import HOST
VPOP="| /home/vpopmail/bin/vdelivermail '' delete"
VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST`
VDOMHOME=`dirname "$VHOME"`
#logfile "/home/vpopmail/domains/mailfilter.log"
#check if the user exists
DUMMY=`test -d $VHOME/Maildir/`
if ( $RETURNCODE == 0 )
{
#check if the bulk folder exists
DUMMY=`test -d $VHOME/Maildir/.Bulk`
if ( $RETURNCODE == 1 )
{
# log "Createing spam directory $VHOME/Maildir"
DUMMY=`/usr/local/bin/maildirmake -f Bulk $VHOME/Maildir/`
# log "$RETURNCODE"
DUMMY=`echo INBOX.Bulk >> $VHOME/Maildir/courierimapsubscribed`
}
#check if the message is spam, else deliver normally
if ( /^X-Spam-Status: Yes/ )
{
# log "Message delivered to $VHOME/Maildir/.Bulk"
to "$VHOME/Maildir/.Bulk"
}
else
{
# log "Message handed over to vdelivermail"
to "$VPOP";
}
}
else
{
DUMMY=`test -f $VDOMHOME/.qmail-$EXT`
if ( $RETURNCODE == 1 )
{
# log "No Such User $EXT@$HOST, silently exit and send the message into void
exit
}
}
|
_________________ less QQ more pewpew! |
|
Back to top |
|
|
|