LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sendmail Error (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-error-858992/)

sridaran 01-27-2011 05:49 AM

Sendmail Error
 
I am getting the following error when I run service sendmail start command:

Starting sendmail: 554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
[FAILED]


I tried the command
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

and got the follwing error:

/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory



How to solve this error?



R.Sridaran

sandy.bhadoriya 01-27-2011 06:03 AM

Just try to remove the package sendmail using yum remove sendmail*
and again try to install using yum install sendmail* . i think that will do

Santosh

sridaran 01-27-2011 06:12 AM

I don't have yum installed on my system. Any other way?


R.Sridaran


Quote:

Originally Posted by sandy.bhadoriya (Post 4239349)
Just try to remove the package sendmail using yum remove sendmail*
and again try to install using yum install sendmail* . i think that will do

Santosh


prodev05 01-27-2011 06:26 AM

Follow the below steps.

1.) rpm -qa | grep -i sendmail // Confirm that sendmail is not installed
2.) mount the installation media into /media/ // mount installation media
3.) switch to the rpm directory
4.) rpm -ivh --test sendmail.x.y.z.rpm // First check the rpm is suitable to install with out any dependencies.
// if success, then follow the next step.
5.) rpm -ivh sendmail.x.y.z.rpm // sendmail installation is done
6.) rpm -qi sendmail // check for sendmail installation.

Now you can start configuring the sendmail with m4(macro) :)

sridaran 01-28-2011 06:46 AM

The command rpm -ivh --test sendmail.x.y.z.rpm gave the following output:

warning: sendmail-8.13.8-2.el5.src.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

The command rpm -qi sendmail

Name : sendmail Relocations: (not relocatable)
Version : 8.13.8 Vendor: Red Hat, Inc.
Release : 2.el5 Build Date: Tue 28 Nov 2006 08:29:05 PM IST
Install Date: Wed 22 Dec 2010 03:19:21 AM IST Build Host: ls20-bc1-14.build.redhat.com
Group : System Environment/Daemons Source RPM: sendmail-8.13.8-2.el5.src.rpm
....
....


Now I was unable to configure.

I tried the command
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

and got the follwing error:

/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory



How to install sendmail-cf without using yum?


R.Sridaran

sandy.bhadoriya 01-29-2011 01:46 AM

just use this command to install rpm -ivh --test sendmail.cf.x.y.z.rpm

for installation of sendmail.cf

linuxlover.chaitanya 01-29-2011 03:43 AM

Check if m4 macro is installed correctly as well. It seems it is not able to generate the cf file.

prodev05 01-29-2011 04:57 AM

rpm options '--test' won't install the package. The option is to verify the package compatibility/package dependencies conflict. We have to use "rpm -ivh <package.x.y.z.rpm>" to install the package.

sridaran

pl share the output for the commands give in post #4. So that we can see what is the problem. :)

sridaran 01-31-2011 04:03 AM

Let me give you the commands and the output I got:

command
rpm -qa | grep -i sendmail

Output
sendmail-cf-8.8.7-20
sendmail-8.13.8-2.el5

command
rpm -qi sendmail

Output
Name : sendmail Relocations: (not relocatable)
Version : 8.13.8 Vendor: Red Hat, Inc.
Release : 2.el5 Build Date: Tue 28 Nov 2006 08:29:05 PM IST
Install Date: Wed 22 Dec 2010 03:19:21 AM IST Build Host: ls20-bc1-14.build.redhat.com
Group : System Environment/Daemons Source RPM: sendmail-8.13.8-2.el5.src.rpm
Size : 1370608 License: Sendmail
Signature : DSA/SHA1, Thu 18 Jan 2007 02:08:27 AM IST, Key ID 5326810137017186
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary : A widely used Mail Transport Agent (MTA).

command
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Output
/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

command
cd /etc/mail
ls -l

