[vchkpw] deleting domains

2003-09-23 Thread Morten Rønseth
Hi all,

I've installed qmail && vpopmail 5.3.27 on a FreeBSD 5.1 box.
Whenever I try to delete a domain, I get the following error:
bogus# bin/vdeldomain test.com
Failed while attempting to delete domain from dir_control
Failed vget_assign for test.com
The funny thing is that the domain is sucessfully deleted...all related 
files and references to the domain are deleted, and if i try to add it 
again I can do so. What seems to be the problem here?
Grateful for any pointers.

BTW, this is what ls -al on domains/.dir-control looks like:

-rw-r--r--   1 vpopmail  vchkpw   34 Sep 23 15:19 .dir-control

Cheers,



-Morten

--
---
WEB-fx
Morten Lerskau Rønseth   http://www.webfx.no
Bjerregaardsgate 6   mailto:[EMAIL PROTECTED]
0172 OsloTlf.: (47) 2319 8000
Norway   Mob : (47) 9343 4357




[vchkpw] vpopmail & courierIMAP auth from MySQL

2003-09-24 Thread Morten Rønseth
Hi all,

Is it possible to get vpopmail & courierIMAP to auth from the same MySQL 
database?
If so, how?

Cheers,



-Morten

--
---
WEB-fx
Morten Lerskau Rønseth   http://www.webfx.no
Bjerregaardsgate 6   mailto:[EMAIL PROTECTED]
0172 OsloTlf.: (47) 2319 8000
Norway   Mob : (47) 9343 4357




[vchkpw] Filtering SPAM

2004-05-24 Thread Morten Rønseth




Hi all,

I'm trying to filter incoming mail using the following mail-filter:

-
VPOP="| /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

# try filtering it using user-defined rules
if (/^X-Spam-Flag: *YES/)
{
    exception {
    include $VHOME/Maildir/.mailfilter
    }
    # then send it to the .SPAM folder
    exception {
    to "$VHOME/Maildir/.SPAM/"
    }
    # or try delivering it to the Trash folder
    exception {
    to "$VHOME/Maildir/.Trash/"
    }
    # if not go on with delivery
    exception {
    to "$VPOP"
    }
}
else
{
    exception {
    include $VHOME/Maildir/.mailfilter
    }
    # if not go on with delivery
    exception {
    to "$VPOP"
    }
}
---
It is called from .qmail-default as in

"| /usr/local/bin/maildrop mailfilter"


Now, if mail is sent to an account using the exact account name, mail
is delivered as it should be. However, If I send mail to an account
using an alias (via fastforward), mail doesn't get delivered. Why? I'm
using 

VPOP="|
/home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"

which is the same as in the (old) .qmail-default file. The mail-filter
is chown'ed vpopmail:vchkpw and the log file says local delivery is
delivering "...to local [EMAIL PROTECTED]".
But nothing ever arrives.

Anybody knows why this isn't working?



Cheers,



-Morten






[vchkpw] Trouble using maildrop filter & fastforward

2004-05-25 Thread Morten Rønseth




Hi all,

I'm trying to filter incoming mail using the following mail-filter:

-
VPOP="| /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

# try filtering it using user-defined rules
if (/^X-Spam-Flag: *YES/)
{
    exception {
    include $VHOME/Maildir/.mailfilter
    }
    # then send it to the .SPAM folder
    exception {
    to "$VHOME/Maildir/.SPAM/"
    }
    # or try delivering it to the Trash folder
    exception {
    to "$VHOME/Maildir/.Trash/"
    }
    # if not go on with delivery
    exception {
    to "$VPOP"
    }
}
else
{
    exception {
    include $VHOME/Maildir/.mailfilter
    }
    # if not go on with delivery
    exception {
    to "$VPOP"
    }
}
---
It is called from .qmail-default as in

"| /usr/local/bin/maildrop mailfilter"


Now, if mail is sent to an account using the exact account name, mail
is delivered as it should be. However, If I send mail to an account
using an alias (via fastforward), mail doesn't get delivered. Why? I'm
using 

VPOP="|
/home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"

which is the same as in the (old) .qmail-default file. The mail-filter
is chown'ed vpopmail:vchkpw and the log file says local delivery is
delivering "...to local [EMAIL PROTECTED]".
But nothing ever arrives.

Anybody knows why this isn't working?



Cheers,



-Morten




Re: [vchkpw] Trouble using maildrop filter & fastforward

2004-05-26 Thread Morten Rønseth
Thanks,
Changing VPOPCMD to
VPOPCMD="/home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"
and using xfilter solved the case. Also, found some great examples at
"http://mymail.alien77.com/maildropMEGAEXAMPLE";.
Cheers,

-Morten
Andreas Wiesmann wrote:
Now, if mail is sent to an account using the exact account name, mail 
is delivered as it should be. However, If I send mail to an account 
using an alias (via fastforward), mail doesn't get delivered. Why? 
I'm using

VPOP="| /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"
which is the same as in the (old) .qmail-default file. The 
mail-filter is chown'ed vpopmail:vchkpw and the log file says local 
delivery is delivering "...to local 
[EMAIL PROTECTED]".
But nothing ever arrives.

its probably the same thing we noticed for forwards set through 
qmailadmin by users (.qmail in user dir). you can probably go around 
this using (credits go to lola)
 xfilter "$VPOPCMD"
 exit

instead of to "$VPOP". I dont know the real reason but it looks if 
maildrop terminates before the mail is successfully forwarded?

I add the maildrop script I use now below just for people with similar 
problems searching the archives

cheers
andrej
# mailfilter written by andrej [EMAIL PROTECTED] to
# 1. check if .Spam maildir and deliver if its spam
# 2. check if .qmail in virtual home and proceed with this
# 3. check if mailfilters from sqwebmail in virtual home and filter
# 4. standard mail delivery
# PREREQUISITS
# file in ./Maildir or /usr/local/share/sqwebmail called 
maildirfilterconfig
# with
# MAILDIRFILTER=../.mailfilter
# MAILDIR=$VHOME/Maildir

# this filter is calle by .qmail-default
# | maildrop mailfilter
#logfile $VHOME/log
logfile "/var/log/maildrop"
import SENDER
import FROM
import EXT
import HOST
import RPLINE
import DTLINE
#log "Sender: $SENDER From: $FROM ext: $EXT host: $HOST rpline: 
$RPLINE dtline: $DTLINE"

SENDMAIL="/var/qmail/bin/sendmail"
VPOP="| /mailboxen/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VPOPCMD="/mailboxen/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
# virtual user home
VHOME=`/mailboxen/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
HOME=$VHOME
#log "VPOP: $VPOP"
#log "VHOME: $VHOME"
#log "SENDMAIL: $SENDMAIL"
`/usr/bin/test -d $VHOME`
if( $RETURNCODE != 0 )
  {
  echo 'Sorry, no mailbox here by that name. vpopmail (#5.1.1)'
  EXITCODE=100
  # log "bouncing"
  exit
}
#log $SENDMAIL
# spam directory for automatic spam filtering
SPAMDIR="$VHOME/Maildir/.Spam"
`/usr/bin/test -d $SPAMDIR`
SPAMDIRF="$RETURNCODE"
#log "SPAMDIR: $SPAMDIR SPAMDIRF: $SPAMDIRF"
# dotqmail
DOTQMAIL="$VHOME/.qmail"
`/usr/bin/test -f $DOTQMAIL`
DOTQMAILF="$RETURNCODE"
#log "DOTQMAIL: $DOTQMAIL DOTQMAILF: $DOTQMAILF"
# further maildrop filters (configured via sqwebmail)
SQMAILF="$VHOME/.mailfilter"
`/usr/bin/test -f $SQMAILF`
SQMAILFF="$RETURNCODE"
#log "SQMAILF: $SQMAILF SQMAILFF: $SQMAILFF"

if ($SPAMDIRF == 0)
{
  if (/^X-Spam-Flag: *YES/)
  {
log "xspam yes and spamdir exists"
exception {
  # to Spamfolder
  to "$SPAMDIR"
}
  }
}
if ($DOTQMAILF == 0)
{
  exception {
# proceed with .qmail
 #log ".qmail exists"
 # to "$VPOP"
 # now replaced with xfilter due to lost forwardmail
 xfilter "$VPOPCMD"
 exit
  }
}
if ($SQMAILFF == 0)
{
  exception {
# proceed with maildrop filters
#log "include filters"
include $VHOME/.mailfilter
  }
  exception {
# proceed
#log "standard delivery after filter inclusion"
to "$VPOP"
  }
}
else
{
  exception {
# proceed
#log "standard delivery"
to "$VPOP"
  }
}
#log "end"