[plug] Problems with Sendmail

J. Richard Mortimer richardm at memo.com.au
Fri Jan 7 17:10:23 WST 2005


Hi Mark,

Yep, still having problems, but I think I'm getting closer to the
resolution.

I moved the /etc/mail directory to /etc/mail.nowork and "dnl"d all but the
"local" and "smtp" commands in the sendmail.mc file, then used m4 to create
a new .cf file in the new /etc/mail directory.

To my amazement, this worked, sending from root to the local user!

I then sent a message from root to my external email account (with my eyes
and mouth wide open). However when I tried to send from a web page using the
apache user, I got an error in the maillog stating:

Jan  7 17:03:22 neophytte sendmail[6493]: j0793MII006490: to=mortimer,
ctladdr=root (0/0), delay=00:00:00, xdelay=00:
00:00, mailer=local, pri=30014, dsn=2.0.0, stat=Sent
Jan  7 17:03:57 neophytte sendmail[6498]: gethostbyaddr(192.168.0.10)
failed: 1
Jan  7 17:03:57 neophytte sendmail[6498]: NOQUEUE: SYSERR(apache): can not
chdir(/var/spool/mqueue/): Permission denied

I then compiled the submit.mc into the new directory which then started
giving me the same errors again. Some research on the web suggested I should
change the ('msp') feature to include a hostname, but as yet I haven't been
able to work out which name to change it to. 

This is a copy of the submit.mc file, feel like I'm so close .... 

divert(-1)
# comments removed
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
dnl define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
define(`confDIRECT_SUBMISSION_MODIFIERS',`C')
FEATURE(`msp')dnl
dnl FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`use_ct_file')dnl

Thanks

Richard

-----Original Message-----
From: plug-bounces at plug.linux.org.au [mailto:plug-bounces at plug.linux.org.au]
On Behalf Of Mark O'Shea
Sent: Friday, January 07, 2005 4:46 PM
To: plug at plug.linux.org.au
Subject: RE: [plug] Problems with Sendmail

On Fri, 2005-01-07 at 12:58, J. Richard Mortimer wrote:
> Hi Mark,
> 
> Thanks for the suggestion, however the local-host-names did contain the
> domain:
> 
> [root at webbot mail]# cat local-host-names
> # local-host-names - include all aliases for your machine here.
> localhost
> localdomain
> localhost.localdomain
> neophytte.mine.nu
> webbot
> 127.0.0.1
> 202.72.154.34
> [root at webbot mail]#
> 
> And the relay-domains file contains:
> 
> [root at webbot mail]# cat relay-domains
> localhost
> neophytte.mine.nu
> webbot
> 127.0.0.1
> 202.72.154.34
> 192.168.0
> 
> [root at webbot mail]#
> 
> But I still get the same result in the logfile:
> 
> Jan  7 12:54:54 neophytte sendmail[2185]: j074ssPf002185: from=root,
> size=1684, class=0, nrcpts=1,
> msgid=<200501070454.j074ssPf002185 at neophytte.mine.nu>,
relay=root at localhost
> Jan  7 12:54:55 neophytte sendmail[2185]: j074ssPf002185: to=mortimer,
> ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay,
> pri=30014, relay=neophytte.mine.nu. [202.72.154.34], dsn=4.0.0,
> stat=Deferred: Connection refused by neophytte.mine.nu.
> 
> I'm presuming those two files look roughly correct, or won't have any
> negative impact for containing all the names and IP addresses?
> 
> Thanks
> 
> Richard
> 
Just got back to my machine and I see no more messages so I presume
you're still having problems?

Yes, afaik you don't need to add localhost or the systems hostname to
the local-host-names file but it shouldn't do any harm I don't think.

There is obviously something that I haven't thought of that is causing
the problem but I can't think.  I have sendmail working here on an
OpenBSD machine that doesn't accept external connections that is able to
send mail fine and it is set up similar to how yours would seem to be.

The fact that changing the m4 file and rebuilding the sendmail.cf didn't
allow external connections does bother me (even though that isn't the
cause of your problems), have you made sure that when you rebuilt it you
copyed the created file to the right location?

Does anyone else have any ideas?
-- 
Mark O'Shea 

_______________________________________________
PLUG discussion list: plug at plug.linux.org.au
http://spark.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
Committee e-mail: committee at plug.linux.org.au




More information about the plug mailing list