Output
-rw-r--r-- 1 root root 355 Nov 28 2006 access
-rw-r----- 1 root root 12288 Dec 22 03:19 access.db
-rw-r--r-- 1 root root 0 Nov 28 2006 domaintable
-rw-r----- 1 root root 12288 Dec 22 03:19 domaintable.db
-rw-r--r-- 1 root root 5521 Nov 28 2006 helpfile
-rw-r--r-- 1 root root 64 Nov 28 2006 local-host-names
-rw-r--r-- 1 root root 0 Nov 28 2006 mailertable
-rw-r----- 1 root root 12288 Dec 22 03:19 mailertable.db
-rw-r--r-- 1 root root 1048 Nov 28 2006 Makefile
-rw-r--r-- 1 root root 0 Jan 27 05:31 sendmail.cf~bogus
-rw-r--r-- 1 root root 7209 Nov 28 2006 sendmail.mc
-r--r--r-- 1 root root 41286 Nov 28 2006 submit.cf
-rw-r--r-- 1 root root 940 Nov 28 2006 submit.mc
-rw-r--r-- 1 root root 127 Nov 28 2006 trusted-users
-rw-r--r-- 1 root root 0 Nov 28 2006 virtusertable
-rw-r----- 1 root root 12288 Dec 22 03:19 virtusertable.db

I didn't tried rpm -ivh sendmail.x.y.z.rpm since sendmail is already installed. I don't know why sendmail is not starting? I am new Linux. Please help me. Its urgent.

sridaran 01-31-2011 04:40 AM

Also Please check the output for the command service sendmail start

Starting sendmail: 554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
[FAILED]

prodev05 01-31-2011 04:56 AM

By default, the m4 macro processor is installed with Sendmail. The m4 macro processor is included with the sendmail-cf package, which is installed in /usr/share/sendmail-cf.

You should consult the /usr/share/sendmail-cf/README file before you edit any of the files in the directories under the /usr/share/sendmail-cf directory, as they can affect how future /etc/sendmail.cf files are configured.


Follow this link

I believe, after this your sendmail problem could resolve.

All the best.

sridaran 01-31-2011 07:03 AM

Thank you for sending me the link. I don't have sendmail.cf installed in /etc folder. Also sendmail-cf is not in the /usr/share folder. I have sendmail.cf and sendmail.cf~bogus in the /etc/mail folder. But both are empty files. So I tried this command m4 /etc/mail/sendmail.mc > /etc/sendmail.cf and got the following output:

/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory


Actually I have the sendmail version of sendmail-8.13.8-2.el5. Today I installed sendmail-cf-8.8.7-20 using the command rpm -ivh sendmail-cf-8.8.7-20.rpm before posting my previous forum since I didn't get sendmail-cf with 8.13.8-2.el5 version. Do we need to install sendmail and sendmail-cf with same version.

I have listed the files available in /etc/mail folder on my previous thread. Apart from that I don't have sendmail-cf installed anywhere else. Please tell What I need to do now?

linuxlover.chaitanya 01-31-2011 11:07 PM

I still think your sendmail installation has issues and you need to install it using the package manager. Installing yum should not be a problem. What version of RH are you using and if you are using RHEL then why dont you talk to RH support. You are anyhow paying them for it.

sridaran 02-01-2011 04:13 AM

I tried installing sendmail.8.14.4.tar.gz. I started with the command

cd sendmail
sh ./Build


It executed well by installing some files. Then I tried the following:

cd cf/cf
sh ./Build sendmail.cf


output
Using M4=/usr/bin/m4
make:***No rule to make target 'sendmail.cf'.stop

sh ./Build install-cf

output
Using M4=/usr/bin/m4
make:***No rule to make target 'sendmail.cf',needed by 'install-sendmail-cf'.stop

cd obj.Linux.2.6.18-8.el5xen.i686
make install


output
make:***No rule to make target 'install'.stop

yesterday I installed sendmail-cf-8.8.7-20. Today I removed this by using
rpm --erase sendmail-cf-8.8.7-20

Finally sendmail is not starting with the service sendmail start command.

On the terminal it is showing sendmail-8.13.8-2.el5 for the command rpm -qa | grep -i sendmail

I tried removing the sendmail using the command rpm -e sendmail-8.13.8-2.el5 and got following error:

error: Failed dependencies:
/usr/sbin/sendmail is needed by (installed) redhat-lsb-3.1-12.2.EL.i386
smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386
smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386


I was structed in the middle right now, since I was unable to continue installation and also unable to uninstall sendmail also.

My Linux version is Red Hat Enterprise Linux Server release 5 (Tikanga)

linuxlover.chaitanya 02-01-2011 06:37 AM

It would be better for you to install yum and use it as your package manager. This will solve a lot of dependency headaches. And if you are using registered RHEL why not call them for he support?


All times are GMT -5. The time now is 09:15 AM.