?
Solved

"service unavailable" when I go into mailq

Posted on 2003-03-02
11
Medium Priority
?
269 Views
Last Modified: 2013-11-13
Hello.

I'm new to Linux just two days ago..  

I installed RedHat8.0 using the three installation CD's.

During the install process I configured it with a private IP address, because it's behind a Cisco Firewall, and have given it a hostname.  I also given it the IP addresses of the DNS servers of my ISP.  I can surf the net using the Netscape browser.

I'm trying to send mail via the command line to my work email address using the "mail" command.

When I type "mailq", I see my request.  However, I see "service unavailable".

What does that mean?  How can I fix it?

Thanks.

0
Comment
Question by:eric1972
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 10

Expert Comment

by:elf_bin
ID: 8055969
Is you firewall filtering out mail?  What mail are you using, sendmail perhaps?
0
 

Author Comment

by:eric1972
ID: 8056197
Yes, I have configured my PIX to allow outbound SMTP with the following ACL..

access-list ACLOUT permit tcp any any eq smtp

I am using sendmail.

What am I doing wrong?!?

Thanks.
0
 
LVL 10

Expert Comment

by:elf_bin
ID: 8056398
What about pop?
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:eric1972
ID: 8056408
Thanks for your help on this...

I'm gonna ask a stupid a question...

How do I check for POP on Linux?!?

Thank you.
0
 
LVL 20

Expert Comment

by:Gns
ID: 8056613
You need to configure a Mail Transfer Agent (MTA) for this to work. The two you can choose between on RH8 is Sendmail and Postfix.
Check with
ps auxww| egrep "sendmail|postfix"|grep -v grep<Enter>
which one you have running.
If you get nothing from the above, check with
rpm -qa| egrep -i "sendmail|postfix"<Enter>
which you have installed (you can have both installed) and
chkconfig --list sendmail<Enter>
and
chkconfig --list postfix<Enter>
which one should be running.

You would have to configure it, whichever it is, most probably:-).

There might also be some _local_ iptables firewall messing things up. Check with
iptables -L<Enter>

-- Glenn
0
 

Author Comment

by:eric1972
ID: 8056728
With the "rpm" command, I received the following info:

postfix-1.1.11-5
sendmail-8.12.5-7

With the "chkconfig" command, I received the following info on both postfix and sendmail:

0:off 1:off 2:on 3:on 4:on 5:on 6:off

0
 
LVL 20

Expert Comment

by:Gns
ID: 8057626
Erhm, then you should do
chkconfig <MTA> off<Enter>
for the one you _don't_ want to use.
One MTA per system is quite enough:-).
ls -l /etc/alternatives/mta<Enter>
will show which one the system "thinks" is active,
and you "switch" to the one you want with
/usr/sbin/redhat-switchmail<Enter>
or
/usr/sbin/redhat-switchmail-nox<Enter>
if you don't run X.

Which one you decide to go with is a matter of personal taste. I used to prefer sendmail, but generally tend to go for postfix now. Postfix used to be called the IBM Secure Mailer and is a bit hysterical (doesn't hardly trust itself:-), before it was OpenSourced. It's fairly simple to configure... OTOH, so is sendmail too, at least if you use the m4-stuff.
Sendmail is monolithic in architecture, while postfix is a set of queue managers (separate processes)... a bit like David and Goliath:-):-)

When you've decided which to use, you'll either have to restart/flip-flop runlevels or manually stop the "unwanted one" (lets pretend that it is sendmail;):
/etc/init.d/sendmail stop<Enter>
and then restart the other one
/etc/init.d/postfix restart<Enter>

What does
mailq<Enter>
say after this?

Either should be fine, provided they can get good DNS, and noone is preventing the use of outgoing SMTP.

-- Glenn
0
 

Author Comment

by:eric1972
ID: 8057765
I performed a "chkconfig postfix off".

I then performed a "ls -l /etc/alternatives/mta" and was returned with a "/usr/sbin/sendmail.sendmail".

I then performed a "/usr/sbin/redhat-switchmail"

I then restarted sendmail with the command "/etc/init.d/sendmail restart"

mailq still shows the mail in the queue, but instead of "service unavailable", I see "deferred".

What's next???  Thanks for your help.  I greatly appreciate it.
0
 
LVL 20

Accepted Solution

by:
Gns earned 200 total points
ID: 8058223
"deffered" means just that:-).
For _some reason_ the mail couldn't reach it's destination (or next hop, if you have it set up as that... but you probably haven't:-), and so has been deffered until later (in hopes that the _reason_ has been cleared next time it tries).

Sendmail has probably logged something regarding this in /var/log/messages and/or /var/spool/maillog

What I'd suggest you do is:
Find out the host on the receiving end (MX for the domain you are trying to reach)and do
host <domainname for remote mailhost><Enter>
to see that the DNS at least seems to be OK.
You can then "play MTA" by
telnet <remote mailhost> 25<Enter>
<You should see a greeting here, and be able to do>
EHLO <yourhostname.yourdomain><Enter>
QUIT<Enter>

to verify that you can reach the remote end via SMTP.

My guess as to what is going on is:
1) Unable to ascertain the MX for the remote domain (the pix has to let DNS through.... you say you can surf, so perhaps this isn't it;),
2) Unable to use SMTP due to a local iptables (netfilter) firewall,
3) Unable to use SMTP due to the PIX,
4) problem with the recipient address, or
5) problems on the remote side;-)

-- Glenn
0
 

Expert Comment

by:CleanupPing
ID: 9087812
eric1972:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 2

Expert Comment

by:TheWeakestLink
ID: 9286692
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept comments from Gns as answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheWeakestLink
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
If you don't know how to downgrade, my instructions below should be helpful.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question