SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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]
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?
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.
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.
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?
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.