LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sendmail problems (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-problems-568479/)

tekmann33 07-11-2007 01:19 PM

sendmail problems
 
I am having trouble getting sendmail to send mail to our email server on our internal network.


I have sendmail configured on a Fedora Core 6 machine that is on an internal 10.3.0.X network where I work. It will be used for Bugzilla to send messages to our staff for bug issues.

I can send email to my external hotmail account address, but not my internal email address.

First, I am not sure if this is correct, but I changed the hosts file to make it look like the machine is part of the internal domain.

Code:

# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1    FireCracker    localhost.localdomain  localhost

127.0.0.1      FireCracker    dupagels.lib.il.us      localhost

Then, I send an email to my hotmail account via sendmail and it does work. Then, I send an email to my work email account and it never arrives. I get this in my mailbox on the sendmail server.

Code:

From MAILER-DAEMON@dupagels.lib.il.us  Wed Jul 11 13:03:04 2007
Return-Path: <MAILER-DAEMON@dupagels.lib.il.us>
Received: from dupagels.lib.il.us (FireCracker [127.0.0.1])
        by dupagels.lib.il.us (8.13.8/8.13.8) with ESMTP id l6BI34F0016971
        for <postmaster@dupagels.lib.il.us>; Wed, 11 Jul 2007 13:03:04 -0500
Received: from localhost (localhost)
        by dupagels.lib.il.us (8.13.8/8.13.8/Submit) id l6BI2x7r016970;
        Wed, 11 Jul 2007 13:03:04 -0500
Date: Wed, 11 Jul 2007 13:03:04 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@dupagels.lib.il.us>
Message-Id: <200707111803.l6BI2x7r016970@dupagels.lib.il.us>
To: postmaster@dupagels.lib.il.us
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="l6BI2x7r016970.1184176984/dupagels.lib.il.us"
Subject: Postmaster notify: see transcript for details
Auto-Submitted: auto-generated (postmaster-notification)

This is a MIME-encapsulated message

--l6BI2x7r016970.1184176984/dupagels.lib.il.us

The original message was received at Wed, 11 Jul 2007 13:03:04 -0500
from localhost
with id l6BI2x7q016970

  ----- The following addresses had permanent fatal errors -----
SysTechGuy
    (reason: 550 5.1.1 <SysTechGuy@dupagels.lib.il.us>... User unknown)
    (expanded from: SysTechGuy)

  ----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <SysTechGuy@dupagels.lib.il.us>... User unknown
550 5.1.1 SysTechGuy... User unknown
<<< 503 5.0.0 Need RCPT (recipient)
--l6BI2x7r016970.1184176984/dupagels.lib.il.us
Content-Type: message/delivery-status

Reporting-MTA: dns; dupagels.lib.il.us
Arrival-Date: Wed, 11 Jul 2007 13:03:04 -0500

Final-Recipient: RFC822; SysTechGuy@dupagels.lib.il.us
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 550 5.1.1 <SysTechGuy@dupagels.lib.il.us>... User unknown
Last-Attempt-Date: Wed, 11 Jul 2007 13:03:04 -0500

--l6BI2x7r016970.1184176984/dupagels.lib.il.us
Content-Type: message/rfc822

Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
        by dupagels.lib.il.us (8.13.8/8.13.8/Submit) id l6BI2x7q016970;
        Wed, 11 Jul 2007 13:03:04 -0500
Date: Wed, 11 Jul 2007 13:03:04 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <200707111803.l6BI2x7q016970@dupagels.lib.il.us>
To: SysTechGuy
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="l6BI2x7q016970.1184176984/dupagels.lib.il.us"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--l6BI2x7q016970.1184176984/dupagels.lib.il.us

The original message was received at Wed, 11 Jul 2007 13:02:59 -0500
from root@localhost

  ----- The following addresses had permanent fatal errors -----
:
  ----- The following addresses had permanent fatal errors -----
