LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2004, 04:53 AM   #1
quarter_ethan
LQ Newbie
 
Registered: Jul 2004
Distribution: SuSE personal 9.1
Posts: 4

Rep: Reputation: 0
How do I set up sendmail in Mandrake 10.0?


I've been running Linux for a few months now, and usually when I've had a problem I could read the man pages and online resources and get it. But with sendmail, no such luck.

All I want to do is send email from the command line. My impression is that I have to do it through another server (in my case, my SBC Yahoo DSL server), since emails I send straight from my box will usually get rejected as spam. If that's wrong, I'm happy to just send them through some server on my own machine -- whatever works.

I'm running Mandrake 10.0, I got sendmail 8.12.11 and sendmail-cf installed and have spent a lot of time messing with the sendmail.mc file, following the instructions from multiple sites.

I put the server's SMTP address in brackets and did everything they said, I make sure to run the m4 command and restart sendmail every time I change sendmail.mc, I've generated the authinfo.db file, and yet I still get the same error message every time.

Code:
WARNING: local host name (localhost) is not qualified; fix $j in config file
NOBODY@NOWHERE.COM... Connecting to [localhost] via relay...
220 localhost ESMTP Sendmail 8.12.11/8.12.11; Wed, 8 Dec 2004 01:32:34 -0800
>>> EHLO localhost
250-localhost Hello localhost [127.0.0.1], pleased to meet you
250 ENHANCEDSTATUSCODES
>>> MAIL From:<root@localhost>
550 5.0.0 Access denied
root... Using cached ESMTP connection to [localhost] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
postmaster... Using cached ESMTP connection to [localhost] via relay...
>>> RSET
250 2.0.0 Reset state
>>> MAIL From:<>
550 5.0.0 Access denied
Closing connection to [localhost]
>>> QUIT
221 2.0.0 localhost closing connection
I can't make much sense of this, but it looks to me like the program somehow never reaches the external SMTP server. A friend suggested I might need to change my hostname or something, but I'm basically stumped.

If there's any other information that would be valuable I'll post it ASAP. Thanks in advance for any help.
 
Old 12-08-2004, 05:07 AM   #2
kees-jan
Member
 
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
It looks like you are using telnet to connect to the sendmail on the local machine. Am I correct?

You might want to check if you are allowing relaying, otherwise, you can only send mail to local users.

I'm not sure the angle brackets <> are allowed in the MAIL From: line. Additionally, I think you need a space after the colon.
Either way, you are best off doing these experiments with your providers mailserver (or any properly configured mailserver, for that matter), to verify that your test procedure actually works.

You can configure sendmail to use a smarthost. In that case, all e-mail sent from your server will be sent to your provider first, which will then forward it to the final destination. this allows you to send mail from you host without it being classified as spam by the recipient (that is: this will be less probable).

Using telnet to a local mailserver is not the easiest way of sending mail from the commandline. Personally I prefer something like
Code:
sendmail -t recipient@his.domain.com < email-message-including-headers.txt
Good luck!

Kees-Jan
 
Old 12-08-2004, 07:13 PM   #3
quarter_ethan
LQ Newbie
 
Registered: Jul 2004
Distribution: SuSE personal 9.1
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for your reply, kees-jan.

And sorry, I should have been more specific. That big chunk of code I put in isn't me doing something manually. It is the automatic output when I enter:

Code:
mail -v nobody@nowhere.com
So, to answer your first question, I'm not (manually) telnetting over there, although I guess my machine is.

The brackets I was referring to are in the sendmail.mc file, around the url of the smtp server in the SMART_HOST definition, like so:

Code:
define(`SMART_HOST', `[smtp.sbcglobal.yahoo.com]')dnl
According to the sites I've read (can't link to them cause I'm new here), this prevents SBC from giving sendmail a bogus hostname nomail.yahoo.com. The brackets are there to make sure I get past their countermeasures (MX spoofing?) and get into the real server.

The problem is, sendmail isn't even reaching any server as far as I can see. Could this be because I'm behind a router? Or do I have to mess with /etc/hosts, /etc/sysconfig/network, or /etc/mail/local-host-names? I know very little about servers or networking; I'm just kinda an amateur home user, so this is all kinda bewildering.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up sendmail server raj_1 Linux - General 6 12-08-2004 11:20 AM
how to set up a sendmail human Debian 1 10-09-2004 11:05 PM
how to set up sendmail? feetyouwell Linux - Software 6 02-16-2004 11:15 AM
How to set up sendmail-8.12.10 and run? sarathmohan Linux - Newbie 0 09-22-2003 10:26 AM
RH9 Trying to set up sendmail @ Home... prix92 Linux - Newbie 2 07-20-2003 08:20 PM


All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration