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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail works on some emails, not others

Status
Not open for further replies.

zsfhaergta

Programmer
Oct 6, 2008
26
0
0
US
Hi,

I am trying to set up my sendmail configuration so I can sent email from my local server. I use the command:

$ mail -s test mymail@mydomain.com <<MAIL
> test
> MAIL

For certain email addresses, sendmail works fine. For others, the mail never arrives. I assume the receiving email servers have a filter that prevents this from happening. I tried changing the domain name using the MASQUERADE in sendmail.cf/sendmail.mc, but this did not help. Any ideas how to get sendmail to work for all emails?

Thanks,
Allen
 
Are all of the receiving e-mail servers on the same network?

Are you sending directly to the other mail servers or are you forwarding the messages through another server?

Are there MX records in your router for all of the mail servers?

Mark
 
In addition, do you have an SPF record? Some places do check that (if you send mail directly.)
 
Thanks, so I am obviously new to sendmail. I am trying to send mail from my local workstation(which I don't think is a mail server), and I don't believe there is a dedicated mail server on our network. What I don't get is that if I can send the mail to my gmail account, my local workstation must be set up as a mail server right?

If a dedicated mail server is needed I can get one outside the network. However, I tried using
define(`SMART_HOST',`outside.mail.server')dnl
but then all mail I tried to send stopped working, including the gmail which worked previously. Is there something else I'm missing(I'm sure there is)

Where can I find the MX and SPF records?


Here is one of the return emails I got:

From MAILER-DAEMON@pluto Thu Nov 20 16:29:40 2008
Date: Thu, 20 Nov 2008 16:04:21 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@pluto>
To: <achen@pluto>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="mAKL4LQu007110.1227215061/pluto"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--mAKL4LQu007110.1227215061/pluto

The original message was received at Thu, 20 Nov 2008 16:04:18 -0500
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<allenc84@ucla.edu>
(reason: 553 5.1.8 <achen@pluto>... Domain of sender address achen@pluto does not exist)

----- Transcript of session follows -----
451 pluto: Name server timeout
451 pluto: Name server timeout
451 pluto: Name server timeout
... while talking to smtp.ucla.edu.:
>>> MAIL From:<achen@pluto> SIZE=501
<<< 553 5.1.8 <achen@pluto>... Domain of sender address achen@pluto does not exist
501 5.6.0 Data format error
451 pluto: Name server timeout
451 pluto: Name server timeout

--mAKL4LQu007110.1227215061/pluto
Content-Type: message/delivery-status

Reporting-MTA: dns; pluto
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Thu, 20 Nov 2008 16:04:18 -0500

Final-Recipient: RFC822; allenc84@ucla.edu
Action: failed
Status: 5.1.8
Diagnostic-Code: SMTP; 553 5.1.8 <achen@pluto>... Domain of sender address achen@pluto does not exist
Last-Attempt-Date: Thu, 20 Nov 2008 16:04:21 -0500

--mAKL4LQu007110.1227215061/pluto
Content-Type: message/rfc822

Return-Path: <achen@pluto>
Received: from pluto (localhost.localdomain [127.0.0.1])
by pluto (8.13.1/8.13.1) with ESMTP id mAKL4IQu007108
for <allenc84@ucla.edu>; Thu, 20 Nov 2008 16:04:18 -0500
Received: (from achen@localhost)
by pluto (8.13.1/8.13.1/Submit) id mAKL4In6007072
for allenc84@ucla.edu; Thu, 20 Nov 2008 16:04:18 -0500
Date: Thu, 20 Nov 2008 16:04:18 -0500
From: Allen Chen <achen@pluto>
Message-Id: <200811202104.mAKL4In6007072@pluto>
To: allenc84@ucla.edu
Subject: test

test

--mAKL4LQu007110.1227215061/pluto--



Thanks,
Allen

 
<allenc84@ucla.edu>
(reason: 553 5.1.8 <achen@pluto>... Domain of sender address achen@pluto does not exist)

This is the problem. Most mail servers, including the ones I run, check to see if 1.) There's an SPF record for the domain and 2.) Whether or not the host the mail came from is even valid.

Yours is failing on #2. Your machine is not set up as a mail server for a real domain (pluto is not a valid domain on the web. You'd need a FQDN like pluto.com, pluto.us, etc...)

Once you did that the MX and SPF records are configured through your domain name host.

Large places such as hotmail and gmail may or may not deliver your message. In our case, we needed to send to some hotmail users and were denied until I set a SPF record.

The MX record itself is what points to a mail server for a given domain. There's plenty of stuff out there for configuring this.

Some info on SPF records:
Alternatively, you can send stuff through a smart host. In order to do this, most places require authentication to relay mail through. Your single line you stated above is not enough to do this - you have to specify a username and password for most smart hosts - time to dig through the docs a little as I don't remember how to do that off hand.
 
Maybe try changing your local machine hostname to pluto.org. You may get lucky on some of the servers which might not check for it.

Also, I misspoke (thanks to danomac for the mention). I said router, when I meant DNS server. The MX record point to a mail exchange server. While it's not required on a local network, i.e. using the IP or hostname directly, it will be a necessity on a larger scale.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top