Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail - newaliases pointing to wrong place. -help!

Status
Not open for further replies.

linuxtricks

IS-IT--Management
May 24, 2000
111
US
<br><br>I recently tried to install qmail to replace my current version of sendmail.<br><br>I did not have luck with the rollover..&nbsp;&nbsp;and now I am attempting to use sendmail again... because I have critical email that needs to go out.<br><br>But... this is what I get when i try to execute the /usr/sbin/newaliases file:<br>----------------------------<br>[root@swncom ~]# newaliases<br>newaliases: fatal: unable to chdir to /var/qmail: file does not exist<br>[root@swncom ~]# <br>----------------------------<br><br>Would anyone know how I can get &quot;newlaliases&quot; to point back to the /etc/aliases file?<br><br>Thanks for the help!!! <p> <br><a href=mailto: > </a><br><a href= > </a><br><i>try not!</i><br>
<i>do... or do not. there is no try!</i>
 
Might it be that you still have the qmail version of newaliases installed? <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
<font color=red>AndyBo</font> mentioned that might be my problem too.<br><br>But... how do I go about fixing this?&nbsp;&nbsp;What do I do from here?<br>=\ <p> <br><a href=mailto: > </a><br><a href= > </a><br><i>try not!</i><br>
<i>do... or do not. there is no try!</i>
 
I would start with the QMAIL documentation, what does it say about newaliases etc.<br><br>Also try &quot;which newaliases&quot; or &quot;whence newaliases&quot; to see where newaliases is. It may be that you still have both versions installed by the qmail version is first in your $PATH ($PATH is a list of directories that is searched when Linux tries to find a program to run) <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
I'll move into here and cross-post to the sendmail forum when we have this one cracked...<br><br>How have you reverted to sendmail?&nbsp;&nbsp;If you've renamed, for example, &quot;/usr/lib/sendmail.old&quot; to &quot;/usr/lib/sendmail&quot; then you should be able to do the same with &quot;newaliases&quot;.&nbsp;&nbsp;Assuming you took a copy of newaliases, that is...&nbsp;&nbsp;If not, then the qmail installation has nuked your original &quot;newaliases&quot; binary.&nbsp;&nbsp;That's the bad news...<br><br>Here's the good news...&nbsp;&nbsp;Let's say you're running a RedHat based version of Linux, find the sendmail package on your original distribution media and re-install it.&nbsp;&nbsp;If you do &quot;rpm --nodeps -ivh sendmail.packagename.rpm&quot; then this should re-install the sendmail package, restoring &quot;newaliases&quot; and anything else that's required along the way.<br><br>Of course, this is going to nuke anything qmail-ish, but from what you say, that doesn't sound like it will be a problem...&nbsp;&nbsp;Let us know how you get on. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
<font color=red><i>Here's what I found:</i></font><br><br>[root@swncom ~]# <b>/usr/sbin/newaliases</b><br>newaliases: fatal: unable to chdir to /var/qmail: file does not exist<br><br>[root@swncom ~]# <b>/usr/bin/newaliases</b><br>/etc/aliases: 29 aliases, longest 1032 bytes, 17311 bytes total<br><br>Usually, all I ever entered was:<br>[root@swncom ~]# <b>newaliases</b><br>and that would normally point to<br><b>/etc/aliases</b><br>but after the qmail (install/uninstall)&nbsp;&nbsp;by default it&nbsp;&nbsp;points to<br><b>/var/qmail/</b><br>which doesnt't work anymore.<br><br>only<br><b>/usr/bin/newaliases</b><br>works.<br><br>All is well... but I'd still like to understand what happened.&nbsp;&nbsp;Any ideas? <p> <br><a href=mailto: > </a><br><a href= > </a><br><i>try not!</i><br>
<i>do... or do not. there is no try!</i>
 
I'm not sure exactly what could have happened, without knowing exactly what you did to install qmail.&nbsp;&nbsp;However, it does look like you have two versions of newaliases on your server, so that's good, for you :)<br><br>/usr/sbin/newaliases is the qmail version.&nbsp;&nbsp;nuke it, copy it somewhere safe, whatever.&nbsp;&nbsp;Now link the sendmail version from /usr/bin to /usr/sbin:<br><FONT FACE=monospace><br>ln -s /usr/bin/newaliases /usr/sbin/newaliases<br></font><br>... and you've got a fix for your problem.<br><br>At some point in your qmail install you've run a command to link, or copy, /var/qmail/bin/newaliases to /usr/sbin.&nbsp;&nbsp;If you check $PATH for the root user, you will see that /usr/sbin appears before /usr/bin.&nbsp;&nbsp;That's why you're picking up the qmail version.&nbsp;&nbsp;It might be worth you looking at the instructions you followed to install qmail.&nbsp;&nbsp;Make sure that all the sendmail stuff that was moved, has now been moved back.<br><br>Anyway, glad to see things are pretty much sorted out now :) <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
<br><font color=red><b>AndyBo:</b></font><br><i>Thanks again!</i>&nbsp;&nbsp;Everything seemes to work out ok.<br> <p> <br><a href=mailto: > </a><br><a href= > </a><br><i>try not!</i><br>
<i>do... or do not. there is no try!</i>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top