LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-29-2004, 01:24 AM   #1
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 49
Help Getting Sendmail working Like I want it


My new project is getting Sendmail to work like I want it to. I'm a big fan of taking the path of least resistance, and so far doing a full Slackware install has provided me with everything I want with only little tweaks to configuration files and such. I'm hoping it will be relatively easy to get Sendmail doing what I want.

I'm running Slackware 9.1, upgraded to -current via SWareT, with the 2.6.5 kernel. Everything is pretty stock. I am using dyndns.org to make sure username.dyndns.org always points to my computer. There's no problem with that, as all of the dyndns.org updating is handled automatically by my router.

Sendmail is started up automatically via /etc/rc.d/rc.sendmail. In /etc/inetd.conf I uncommented the line
Code:
pop3    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/popa3d
I used netconfig to change my hostname to username and my domain name to dyndns.org. I ran the command
Code:
cp /usr/share/sendmail/sendmail-slackware-tls.cf /etc/mail/sendmail.cf
(I am hoping this allows me to use encrypted authentication.) I installled cyrus_sasl-2.1.18-i486-1jgr.tgz from http://www.linuxpackages.net . Made a symbolic link from /usr/local/lib/sasl2 to /usr/lib/sasl2 . I rebooted.

So I start testing things out. I use pine to check things out.
Mail from user@username.dyndns.org to root@username.dyndns.org ----> OK
Mail from root@username.dyndns.org to user@username.dyndns.org ----> OK
Mail from user@username.dyndns.org to username@hotmail.com --------> OK
Mail from username@hotmail.com to user@username.dyndns.org --------> OK

So far, so good, huh?

The problems begin.
Mail from user@username.dyndns.org to user@sbcglobal.net ------------> FAIL

I get a mail that says:


Date: Wed, 28 Apr 2004 22:54:21 -0700
From: Mail Delivery Subsystem <MAILER-DAEMON@username.dyndns.org>
To: user@dyndns.org
Subject: Returned mail: see transcript for details
Parts/Attachments:
1 Shown 12 lines Text
2 Shown 305 bytes Message, "Delivery Status"
3 Shown 699 bytes Message, "Test"
3.1 Shown 1 lines Text
----------------------------------------

The original message was received at Wed, 28 Apr 2004 22:54:19 -0700
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<user@sbcglobal.net>
(reason: 550 5.0.0 Access denied)

----- Transcript of session follows -----
... while talking to sbcmx3.prodigy.net.:
>>> MAIL From:<user@username.dyndns.org>
<<< 550 5.0.0 Access denied
554 5.0.0 Service unavailable

[ Part 2: "Delivery Status" ]

Reporting-MTA: dns; username.dyndns.org
Received-From-MTA: DNS; localhost
Arrival-Date: Wed, 28 Apr 2004 22:54:19 -0700

Final-Recipient: RFC822; user@sbcglobal.net
Action: failed
Status: 5.0.0
Diagnostic-Code: SMTP; 550 5.0.0 Access denied
Last-Attempt-Date: Wed, 28 Apr 2004 22:54:21 -0700


[ Part 3: "Included Message" ]

Date: Wed, 28 Apr 2004 22:54:18 -0700 (PDT)
From: User <user@username.dyndns.org>
To: user@sbcglobal.net
Subject: Test

Test


Oops!!! Have no idea what that's about. Any ideas?

Next, I go to work and try to set up Outlook Express to use my handy-dandy new mail server. I set the SMTP server to username.dyndns.org and the POP3 server also to username.dyndns.org . I click on (sic) "Server requires Authenication" and, feelibng lucky, I click on the (sic) "Server Requires SSL". Doesn't work. I get rid of the (sic) "Server Requires SSL" and try again. Looks like we are in cooking now. So I decide to test it out.

Recieve Messages from user@username.dyndns.org's mailbox -----> OK
Mail from user@username.dyndns.org to root@username.dyndns.org ----> OK
Mail from user@username.dyndns.org to username@hotmail.com --------> FAIL

I get the error message "Relaying Denied". DOH!!! So now, here's my questions. Why doesn't the SSL work? What am I missing? I am sure it is simple, but I'm new to the whole sendmail thing. Also, how do I make it so that I can use my mail server to send messages to remote hosts. I don't want to simply add my works host to a list of those allowed, as I would like for anyone I give an account to to be able to use my SMTP server from wherever they are at. The prefered solution seems to be something called SMTP AUTH, but it doesn't seem to be compiled into the Slackware version of Sendmail. I would really prefer not having to recompile Sendmail if at all possible.

Any help would be greatly appreciated. I have tried to give all of the important details, but I would be happy to supply any more necessary to figure out how to get this thing working.

TIA,

Shilo

Last edited by shilo; 04-29-2004 at 09:49 PM.
 
Old 04-29-2004, 09:40 AM   #2
rwlyons
LQ Newbie
 
Registered: Feb 2003
Distribution: Slackware!
Posts: 23

Rep: Reputation: 15
Check for port blocking from you ISP

I am having some problems with sendmail and dynamic DNS also. I am using using no-ip.com as my provider. I think that my ISP is blocking port 25 which is common from what I understand. I am not 100% but I am almost sure that is what my problem is. So you may want to look into that!

Robert
 
Old 04-29-2004, 11:01 AM   #3
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
Thanks for the tip. That isn't my problem, though, as I can verify from my work computer. I just fire up Windows Telnet (or HyperTerminal) and point it to username.dyndns.org port 25. I can connect with either of those to my home computer on port 25. You can check the same for yourself to see if the port is blocked. Another thing you might want to check, if you are using a router, is that port 25 is being forwarded to your linux box.

Thans for trying to help, though. Any other ideas?
 
Old 04-29-2004, 12:52 PM   #4
rwlyons
LQ Newbie
 
Registered: Feb 2003
Distribution: Slackware!
Posts: 23

Rep: Reputation: 15
I did see a How-to on your exact set-up that I have saved on my other computer, but I do remember that it talked about changes that need to be put in your:
etc/mail/access file and
etc/hosts.allow
what changes have you made there?
and when I get to my other system I will post the exact link

Robert
 
Old 04-29-2004, 01:25 PM   #5
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
I didn't make any changes to the /etc/hosts.allow and /etc/mail/access . My understanding is that I would have to enter the ip addresses or hostnames that are allowed to relay. Though that would be one solution, I am thinking it won't be the optimal one. It gets really messy when you plan on having many roaming users and you don't know what hosts they will be coming from. I'm more than willing to try the HOW-to, though.

Thanks again for all of your help,

Shilo
 
Old 04-29-2004, 08:34 PM   #6
rwlyons
LQ Newbie
 
Registered: Feb 2003
Distribution: Slackware!
Posts: 23

Rep: Reputation: 15
Sorry for the delay, this is the thread that I was talking about:

http://www.linuxquestions.org/questi...ords+slackware

I hope this helps...

Robert
 
Old 04-29-2004, 09:06 PM   #7
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
Thanks for the post. I'll check it out. Did you try out the telnet to see if your port was actually blocked? Try it from own computer telnet localhost 25 and try it from your work computer telnet user.no-ip.com 25. If it works from your own computer, but not from another, then maybe port 25 is blocked. If it doesn't work from either, port blocking isn't the problem.

Thanks again,

Shilo
 
Old 04-29-2004, 09:18 PM   #8
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
Doh!! I had already seen that post. That's where I figured out that I needed to use netconfig to change my hostname and domain name. My problem, and I could be wrong here, is that the article also recommends
Quote:
Add

localhost RELAY

to the "access" file

additional step I've found necessary add

sendmail:ALL

to /etc/hosts.allow
Though I believe that this would solve my problem, I believe it would also make my mailserver a huge spam relay. Please let me know if I am wrong in that regard. That has been why I am looking for an alternate secure solution.

Any ideas?

TIA,

Shilo

Last edited by shilo; 04-29-2004 at 09:48 PM.
 
Old 04-30-2004, 06:45 AM   #9
rwlyons
LQ Newbie
 
Registered: Feb 2003
Distribution: Slackware!
Posts: 23

Rep: Reputation: 15
Port 25 is blocked from my host. I actually asked them and they said that it was. no-ip.com will except my mail on port 25 and then forward it to another port number that I choose, but I have not played with that yet.

In terms of opening your box up to spam, While I am no sendmail expert by a long shots, I can tell you what I have come accross, and this is another thread that speaks to the antispam thing. I do not know if you have seen this, but it also may help:

http://www.linuxpackages.net/howto.p...Sendmail+Howto

Sorry I can not od more!

Robert
 
Old 04-30-2004, 09:54 PM   #10
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
rwlyons- Thanks for the link. I'll check it out.

Now some more of my problem. I nstalled the cyrus_sasl-2.1.18-i486-1jgr.tgz package, and part of my question was, why doesn't SSL seem to be working. I checked my /etc/var/maillog file and found the following:
Code:
Apr 30 13:32:53 username sm-mta[1441]: STARTTLS=server: file /etc/mail/certs/smtp.cert.pem unsafe: No such file or directory
Of coarse it doesn't work, I don't have any certificates! DUH on my part. So how so I make certificates so that there IS a file /etc/mail/certs/smtp.cert.pem ?

