Walkthrough on receiving email with sendmail on Red Hat Enterprise Linux 4

Posted on 2006-05-18
Last Modified: 2013-12-16
My quest to receive email with sendmail started 14 months ago on RHEL3.  Now that I have a server with RHEL4 I am willing to give it another shot.  Keep in mind this is a plain RHEL4 without any control panel.

I have studied many articles and read/posted in many forums to no avail.  I'm not sure if anyone really understands sendmail.  (Can you tell I've had it up to my eyeballs in frustration. ;D)

I'll start from the very beginning of the process and allow you to walk me through it.

I type the following command to listen to port 25 for any activity:
[root@plain /]# tcpdump -i eth0 port 25
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes

Then, I send an email to the domain name of the server from my gmail account and watch the putty window to see if there is activity.  I immediately get this kind of stuff, which shows me that email is successfully hitting the server:
18:54:13.994095 IP > S 2617874197:2617874197(0) win 5720 <mss 1430,sackOK,timestamp 4292017532 0,nop,wscale 0>
18:54:13.994178 IP > R 0:0(0) ack 2617874198 win 0

From what I read, after setting things up right, the mail is supposed to end up in /var/spool/mail/.  I have high hopes for this working, but every time I try to apply the things that I read, it never works.  As far as I can tell, the problem ISN'T between screen and keyboard.  I have managed to accomplish a lot already by following directions.

If I could pay Experts Exchange $100 to give 10,000 points to whoever solves this for me, I would gladly give it.  I wish they had some kind of special option to pay for special operations.

Genuinely looking forward to this!

Question by:davidpesta
    LVL 15

    Accepted Solution

    I think you are digging too deep to begin with, you don't need to go to TCP level to see if SMTP protocol is working on your server.

    What you do is from some other remote computer, telnet to port 25 like:

    telnet 25

    If you see something like:

    220 ESMTP

    after you telnet in, your transport protocol layer is fine and you should troubleshoot the delivery problems looking at sendmail logs (/var/log/maillog). If you don't get this, then either your firewall is blocking incoming port 25 or your sendmail is not listening to port 25 on external IP addresses (WHICH IS THE DEFAULT BY THE WAY!!! IT BINDS TO ONLY!).
    LVL 5

    Expert Comment

    not able to understand your question... Do u wanna see the SMTP traffic on Linux box?

    tcpdump is on packet level or /var/log/maillog sendmail logs is good idea to see

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    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.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now