LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-02-2003, 04:06 PM   #1
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Rep: Reputation: 15
Sendmail Woes!


I am using sendmail for my mail server here at work. I just got it setup and I edited the .mc file and got everything working. I also added some stuff to the .mc file to limit the number of connections and number of children so that I could limit DoS attacks on our mail system.

My problem is. Mail is working great when you use the full hostname such as user@mail.domain.com.

How would I go about removing the mail from this address to produce an address like user@domain.com? I have done it before but it has been 2 years since I last fixed such a problem. I have searched the net for 4 hours looking for an answer, so now I am posting a message here to get help with this.

Also I uncommented the line Dj$w.domain.com and put my domain name into it and still it will not accept email that does not contain the "mail" hostname in it. I even changed the line to read like this Djdomain.com and it still did not work. I restarted sendmail after each of these, and I have did countless other things in attempts to get it to work.

Help please.

Thanks for any help in advance.

Last edited by rkane; 06-02-2003 at 04:07 PM.
 
Old 06-02-2003, 07:17 PM   #2
jsf03723
LQ Newbie
 
Registered: Jun 2003
Location: San Diego, CA, USA
Distribution: redhat 7/8/9, mandrake, smoothwall corporate 3.0
Posts: 20

Rep: Reputation: 0
Masquerading

