LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-17-2002, 05:04 AM   #1
royb
LQ Newbie
 
Registered: Dec 2001
Location: Sydney, Australia
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
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.
 
Old 01-17-2002, 05:28 AM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
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
 
Old 01-18-2002, 04:28 PM   #3
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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
 
Old 01-18-2002, 05:57 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 01-18-2002, 06:23 PM   #5
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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
 
Old 01-18-2002, 07:39 PM   #6
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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).
 
Old 01-18-2002, 09:17 PM   #7
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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
 
Old 01-18-2002, 10:01 PM   #8
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 01-19-2002, 09:50 AM   #9
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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
 
Old 01-19-2002, 09:59 AM   #10
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 01-19-2002, 10:31 AM   #11
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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
 
Old 01-19-2002, 10:41 AM   #12
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 01-19-2002, 10:51 AM   #13
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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
 
Old 01-19-2002, 11:19 AM   #14
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 01-19-2002, 11:25 AM   #15
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
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.
 
  


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
external: domain of sender address does not exist talking to my server eagleone Linux - Networking 1 11-02-2005 09:54 AM
Sender domain must exist? J_Szucs Linux - Software 5 09-11-2003 12:38 AM
Sendmail: Domain of sender address does not exist 360 Linux - Networking 1 02-02-2003 09:40 PM
Sendmail Domain of sender address does not exist mantiev Linux - Networking 0 05-08-2001 08:58 AM
Mail Error: sender domain must exist ?? _TK_ Linux - Newbie 2 02-28-2001 10:49 PM


All times are GMT -5. The time now is 05:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration