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/perlopen(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!<br><br>Post edited by: seryeb, at: 2008/10/16 08:10
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%3ap...
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
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. ;-)
--
Check out the forum guidelines!
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:1]
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
[/code:1]
Finally I let this file working with the following code:
[code:1]
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
[/code:1]
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!<br><br>Post edited by: seryeb, at: 2008/10/16 08:50