Look at your sendmail.mc file, and add some lines such as the following:
MASQUERADE_AS(`domain.com')dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(domain.com)dnl

Then re-generate sendmail.cf from that .mc file.

Works for me,
Jim
 
Old 06-03-2003, 07:11 AM   #3
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
Ok, now this is getting confusing.

I can now send a message through outlook express with my account name setup without the 'mail' part of the address. So that problem is fixed. But if I send mail to myself without the 'mail' part of the address I get a error message that says.

Relaying denied. IP name lookup failed [ip address]
 
Old 06-03-2003, 07:42 AM   #4
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
I got rid of part of this message.
I added my computers IP address to the /etc/hosts file which eliminated the IP name lookup failed error.

That's progress I guess!

Still won't send the mail though.
 
Old 06-03-2003, 07:59 AM   #5
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
Ok I figured it out.
It wasn't in my sendmail.cf file after all.
It was in my submit.cf file.

I just had to change the line for smart relay to read:
DSlocalhost

instead of:
DS

Now I am accepting mail from the outside and I can send mail from the inside to the inside. Only test left is from the inside to the outside. Lets try that now.....

Ack that won't work now. Sheesh! Will the problem never end.

Now I am trying to send mail from my server to the real world.
I have my resolv.conf file setup to look at my ISP's DNS server, but I cannot get it to send outside. I am getting the same relay denied error!

Do I need to turn relaying on or something? Isn't that a security issue?

Help please.

Last edited by rkane; 06-03-2003 at 08:03 AM.
 
Old 06-03-2003, 02:28 PM   #6
jsf03723
LQ Newbie
 
Registered: Jun 2003
Location: San Diego, CA, USA
Distribution: redhat 7/8/9, mandrake, smoothwall corporate 3.0
Posts: 20

Rep: Reputation: 0
Alas, too far for me

Alas, you have now gone further than my implementation currently takes me. Right now, I can email out from my mail server, or receive mail locally, but cannot POP3 or SMTP connect to it. So, I need a little more time before I can offer more input.
I will keep watching the thread, and may be able to add to it before too long, but can not offer you much else just now.
 
Old 06-03-2003, 02:39 PM   #7
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
Ok, I can send mail out from my mail server to the real world. But I will have to figure out the settings to get Outlook to work right on sending mail.

Now I have to figure out how to get it to accept mail from the internet. One more step toward total email freedom.
 
Old 06-03-2003, 03:30 PM   #8
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
Here is the error message that I am getting now when I send an email through outlook 2002 on my computer.

550 5.7.1 <user@externaldomain.com>... Relaying denied

But I can send email through pine perfectly fine to the same address.
 
Old 06-03-2003, 03:51 PM   #9
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
OK now I'm down to the last thing. I cannot get it to accept email from the outside. I finally got it to send mail to anywhere I ask it to from outlook by adding the relay_entire_domain feature and adding my domain to the relay-domains file.

Now I just need one more thing I cannot get it to accept email from the internet. Help if you can?
 
Old 06-03-2003, 04:09 PM   #10
jsf03723
LQ Newbie
 
Registered: Jun 2003
Location: San Diego, CA, USA
Distribution: redhat 7/8/9, mandrake, smoothwall corporate 3.0
Posts: 20

Rep: Reputation: 0
So, next up... I modified the ipchains rules in use on my machine, and now I can accept POP3 connections and deliver email. Still having difficulty sending email out from my desktop through the mail server to the big bad internet, but that will come shortly. Currently operating with no ipchains in the way, so that is not the issue for port 25 traffic.

What change did you make to submit.mc to make the DS / DSlocalhost change in submit.cf?

As for taking email from the internet and accepting it locally: That will have to come after I get connections on 25 working, then I will look at that one.
 
Old 06-03-2003, 04:12 PM   #11
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
I didn't change the .mc file. I just edited the .cf file even though it says in big letters. DO NOT EDIT THIS FILE.
 
Old 06-03-2003, 04:26 PM   #12
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
I don't believe that editing submit.cf will fix the accept email from internet problem, but it will allow you to send and receive email on your local machine.

I still have not received an email from outside yet.

I'll be back tomorrow to try some more.
 
Old 06-03-2003, 05:36 PM   #13
jsf03723
LQ Newbie
 
Registered: Jun 2003
Location: San Diego, CA, USA
Distribution: redhat 7/8/9, mandrake, smoothwall corporate 3.0
Posts: 20

Rep: Reputation: 0
Scratch that, found what needed to change. In one of the .mc files (sendmail.mc in my case) had to change
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
to
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
so that the sendmail daemon would listen for more than localhost connections. Changed my .mc files, rebuilt the .cf files, restarted sendmail, and now I can send email from my desktop out through the mail server.

Also, as you indicated, to allow relaying from my desktop, I had to add my desktop's IP to the mailserver's /etc/hosts file... which is less than ideal, as I will want to allow anyone on 192.168.10.x to use this box for outbound email. However, it works for now, and will probably get the whole internal LAN able to relay soon.
 
Old 06-03-2003, 10:09 PM   #14
rkane
Member
 
Registered: May 2003
Location: Ohio
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: 15
I believe you don't need to add you ip to the /etc/hosts file if you put the line:

FEATURE(`relay_entire_domain')dnl

and then create the file /etc/mail/relay-domains
with domain.com in it.

Try that out, should allow anyone on your domain to send mail.
 
Old 06-04-2003, 07:14 PM   #15
jsf03723
LQ Newbie
 
Registered: Jun 2003
Location: San Diego, CA, USA
Distribution: redhat 7/8/9, mandrake, smoothwall corporate 3.0
Posts: 20

Rep: Reputation: 0
Right, that FEATURE(`relay_entire_domain') and the change to /etc/mail/relay-domains took care of it for me.
Looks like I have POP3 and outbound email. Have a subset of inbound email, will probably have more once I can put this machine on its ultimate IP and start receiving the bulk of our mail on it.

Today, setting up Spamassassin, razor, dcc, and pyzor to have even more fun with the inbound email - however, that is a topic for a different thread I think.
 
  


Reply



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
Sendmail Spam / Upgrade woes marcusmiller Linux - Software 1 08-03-2005 07:03 AM
Sendmail woes caps_phisto Linux - Networking 4 12-30-2004 06:33 AM
sendmail woes dkw Linux - Networking 3 07-28-2004 03:40 AM
sendmail woes. nikhil93 Linux - General 2 03-29-2004 02:06 PM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:44 PM.

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
Open Source Consulting | Domain Registration