Any help always greatly appreciated,

Shilo
 
Old 05-01-2004, 03:20 PM   #11
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
So part of my problem is solved. Someone pointed out to me that the returned email I received from user@sbcglobal.net indicates that their mail server just doesn't like me. Still working on the rest, though. Any advice always appreciated.

TIA,

Shilo


*****NEW******

So I'm still looking for answers. Here's what I did next.
Code:
mkdir /var/state/saslauthd
/usr/bin/saslauthd -a shadow
Don't really know if that is something I was supposed to do or not. It made three files in /var/state/saslauthd , namely mux, mux.accept, and saslauthd.pid . I notice that when I reboot, those three files are gone. Am I getting somewhere? Didn't seem to change anything for me.

Last edited by shilo; 05-01-2004 at 06:33 PM.
 
Old 06-05-2004, 02:11 PM   #12
cojo
Member
 
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
Shilo,

I don't believe it sbcglobal.net problem. Because, I'm also trying to setup sendmail on my Fedora Core 1 system. I got my to send out mail to my user@sbcglobal.net account. The only problem I have is when my email arrived to my sbcglobal account. My email address show this "cojo@JServer.jndipietri.com.gateway.2wire.net"

My setup as follow:

SBC-DSL--->2Wire DSL Router--->Linksys workgroup switch--->Fedora Core 1--->Sendmail
 
Old 06-05-2004, 03:08 PM   #13
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 49
cojo-

Thanks for the tip. I haven't updated this thread in awhile. I've got sendmail working pretty much how I want it. My problem with sbcglobal.net was resolved by enabling relaying. The problem was that sbcglobal.net doesn't accept mail from my server. They do accept mail from my ISP's mail server (comcast.net) though, so I just had to set up relaying.

I outline the whole thing over at http://shilo.is-a-geek.com/slack/sendmail18.html

Check it out. Even though you are using Fedora, you might find some of it useful.

I seem to remember reading something about your specific problem, though. Try this:

Open up /etc/sendmail.cf

Look for a line that starts with Dj (Dj$w.Foo.COM)

change it to Djthenameofyourserver.com

Re-start sendmail and see if it works.
 
Old 06-07-2004, 09:34 AM   #14
cojo
Member
 
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
Shilo,

correction to the sbcglobal.net problem. I do get Fatal Error problem with sbcglobal.net now. I called SBC about it and they don't know what to do. I also found lot of people have the same problem and still don't have a fix to it yet.

BTW, I get my email address problem fixed. All I have to do was change my hosts file to this:

127.0.0.1 mydomain.com servername localhost.localdomain localhost
 
Old 06-07-2004, 01:34 PM   #15
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 30
Hi guys

Just a couple of points for you

127.0.0.1 mydomain.com servername localhost.localdomain localhost

Is bad, Sendmail checks this file to to find out which domain it is responsible for, in your case mydomain is it's host name and .com is the domain it is responsible for which is all of .com, open relay, not good, should read

127.0.0.1 servername.mydomain.com servername localhost.localdomain localhost

Problem now is Sendmail will only accept your email address as

yourname@servername.mydomain.com

To over come this add your domain name to /mail/local-host-names
as 'mydomain.com' no www

You should also have an entry in /mail/access
localhost.localdomain RELAY
localhost RELAY
Plus any IP addresses of local machines, if you have any, as 192.168.0.5 RELAY obviously use your own IP's

You should'nt need to modify, except /mail/sendmail.mc, any other Sendmail files, don't forget to navigate to your mail directory, in my case /etc/mail and type 'make' to make the files readable to Sendmail

Your problem with sbcglobal.net could be a DNS issue Sendmail checks every email it sends against DNS if the domain name can't be resolved it won't send it

In a terminal enter
Code:
]$ dig sbcglobal.net mx
See if your DNS servers can resolve the domain, if they can't that's your problem

Sorry if I've hijacked your thread, just trying to help

Regards

Pete
 
  


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
Sendmail Quota not working heislyc Linux - General 3 07-27-2005 11:40 PM
i am configure sendmail but it is not working raj_1 General 0 01-05-2005 05:38 PM
Sendmail / Mailertable not working! topkart94 Linux - Networking 6 03-05-2004 11:27 AM
Sendmail seems working but not Swift&Smart Linux - Software 2 05-14-2003 07:14 AM
Sendmail not working at all. EL3CTRO Linux - Networking 13 05-03-2003 06:06 AM


All times are GMT -5. The time now is 04:50 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration