Welcome, Guest
Please Login or Register.
Lost Password?
Error in lookup-domain.pl line 6 ( SOLVED ) (1 viewing)
Post Reply

TOPIC: Error in lookup-domain.pl line 6 ( SOLVED )

#17065
seryeb (User)
Posts: 2
graphgraph
Error in lookup-domain.pl line 6 ( SOLVED ) 2008/10/15 17:15  
Hi, I have an error in this file, and the spamassassin doesn't work.

My /etc/webmin/virtual-server/lookup-domain.pl looks like:

****
#!/usr/bin/perl
open(CONF, "/etc/webmin/miniserv.conf");
while(<CONF>) {
$root = $1 if (/^root=(.*)/);
}
close(CONF);
$ENV{'WEBMIN_CONFIG'} = "/etc/webmin";
$ENV{'WEBMIN_VAR'} = "/var/webmin";
chdir("$root/virtual-server");
exec("$root/virtual-server/lookup-domain.pl", @ARGV) || die "Failed to run $root/virtual-server/lookup-domain.pl : $!";
****

The error in procmail.log in VERBOSE log is:

****
procmail: Assigning "TRAP=/usr/libexec/webmin/virtual-server/procmail-logger.pl"
procmail: Executing "/etc/webmin/virtual-server/lookup-domain.pl,will,0"
procmail: Assigning "VIRTUALMIN="
usage: lookup-domain.pl <username> at /usr/share/webmin/virtual-server/lookup-domain.pl line 6.
procmail: Program failure (255) of "/etc/webmin/virtual-server/lookup-domain.pl"
procmail: Executing "/usr/bin/test,,!=,"
procmail: Non-zero exitcode (1) from "/usr/bin/test"
procmail: No match on "/usr/bin/test != "
procmail: Assigning "DEFAULT=/home/mapu/homes/seryeb/Maildir/"
procmail: Assigning "ORGMAIL=/home/mapu/homes/seryeb/Maildir/"
procmail: Assigning "DROPPRIVS=yes"
procmail: Assuming identity of the recipient, VERBOSE=off
procmail: Incomplete recipe
From root@mapurv.domain.com Thu Oct 16 04:04:23 2008
Subject: test
Folder: /home/mapu/homes/seryeb/Maildir/new/1224122663.1712_0.mapurv 416
Time:1224122663 From:root@mapurv.domain.com To:seryeb@mapu.com.es User:seryeb.mapu Size:472 Dest:/home/mapu/homes/seryeb/Maildir/new/1224122663.1712_0.mapurv.domain.com Mode:None
****

I've read many threads about the procmail-wrapper, the mailbox from root, but not seen the solution.

Could you help me?

Thanks a lot!

Post edited by: seryeb, at: 2008/10/16 08:10
  The administrator has disabled public write access.
#17066
andreychek (Moderator)
Posts: 855
graphgraph
Re:Error in lookup-domain.pl line 6 2008/10/15 19:41  
Hmm, an interesting problem! A thread with some similar symptoms (and some really odd solutions) is here:

http://www.virtualmin.com/forums/limit/10/limitstart/0/virtualmin/re%3aprocmail-and-spamassassin- woes..html

A few questions for you though:

* What distro are you using?

* What virtualmin version are you using?

* If you create the directory /var/mail (assuming it doesn't already exist), do things mysteriously start working?

Thanks,
-Eric
  The administrator has disabled public write access.
#17069
Joe (Admin)
Posts: 4213
graph
Re:Error in lookup-domain.pl line 6 2008/10/15 22:37  
What makes you think this is a problem in lookup-domain.pl?

This is clearly a broken procmail recipe (says so right in the log). And, for whatever reason it's calling lookup-domain.pl without a username...which is where the error you're seeing is coming from.

Anyway, Eric provided a great link with as much knowledge as I'd be able to provide on the topic. I'm pretty much gonna just have to blame your procmailrc. ;-)
  The administrator has disabled public write access.
#17081
seryeb (User)
Posts: 2
graphgraph
Re:Error in lookup-domain.pl line 6 (solved) 2008/10/16 08:09  
Thanks!

I was thinking and look at the thread you told me.

Looking at the first page found the solution. You're right about the procmailrc.

I'm going to post the result:

Distro: Debian Etch 4.0

Virtualmin: 3.61.gpl_all.deb

The directory /var/mail was created in the original installation

The error was in /etc/procmailrc

The original was

Code:

VERBOSE=yes LOGFILE=/var/log/procmail.log TRAP=/usr/libexec/webmin/virtual-server/procmail-logger.pl :0wi VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl will 0 :0 * ?/usr/bin/test "$VIRTUALMIN" != "" { INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN } DEFAULT=$HOME/Maildir/ ORGMAIL=$HOME/Maildir/ DROPPRIVS=yes :0 $DEFAULT :0 * ^X-Spam-Status: Yes /dev/null



Finally I let this file working with the following code:

Code:

VERBOSE=yes LOGFILE=/var/log/procmail.log TRAP=//usr/libexec/webmin/virtual-server/procmail-logger.pl :0wi VIRTUALMIN=|//etc/webmin/virtual-server/lookup-domain.pl $LOGNAME :0 * ?/usr/bin/test "$VIRTUALMIN" != "" { INCLUDERC=//etc/webmin/virtual-server/procmail/$VIRTUALMIN } DEFAULT=$HOME/Maildir/ ORGMAIL=$HOME/Maildir/ DROPPRIVS=yes :0 $DEFAULT :0 * ^X-Spam-Status: Yes $DEFAULT



The main difference is in //usr, //etc...

Once I changed the file everything starts working... I made changes before, but not very important ones.

I would read more carefully the previous posts ;-)

Thanks a lot for your help!

Post edited by: seryeb, at: 2008/10/16 08:50
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.