From: Anil <rep...@gm...> - 2008-05-18 19:38:26
|
I had it print out the $? and it is -1. (RFE - have it return the error code if it detects an error)... This is essentially my sendmail.mc file. If I run command line, it works fine and it returns a 0. divert(0)dnl VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04') OSTYPE(`solaris8')dnl DOMAIN(`solaris-generic')dnl dnl define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl define(`ALIAS_FILE',`/etc/mail/aliases') FEATURE(`virtusertable') FEATURE(`domaintable') FEATURE(`mailertable') FEATURE(`genericstable') FEATURE(`access_db') MAILER(`local')dnl MAILER(`smtp')dnl LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3 As I am sending this, maybe I think I know what is wrong. It seems there are some old entries in the virtusertable file for the same domain... maybe it had problems because of that? When I deleted the domain, it didn't clean up properly. I also had to go and delete the vhost from apache manually. Let me go blow away the existing virtusertable file. Another RFE, if $? is non zero, show the output of makemap -v for verbose. On Sun, May 18, 2008 at 12:18 PM, Jamie Cameron <jca...@we...> wrote: > On 18/May/2008 09:54 Anil wrote .. >> When creating a new virtual server in virtualmin, I get this: >> >> Creating aliases for administration user .. >> .. aliases failed : makemap failed : >> >> /usr/sbin/makemap hash /etc/mail/virtusertable /etc/mail/virtusertable >> >> at ../web-lib-funcs.pl line 980. >> >> Adding administration user to groups .. >> .. done >> >> Creating home directory .. >> .. done >> >> Creating mailbox for administration user .. >> .. done >> >> Adding to email domains list .. >> .. done >> >> Adding default mail aliases .. >> .. Mail for domain failed! : makemap failed : >> >> /usr/sbin/makemap hash /etc/mail/virtusertable /etc/mail/virtusertable >> >> at ../web-lib-funcs.pl line 980. >> >> Adding new virtual website .. >> .. Apache website failed! : Failed to open >> /home/ecomport/logs/access_log for writing : Bad file number at >> ../web-lib-funcs.pl line 980. >> >> I am not sure why it mentions aliases when it is actually mapping >> virtusertable. I had modified the sendmail function to print out the >> exact things its doing like this: >> sub run_makemap >> { >> local($out); >> $out = &backquote_logged("$config{'makemap_path'} $_[2] $_[1] <\"$_[0]\" 2>&1"); >> if ($?) { &error("makemap failed : <pre>$out $config{'makemap_path'} >> $_[2] $_[1] $_[0]</pre>"); } >> } >> When I run the command from a terminal window, it works fine: >> >> root@ecompo:/# /usr/sbin/makemap hash /etc/mail/virtusertable < >> /etc/mail/virtusertable >> root@ecompo:/# >> >> What's causing the problem? > > That's odd - usually if Virtualmin says that makemap has failed, it will output > whatever error message came from makemap indicating *why* it failed. > > If you run the commands : > /usr/sbin/makemap hash /etc/mail/virtusertable </etc/mail/virtusertable > echo $? > what output do you get? It's possible that makemap is exiting with a non-zero > status, but not printing any error message. > > - Jamie > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > - > Forwarded by the Webmin mailing list at web...@li... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-list > |