Forward email not working

When I set forwarding email in usermin, no email is forwarded and in procmail.log I get:

Insecure dependency in exec while running with -T switch at /etc/webmin/virtual-server/lookup-domain.pl line 17.
procmail: Program failure (255) of “/etc/webmin/virtual-server/lookup-domain.pl”

Can me someone help with this error?

Hmm, what operating system / version are you running Virtualmin on?

And how did you go about installing it – did you by chance use the install.sh?

Lastly, what does this command show:

grep mailbox_command /etc/postfix/main.cf

Thanks!

-Eric

It is running on Debian Lenny … I used install.sh to install virtualmin.

output from grep is: mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

What are the permissions on /usr/bin/procmail-wrapper ? They should be 6755, and it should be owned by root. You can check with the commands :

lentor.home:~ > ls -l /usr/bin/procmail-wrapper -rwsr-xr-x 1 root root 2916 2006-11-28 01:08 /usr/bin/procmail-wrapper

Yes. I have these permissions:
-rwsr-sr-x 1 root root 4536 2006-12-14 05:00 /usr/bin/procmail-wrapper

But if I chmoded it to right permissions, there was no change:
-rwsr-sr-x 1 root root 4536 2006-12-14 05:00 /usr/bin/procmail-wrapper

What are the contents of the /etc/webmin/virtual-server/lookup-domain.pl file on your system?

there is:
#!/usr/bin/perl
delete($ENV{‘IFS’});
delete($ENV{‘CDPATH’});
delete($ENV{‘ENV’});
delete($ENV{‘BASH_ENV’});
$ENV{‘PATH’} = ‘/bin:/usr/bin’;
$< = $>;
$( = $);
open(CONF, “/etc/webmin/miniserv.conf”);
while() {
$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 : $!”;

Are there any news about this topic?
I have the same problem.
OS is lenny too. Delivery of the messages to the inboxes works, but the forwarding feature doesn’t.

remove the following from /etc/procmailrc :

:0
$DEFAULT

now it works again.

You can also do the same thing in Virtualmin at Email Settings -> Spam and Virus Filtering -> Allow mailbox users to create mail filters? (set it to Yes).

Ok, that works too;-)
Thank you for the help!

Howdy,

Procmail is saying there’s something funny about the .procmail rc file located in “/home/ps3/.procmailrc”.

If you take a look at that file, do you see anything odd about it?

What user/group owns it? Is that the same user/group who owns the directory it resides in?

-Eric

Hi I nstalled using the install.sh and everything went fine, I had a few issues with mail from the off though,

I have all the rest of the bugs worked out, and can now send and recieve mail no problems, but forwarding just doesnt want to know.

heres what I see when an email hits my server (it ends up in my inbox fine but isnt forwarded)

From /var/log/procmail.log

Time:1271944813 From:root@madshaun1984.dyndns.org To:ps3@madshaun1984.dyndns.org User:ps3 Size:772 Dest:/home/ps3/Maildir/new/1271944813.28501_0.madshaun1984.dyndns.org Mode:None
Insecure dependency in exec while running with -T switch at /etc/webmin/virtual-server/lookup-domain.pl line 18.
procmail: Program failure (255) of “/etc/webmin/virtual-server/lookup-domain.pl”
procmail: Skipped “* ?/usr/bin/test “$VIRTUALMIN” != “””
procmail: Couldn’t read “/etc/webmin/virtual-server/procmail/”
procmail: Suspicious rcfile “/home/ps3/.procmailrc”
procmail: Couldn’t read “/home/ps3/.procmailrc”
From test@testemail.com Thu Apr 22 15:07:15 2010
Subject: test
Folder: /home/ps3/Maildir/new/1271945235.28982_0.madshaun1984.dyndns 2438
Time:1271945235 From:test@testemail.com To:webmaster@ps3fanatics.co.uk User:ps3 Size:2494 Dest:/home/ps3/Maildir/new/1271945235.28982_0.madshaun1984.dyndns.org Mode:None

Any help woul dbe appreciated :slight_smile:

.procmailrc just contains

:0c

! test@testemail.com

its owned by the user for that domain, and is in the right place, I have also checked the Allow mailbox users to create mail filters? to yes, and rechecked the virtualmin config, still getting the same problem though.

Edit its permissions are 6644 for user/group ps3/ps3 is that correct?

Those are pretty strange permissions… I’d make it at most 0644.

-Eric

yeah thats what it was before, I set it to 6644 to see if that would make a difference, no change though :frowning:

update , here is the contents on my /etc/procmailrc

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME

  • ?/usr/bin/test “$VIRTUALMIN” != “”
    :0
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    DEFAULT=$HOME/Maildir/
    ORGMAIL=$HOME/Maildir/
    DROPPRIVS=yes

removing the :0 doesnt help, other than there being something wrong in this file I cant pin it down to anything else. but I cant see what it could be in here (sorry bit of a linux n00b here)

edit:-- just incase it helps grep mailbox_command /etc/postfix/main.cf returns

mailbox_command = /usr/bin/procmail -Y -a $DOMAIN

^ I had a big problem with procmail-wrapper and no matter how I tried to fix it email to/from my server wouldnt work, I do have mail being received (but not forwarded) and sent from the server woking fine now though.

Just forwarding thats giving me grief else virtualmin would be the perfect setup for what I need :smiley:

:heart: virtualmin btw :smiley:

What distribution and version are you using?

That’s not the correct mailbox command, I’m curious as to what may have gone awry there…

-Eric

shaun@madshaun1984:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.4 LTS
Release: 8.04
Codename: hardy

thanks for your help by the way, its completely got me stumped >.<

Try setting the mailbox_command to this:

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

And then restart Postfix.

-Eric