# Trying to Get Sendmail to work in 10.2.1



## trex (Oct 6, 2002)

Hello all

I'm trying to get sendmail to work in 10.2.1

I followed the instructions in the O'Reilly article in the link below.

http://www.macdevcenter.com/pub/a/mac/2002/09/10/sendmail.html 

Sendmail does work if I send mail to an address that does not exist. Like this in the terminal.

% mail doesntexist

it looks up my aliases file and sends an email to the proper address stating mail could not be delivered.  this is part of the email.

  ----- The following addresses had permanent fatal errors -----
myemail@pacbell.net
    (reason: 553 5.1.8 <sonic@g4.domain.com>... Domain of sender address sonic@g4.domain.com does not exist)
    (expanded from: test)

in addition if I try sending mail this way I get the following errors in the mail.log

% sendmail -v myemail@pacbell.net
test
.

Oct  6 14:02:00 G4 sendmail[634]: gethostbyaddr(192.168.0.216) failed: 3
Oct  6 14:02:05 G4 sendmail[634]: g96L20uN000634: from=sonic, size=30, class=0, nrcpts=1, msgid=<200210062102.g96L20uN000634@g4.domain.com>, relay=sonic@localho$
Oct  6 14:02:06 G4 sendmail[634]: g96L20uN000634: to=myemail@pacbell.net, ctladdr=sonic (501/20), delay=00:00:06, xdelay=00:00:01, mailer=esmtp, pri=30009, rela$
Oct  6 14:19:23 G4 sendmail[641]: gethostbyaddr(192.168.0.216) failed: 3


And if I try sending mail from a php script running on apache I get this error in mail.log:

Oct  6 14:19:24 G4 sendmail[641]: g96LJNVY000641: from=www, size=340, class=0, nrcpts=1, msgid=<200210062119.g96LJNVY000641@g4.domain.com>, relay=www@localhost  
Oct  6 14:19:25 G4 sendmail[643]: g96LJNVY000641: to=myemail@pacbell.net, ctladdr=www (70/70), delay=00:00:02, xdelay=00:00:01, mailer=esmtp, pri=30109, relay=$
Oct  6 14:19:25 G4 sendmail[643]: g96LJNVY000641: g96LJPVX000643: DSN: Data format error
Oct  6 14:19:27 G4 sendmail[643]: g96LJPVX000643: to=www, delay=00:00:02, xdelay=00:00:02, mailer=local, pri=31364, dsn=2.0.0, stat=Sent

Could it be that this has something to do with Rendezvous.  I keep seeing g4.local in other areas.  Maybe Rendezous is screwing something up.  Any suggestions

Thanks in advance....


----------



## trex (Oct 7, 2002)

I set my IP address - 192.168.0.216 in the /etc/hosts file like so:

192.168.0.216 mail.g4.com localhost

and this eliminates the gethostbyaddr(192.168.0.216) failed: 3 error in mail.log.  But I still can't send mail even though the log says it went through OK.

any suggestions greatly appreciated


----------



## abacsalmasi (Oct 7, 2002)

I'm having difficulty with sendmail as well. For some strange reason I can't receive any mail and I've tried many different address combinations. I'm using a domain from dysDNS.org because I don't have a static IP so I'm using that address in my hosts file (adm.homeunix.com) is this not the right way to do it? The strange thing is is that  I can send mail from my account I created (adm@adm.homeunix.com). I checked to see the var/mail/user file and the user part doesn't exist so I'm thinking that might have something to do with it. Can anyone help...please.


----------



## hydo (Oct 7, 2002)

Check that:
1. You dont have a ~/.forward file
and
2. You dont have a ~/.procmailrc
and
3. You have a working resolver.  ie. nslookup www.aol.com doesn't fail.  Sometimes an /etc/hosts entry is not enough.  It _should_ be, but sometimes it isn't. 
4. Make sure you dont have the %$#@'ing group writable error.  'sendmail -bv some_address_that_you_know_is@good' will tell you.
5.  Make it puke again and post the contents of /var/log/mail.log for about a minute before and after.


----------



## trex (Oct 7, 2002)

> _Originally posted by hydo _
> *Check that:
> 1. You dont have a ~/.forward file
> and
> ...



I don't have a .forward file in  or in .procmailrc file in my home directory or in the root directory.

I checked the resolver - this is what I got:

Server:  dns1-sf.snfc21.pacbell.net
Address:  206.13.28.12

Non-authoritative answer:
Name:    www.gwww.aol.com
Address:  64.12.149.24
Aliases:  www.aol.com

looks OK

I not getting any group writable errors.  This is the output I'm getting in mail.log when sending mail like this :

sendmail -v myemail@pacbell.net
stest
.


mail.log output:

Oct  7 14:30:54 G4 sendmail[537]: g97LUsjC000537: from=sonic, size=5, class=0, nrcpts=1, msgid=<200210072130.g97LUsjC000537@g4.domain.com>, relay=sonic@localhost
Oct  7 14:30:54 G4 sendmail[537]: g97LUsjC000537: to=myemail@pacbell.net, ctladdr=sonic (501/20), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30005, relay=mail.pacbell.net. [206.13.28.241], dsn=2.0.0, stat=Sent (Ok.)


It doesn't generate any errors but it also doesn't want to send the email!  I don't know what to do on this.

Clueless....

any suggestions appreciated


----------



## trex (Oct 8, 2002)

This error is also appearing when I reboot my mac and sendmail tries to startup:

File descriptors missing on startup: stdin, stdout, stderr; Bad file descriptor.

and yes here is another update in my quest to get sendmail working.

by using this telnet method I can send mail to several different email addresses.

telnet 127.0.0.1 25

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 sonic.g4.com ESMTP 
helo home
250 mail.g4.com
mail from:<me@home>
250 ok
rcpt to:<myemail@pacbell.net>
250 ok
data
354 go ahead
Subject:testing

.
250 ok 1034018996 qp 14014
quit
221 mail.g4.com
Connection closed by foreign host. 

----------------------------------------

But when I use a php script through my web server (apache) it won't send the email even though the log says it went through ok:

Oct 7 23:04:27 G4 sendmail[500]: g9864Rdo000500: from=www, size=336, class=0, nrcpts=1, msgid=<200210080604.g9864Rdo000500@g4.g4.com>, relay=localhost
Oct 7 23:04:27 G4 sendmail[502]: g9864Rdo000500: to=myemail@pacbell.net, ctladdr=www (70/70), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30107, relay=mail.pacbell.net. [206.13.28.241], dsn=2.0.0, stat=Sent (Ok.)


----------



## abacsalmasi (Oct 8, 2002)

I'm having problems with sendmail but I'm really close now! The mail is now comming in to my server, my email clients just can't get them. When I open up a terminal window it tells me that I have mail and I can read it through the terminal. It is even receiving the mail I send to my aliased addresses. Can anybody help me with this last final step? The fourteenth is just around the corner!


----------

