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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
01-17-2002, 05:04 AM
|
#1
|
LQ Newbie
Registered: Dec 2001
Location: Sydney, Australia
Distribution: Fedora
Posts: 14
Rep:
|
Sender domain must exist.
Every time i send mail to my local isp via the modem i have it bounced back with the message
* *----- The following addresses had permanent fatal errors -----
royb@pss.net.au
* * (reason: 501 <royb@gateway.local>... Sender domain must exist)
I get the same for a lot of sites i have emailed to but not all. Some sites i can quite happily mail to with no problems.
I have been told sendmail is an absolute nightmare to configure and i should look at another mailer like qmail instead.
Is there a simple way to fix this problem with sendmail or do i just drop it and try qmail
Thanks for any help i receive.
|
|
|
01-17-2002, 05:28 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Rep:
|
Right now your using your machine as a mail server to mail out. Their mail servers, most of them in fact., check to see if the sender's address is legitmate before accepting the mail.
If you do not have a cononical domain name such as bobshouse.com or something, this will always happen, regardless of your mailserver. If you do have a domain name, and a static IP, this is easy to configure, just add the domain name and IP that sendmail should be associated with to /etc/hosts. Do not remove the localhost entry. Then just kill and re-start sendmail. The easies way to do this is to reboot the machine.
If you wanted to try and spoof the other machine, by say, calling yourself yahoo.com, well the other machine will do an nslookup to make sure that your IP matches the IP yahoo.com should be... and it will bounce. Bummer eh?
If your ISP will provide you with a static, its a breeze, and cheap, to run your own domain. A gaggle of people could help you with that on this forum.
Oh, and yes... Sendmail is a beast to try and fix, but luckily it almost never breaks.
Cheers,
Finegan
|
|
|
01-18-2002, 04:28 PM
|
#3
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
This sounds like my problem too. I have a static IP and a registered domain but how does adding it to hosts fix my problem? Sendmail still thinks I'm localhost@localdomain.
Do I need somthing in resolv.conf?
is the format for host ###.###.###.### tecsol.org localhost?
there's gotta be somehting to let sendmail know I'm tecsol.org
|
|
|
01-18-2002, 05:57 PM
|
#4
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
Have a look at your sendmail.cf file (/etc/sendmail.cf file or /etc/mail/sendmail.cf is your sendmail version is a newer one). The hostname can be hard-coded into it which would override any entries you have in /etc/hosts. I can't remeber by head which directive to look at (it's been ages since I last serviced Sendmail. Once I became a sendmail admin I gave up on sendmail and i'm a postfix advocate now. It's easier to manage, therefore making it a lot more scalable in my eyes and it's as good as sendmail if not better. It's been running 200+ days now on my server sending about 80,000 (eighty thousand) emails a day, and I've never noticed it in system performance, load avg. never goes above 0.02).
Anyways, my advice is clear I guess from this. Let's have a look at your sendmail.cf file but if you are in the position and willing, give postfix a try. I'm pretty sure you won't be sorry.
PS: one reason to keep sendmail is if you like playing with the Rulesets. They truely are a fun pass time if you have the time to kill.
|
|
|
01-18-2002, 06:23 PM
|
#5
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
It's a large file., could this be it? What would i change EXACTLY?
Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
CP.
# "Smart" relay host (may be null)
DS
|
|
|
01-18-2002, 07:39 PM
|
#6
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
run "sendmail -d0.1 -bt"
it may complain about no input. If that's the case, try sendmail -d0.1 -bt < /dev/null
it should give you some info like the hostname and other aliases it has found. Is it listing a canonical name (ie: the fully qualified domain name)?
Look especially at the value for $j. Output should be something like:
(canonical domain name) $j = my.domain.org
(i'm doing this by head, so exact phrase may be different).
If $j isn't what you expect it to be (instead it's a short name like an alias) it's because your 'hostname' output isn't proper, or /etc/hosts isn't setup right. This is a common problem on many distributions. I'm not going into how to fix it for every distribution, so instead of fixing the distro I'll just tell you to fix this problem in sendmail.cf (so it's a workaround).
In sendmail.cf find a line that begins with Dj.
If it doesn't exist, insert it yourself. Syntax is:
Djmy.domain.org
no spaces between Dj and the Fully Qualified Domain Name (FQDN).
|
|
|
01-18-2002, 09:17 PM
|
#7
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
I think I've found two alternatives
Djmydomain.org as you suggested in sendmail.cf
or FEATURE(`nocanonify') in sendmail.mc seems to work too.
thanks, I hope this stays together.
-tom
|
|
|
01-18-2002, 10:01 PM
|
#8
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
nocanonify isn't a great thing to do. It'll look like emails you send come from youruser@yourshortname (in my case it would be gerard@shadowfax) and remote systems will have a very hard time bouncing such a message later on since it has no idea what machine is gerard@shadowfax
Also you'll see that a lot of sites will not allow mail to be sent if the sender envelope doesn't contain an FQDN. Better to just have a yourdomain.org there and be done with it.
|
|
|
01-19-2002, 09:50 AM
|
#9
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
I see what you mean. Adding my domain doesn't seem to be 100% effective. I rune a mail script (perl cgi) and w/o the nocanonfy I can't use the switch -oi which tells me it's having problems with the address. To clarify adding my domain:
Does it have to be referenced elsewhere on my machine?
the "my" in my.domain.org , is the "www" or a username?
thanks
|
|
|
01-19-2002, 09:59 AM
|
#10
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
What exactly is the error message you get when using the -oi switch?
Either way, the best thing to do for email is that your sendmail is configured with the same hostname as the IP address of your machine resolves back into.
note that this isn't always identical to the contents of /etc/hosts - this isn't used by remote servers, just DNS is used. So the output of the 'hostname -f' command isn't always what you should enter in sendmail.
You should run "dig -x yourboxipaddress" and whatever it returns, that is what you give to Sendmail.
|
|
|
01-19-2002, 10:31 AM
|
#11
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
Heres the return of my IP, so I use nameserver.concentric.net (concentric is my isp)
[tom@localhost tom]$ dig -x 208.177.250.1
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5094
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;1.250.177.208.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.250.177.208.in-addr.arpa. 86400 IN PTR w001.z208177250.bos-ma.dsl.cnc.net.
;; AUTHORITY SECTION:
250.177.208.in-addr.arpa. 86400 IN NS nameserver1.concentric.net.
250.177.208.in-addr.arpa. 86400 IN NS nameserver2.concentric.net.
250.177.208.in-addr.arpa. 86400 IN NS nameserver3.concentric.net.
250.177.208.in-addr.arpa. 86400 IN NS nameserver.concentric.net.
;; ADDITIONAL SECTION:
nameserver.concentric.net. 7200 IN A 207.155.183.72
nameserver1.concentric.net. 7200 IN A 207.155.183.73
nameserver2.concentric.net. 7200 IN A 207.155.184.72
nameserver3.concentric.net. 7200 IN A 206.173.119.72
;; Query time: 64 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sat Jan 19 10:24:43 2002
;; MSG SIZE rcvd: 270
|
|
|
01-19-2002, 10:41 AM
|
#12
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
Quote:
Originally posted by te_conway
;; ANSWER SECTION:
1.250.177.208.in-addr.arpa. 86400 IN PTR w001.z208177250.bos-ma.dsl.cnc.net.
|
Okay, the IP address resolves back into w001.z208177250.bos-ma.dsl.cnc.net
Is this a dynamic IP address? It's best to tell sendmail to return that exact hostname when it's sending mail.
Now if this is a dynamic address it's kind of a pain to keep it in sync (you could create a script that will update the sendmail.cf file everytime you make an Internet connection). A better alternative would be using the smarthost feature (DS option I believe) and have your sendmail installation use your ISP's smtp server. This'll make sure email does arive at the place of destination without having to worry about your IP address and current hostname.
|
|
|
01-19-2002, 10:51 AM
|
#13
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
I have a Static IP, DSL 24x7
My domain points to a netgear router which directs traffic to my server.
Where do I put that cyptic string, in the Dj directive of sendmail.cf?
PS: Really appreaciate this help
|
|
|
01-19-2002, 11:19 AM
|
#14
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
Quote:
Originally posted by te_conway
I have a Static IP, DSL 24x7
My domain points to a netgear router which directs traffic to my server.
Where do I put that cyptic string, in the Dj directive of sendmail.cf?
PS: Really appreaciate this help
|
Yes, put it there.
PS: it may not work properly after you make that change. The router who's directing your traffic may be a problem causer along the way too, but we'll deal with that later. First try it, it may work (as I don't know anything about your network setup, who has what IP address, what the router does, ip_masq or not, etc, etc).
If sendmail won't work after having made this change, I'll ask some questions regarding your network setup.
PS, email to gerard@linuxfromscratch.org when you go test something. I can then check the mail.log at the linuxfromscratch.org server and see if there are some additonal clues.
|
|
|
01-19-2002, 11:25 AM
|
#15
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
The last few mails went thru OK with tecsol.org in sendmail.cf, if it fails again I will change it.
the example is
#Dj$w.Foo.COM
I would change to
Djw001.z208177250.bos-ma.dsl.cnc.net
or keep the $
Dj$w001.z208177250.bos-ma.dsl.cnc.net
Once again, thanks.
|
|
|
All times are GMT -5. The time now is 10:51 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|