bclanton@dupagels.lib.il.us
    (reason: 550 5.1.1 <bclanton@dupagels.lib.il.us>... User unknown)
    (expanded from: bclanton@dupagels.lib.il.us)

  ----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <bclanton@dupagels.lib.il.us>... User unknown
550 5.1.1 bclanton@dupagels.lib.il.us... User unknown
<<< 503 5.0.0 Need RCPT (recipient)

--l6BI2x7q016970.1184176984/dupagels.lib.il.us
Content-Type: message/delivery-status

Reporting-MTA: dns; dupagels.lib.il.us
Arrival-Date: Wed, 11 Jul 2007 13:02:59 -0500

Final-Recipient: RFC822; bclanton@dupagels.lib.il.us
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 550 5.1.1 <bclanton@dupagels.lib.il.us>... User unknown
Last-Attempt-Date: Wed, 11 Jul 2007 13:03:04 -0500

--l6BI2x7q016970.1184176984/dupagels.lib.il.us
Content-Type: message/rfc822

Return-Path: <SysTechGuy>
Received: (from root@localhost)
        by dupagels.lib.il.us (8.13.8/8.13.8/Submit) id l6BI2x7p016970
        for bclanton@dupagels.lib.il.us; Wed, 11 Jul 2007 13:02:59 -0500
Date: Wed, 11 Jul 2007 13:02:59 -0500
From: SysTechGuy
Message-Id: <200707111802.l6BI2x7p016970@dupagels.lib.il.us>

This is a test.
This is a test.

--l6BI2x7q016970.1184176984/dupagels.lib.il.us--


--l6BI2x7r016970.1184176984/dupagels.lib.il.us--

I tried altering the sendmail.mc file by changing the SMART_HOST line by deleting the first dn1 comment and then changed the 'smtp.your.provider" to the domain name of our email server here on site. I restarted sendmail after I made these changes, but I am still having the same issue with sending email to email addresses within the private network.

I checked the barracuda firewall on our network and I do not see anything that was blocked from my address on the sendmail server.


I believe that there is a networking issue here that I am just not understanding.

lord-fu 07-11-2007 02:43 PM

Hi,

Try adding you smart host's ip address instead or add the smart host to /etc/hosts.
I would not alter the first line in /etc/hosts at all. I would add a newline for your machine. example:

127.0.0.1 localhost localhost.localdomain
10.0.1.2 myhost myhost.domain
10.0.1.3 smarthost smarthost.domain

Try to rebuild sendmail, you didn't say if you did or not, you only said you restarted it.

Code:

make -C /etc/mail
Code:

service sendmail restart
Try again, and tail maillog

Code:

tail -f /var/log/maillog
Go through a reboot if possible, I know it's not always needed but I have ran into a few cases with sendmail after I made changes when they would not work untill after a reboot :\

If that doesn't work post the output from the the last few lines of the failed email from the tail of maillog.

Hope it helps some, I have a few other ideas but that will start you off.

tekmann33 07-11-2007 04:31 PM

Okay...Here is my hosts file. I did not change the first line but added the others.

Code:

# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1    FireCracker    localhost.localdomain  localhost

127.0.0.1      localhost      localhost.dupagels.lib.il.us
10.3.0.99      FireCracker    FireCracker.dupagels.lib.il.us
10.1.0.10      dupagels.lib.il.us

10.3.0.99 is the Fedora Core 6 sendmail server where sendmail and Bugzilla reside on.

10.1.0.10 is the address of the internal email server. My POP3 Outlook client pulls email from my mailbox on this server and takes it to my XP desktop.


The only thing I changed in sendmail.mc is the SMARTHOST line, which is now the following:

Code:

define(`SMART_HOST', `dupagels.lib.il.us')dnl
As you can see, I uncommented the line (removed the first dnl comment tag) and added dupagels.lib.il.us...the name of the email server.

I rebuilt sendmail with the make command and restarted senmail. Just to be sure, I also did a reboot.


However, I still cannot send mail to my work email address. My hotmail address is no problem. Here is the output in /var/log/maillog

Code:

Jul 11 16:04:41 FireCracker sendmail[3160]: l6BL4amP003160: from=SysTechGuy, size=15, class=0, nrcpts=1, msgid=<200707112104.l6BL4amP003160@FireCracker.dupagels.lib.il.us>, relay=root@localhost
Jul 11 16:04:41 FireCracker sendmail[3162]: l6BL4f0u003162: from=<SysTechGuy@FireCracker.dupagels.lib.il.us>, size=349, class=0, nrcpts=1, msgid=<200707112104.l6BL4amP003160@FireCracker.dupagels.lib.il.us>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jul 11 16:04:41 FireCracker sendmail[3160]: l6BL4amP003160: to=bclanton@dupagels.lib.il.us, ctladdr=SysTechGuy (501/501), delay=00:00:05, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l6BL4f0u003162 Message accepted for delivery)
Jul 11 16:04:41 FireCracker sendmail[3164]: l6BL4f0u003162: to=<bclanton@dupagels.lib.il.us>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120349, relay=cuda.dupagels.lib.il.us. [10.1.0.11], dsn=5.1.1, stat=User unknown
Jul 11 16:04:41 FireCracker sendmail[3164]: l6BL4f0u003162: to=<SysTechGuy@FireCracker.dupagels.lib.il.us>, delay=00:00:00, mailer=local, pri=120349, dsn=5.1.1, stat=User unknown
Jul 11 16:04:41 FireCracker sendmail[3164]: l6BL4f0u003162: l6BL4f0u003164: postmaster notify: User unknown
Jul 11 16:04:41 FireCracker sendmail[3164]: l6BL4f0u003164: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31603, dsn=2.0.0, stat=Sent


Here is the mail root gets when I send a message to the dupagels.lib.il.us account:

Code:

From MAILER-DAEMON@FireCracker.dupagels.lib.il.us  Wed Jul 11 16:04:41 2007
Return-Path: <MAILER-DAEMON@FireCracker.dupagels.lib.il.us>
Received: from localhost (localhost)
        by FireCracker.dupagels.lib.il.us (8.13.8/8.13.8) id l6BL4f0u003164;
        Wed, 11 Jul 2007 16:04:41 -0500
Date: Wed, 11 Jul 2007 16:04:41 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@FireCracker.dupagels.lib.il.us>
Message-Id: <200707112104.l6BL4f0u003164@FireCracker.dupagels.lib.il.us>
To: postmaster@FireCracker.dupagels.lib.il.us
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="l6BL4f0u003164.1184187881/FireCracker.dupagels.lib.il.us"
Subject: Postmaster notify: see transcript for details
Auto-Submitted: auto-generated (postmaster-notification)

This is a MIME-encapsulated message

--l6BL4f0u003164.1184187881/FireCracker.dupagels.lib.il.us

The original message was received at Wed, 11 Jul 2007 16:04:41 -0500
from localhost [127.0.0.1]
with id l6BL4f0u003162

  ----- The following addresses had permanent fatal errors -----
<bclanton@dupagels.lib.il.us>
    (reason: 550 <SysTechGuy@FireCracker.dupagels.lib.il.us>: Sender address rejected: Domain not found)

  ----- Transcript of session follows -----
... while talking to cuda.dupagels.lib.il.us.:
>>> DATA
<<< 550 <SysTechGuy@FireCracker.dupagels.lib.il.us>: Sender address rejected: Domain not found
550 5.1.1 <bclanton@dupagels.lib.il.us>... User unknown
<<< 554 Error: no valid recipients
550 5.1.1 <SysTechGuy@FireCracker.dupagels.lib.il.us>... User unknown

--l6BL4f0u003164.1184187881/FireCracker.dupagels.lib.il.us
Content-Type: message/delivery-status

Reporting-MTA: dns; FireCracker.dupagels.lib.il.us
Received-From-MTA: DNS; localhost
Arrival-Date: Wed, 11 Jul 2007 16:04:41 -0500

Final-Recipient: RFC822; bclanton@dupagels.lib.il.us
Action: failed
Status: 5.1.1
Remote-MTA: DNS; cuda.dupagels.lib.il.us
Diagnostic-Code: SMTP; 550 <SysTechGuy@FireCracker.dupagels.lib.il.us>: Sender address rejected: Domain not found
Last-Attempt-Date: Wed, 11 Jul 2007 16:04:41 -0500

--l6BL4f0u003164.1184187881/FireCracker.dupagels.lib.il.us
Content-Type: message/rfc822

Return-Path: <SysTechGuy@FireCracker.dupagels.lib.il.us>
Received: from FireCracker.dupagels.lib.il.us (localhost [127.0.0.1])
        by FireCracker.dupagels.lib.il.us (8.13.8/8.13.8) with ESMTP id l6BL4f0u003162
        for <bclanton@dupagels.lib.il.us>; Wed, 11 Jul 2007 16:04:41 -0500
Received: (from root@localhost)
        by FireCracker.dupagels.lib.il.us (8.13.8/8.13.8/Submit) id l6BL4amP003160
        for bclanton@dupagels.lib.il.us; Wed, 11 Jul 2007 16:04:36 -0500
Date: Wed, 11 Jul 2007 16:04:36 -0500
From: SysTechGuy@FireCracker.dupagels.lib.il.us
Message-Id: <200707112104.l6BL4amP003160@FireCracker.dupagels.lib.il.us>

This is a test

--l6BL4f0u003164.1184187881/FireCracker.dupagels.lib.il.us--

I am perplexed.

tekmann33 07-11-2007 04:41 PM

I made a slight change. It seems that my hosts file is incorrect. I changed it to the following:
Code:

# Do not remove the following line, or various programs
# that require network functionality will fail.
#::1    FireCracker    localhost.localdomain  localhost

127.0.0.1      localhost      localhost.dupagels.lib.il.us
10.1.0.10      dupagels.lib.il.us

The host name is "FireCracker" FireCracker is not a domain.

I resent the sendmail message to my dupagels.lib.il.us account, but this time, I did not get a failed messge in my /var/mail/root mailbox. However, I got a different maillog message:

Code:

Jul 11 16:29:13 FireCracker sendmail[3324]: l6BLT9N5003324: from=SysTechGuy, size=15, class=0, nrcpts=1, msgid=<2
00707112129.l6BLT9N5003324@FireCracker>, relay=root@localhost
Jul 11 16:29:13 FireCracker sendmail[3325]: l6BLTDt6003325: from=<SysTechGuy@FireCracker>, size=292, class=0, nrc
pts=1, msgid=<200707112129.l6BLT9N5003324@FireCracker>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jul 11 16:29:13 FireCracker sendmail[3324]: l6BLT9N5003324: to=bclanton@dupagels.lib.il.us, ctladdr=SysTechGuy (5
01/501), delay=00:00:04, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat
=Sent (l6BLTDt6003325 Message accepted for delivery)
Jul 11 16:29:13 FireCracker sendmail[3327]: l6BLTDt6003325: to=<bclanton@dupagels.lib.il.us>, delay=00:00:00, xde
lay=00:00:00, mailer=relay, pri=120292, relay=cuda.dupagels.lib.il.us. [10.1.0.11], dsn=5.0.0, stat=Service unava
ilable
Jul 11 16:29:13 FireCracker sendmail[3327]: l6BLTDt6003325: l6BLTDt6003327: DSN: Service unavailable
Jul 11 16:29:13 FireCracker sendmail[3327]: l6BLTDt6003327: to=<SysTechGuy@FireCracker>, delay=00:00:00, mailer=l
ocal, pri=31527, dsn=4.4.3, stat=queued

The cuda.dupagels.lib.il.us is our Barracuda Spam Filter.

Still not receiving any email from dupagels.lib.il.us address.


All times are GMT -5. The time now is 11:58 AM.