Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Sendmail problems

Sendmail problems
Thread Tools
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Amsterdam
Status: Offline
Reply With Quote
Jun 17, 2001, 12:37 PM
 
I have the following problem, at startup sendmail starts up and then quits. Then I have to restart it with 'sendmail -bd -q30m'
but then all the mail goes to the queue and is only send when the queque is spooled?
Here is the mail log and the config of sendmail.....

/etc/log/mail.log:
Jun 17 14:20:08 localhost sendmail[238]: My unqualified host name (localhost) unknown; sleeping for retry
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: SYSERR: putoutmsg (NO-HOST): error on output channel sending
"451 4.0.0 fill_fd: before readcf: fd 1 not open: Bad file descriptor": Input/output error
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 1 not open: Bad file descriptor
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: 0: fl=0x2, mode=20666: CHR: size=384826
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: 3: fl=0x2, mode=140000: SOCK [0]->[[UNIX: /var/run/syslog]]
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 2 not open: Bad file descriptor
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: 0: fl=0x2, mode=20666: CHR: size=384826
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: 1: fl=0x1, mode=20666: CHR: size=384826
Jun 17 14:21:08 localhost sendmail[238]: NOQUEUE: 3: fl=0x2, mode=140000: SOCK [0]->[[UNIX: /var/run/syslog]
Jun 17 14:21:36 localhost sendmail[238]: gethostbyaddr(10.0.0.110) failed: 1

/System/Library/StartupItems/Sendmail (not changed,same as when I istalled OSX):
queue=/var/spool/mqueue
rm -f ${queue}/nf* ${queue}/lf*

/usr/sbin/sendmail -bd -q1h &


/etc/hostconfig:
HOSTNAME=-AUTOMATIC-


My cf configuration file:
include(`m4/cf.m4')dnl
OSTYPE(darwin)dnl

FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail)dnl
FEATURE(`domaintable',`btree /etc/mail/domaintable')dnl
FEATURE(`genericstable',`btree /etc/mail/genericstable')dnl
FEATURE(`mailertable',`btree /etc/mail/mailertable')dnl
FEATURE(`virtusertable',`btree /etc/mail/virtusertable')dnl

FEATURE(accept_unresolvable_domains)

define(`SMART_HOST', `localhost')dnl
LOCAL_NET_CONFIG
R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3


define(`LUSER_RELAY', `local ostmaster')dnl

define(`LOCAL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`LOCAL_MAILER_FLAGS', `ShPfn')dnl
define(`LOCAL_MAILER_ARGS', `procmail -a $h -d $u')dnl
define(`LOCAL_SHELL_FLAGS', `u9')dnl
define(`STATUS_FILE', `/var/log/sendmail.st')dnl
define(`confCT_FILE', `/etc/mail/trusted-users')dnl
define(`confCW_FILE', `/etc/mail/local-host-names')dnl
define(`confSTATUS_FILE',`/var/run/sendmail.st')dnl
define(`ALIAS_FILE',`/etc/mail/aliases')dnl
define(`HELP_FILE',`/etc/mail/helpfiles')dnl
define(`confDEF_USER_ID', `(user) password sits here)')dnl

FEATURE(`access_db', `btree /etc/mail/access')dnl
FEATURE(blacklist_recipients)dnl
define(`confCR_FILE', `/etc/mail/relay-domains')dnl

DOMAIN(`generic')dnl


MASQUERADE_AS(uco.xs4all.nl)dnl

FEATURE(masquerade_envelope)dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(always_add_domain)dnl

define(`confSAFE_QUEUE', `True')dnl
define(`confSMTP_MAILER', `smtp8')dnl
define(`confCON_EXPENSIVE', `True')dnl
define(`confBIND_OPTS',`-DNSRCH HasWildcardMX -DEFNAMES')

FEATURE(nocanonify)

define(`SMTP_MAILER_FLAGS', `e')dnl

MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Cw localhost
Cw uco.xs4all.nl


Version 8.10.2
Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND
NETINET NETINFO NETISO NETUNIX NEWDB NIS QUEUE SCANF SMTP
USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.xs4all.nl
(subdomain name) $m = xs4all.nl
(node name) $k = localhost
================================================== ======

Any help is welcome thanx!

[ 06-17-2001: Message edited by: Red Commet ]
     
<barney ntd>
Guest
Status:
Reply With Quote
Jun 17, 2001, 03:48 PM
 
I have exactly the same problem, although I haven't played with the config as much as you. Answers, anyone?

Barney.
     
APC
Junior Member
Join Date: Mar 2001
Location: Italy
Status: Offline
Reply With Quote
Jun 17, 2001, 05:44 PM
 
You have to do two simple things to get sendmail running without errors.

First, edit the file /System/Library/StartupItems/Sendmail/Sendmail, and find this line:

/usr/sbin/sendmail -bd -q1h &

simply remove the & and the sendmail daemon will start at boot.

Then you have to chmod 755 / or sendmail will complain.

Obviously, don't forget to put the domain for which you desire to receive mail in the /private/etc/mail/local-host-names file.

Good luck, hope this helps
APC Mac-head since 1987
-- what? image signature? nah, too lazy. --
     
APC
Junior Member
Join Date: Mar 2001
Location: Italy
Status: Offline
Reply With Quote
Jun 17, 2001, 05:49 PM
 
Oh yes, another thing: in your sendmail.cf (dunno what comes out with your commands, I'm talking about the stock one here), near the beginning of the file, find where it says something like foo.com, thet's where it defines your hostname, and change that with your hostname... don't forget to leave the first letter as is, that's used by sendmail to determine that the line is a directive.

Good luck
APC Mac-head since 1987
-- what? image signature? nah, too lazy. --
     
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Amsterdam
Status: Offline
Reply With Quote
Jun 17, 2001, 07:15 PM
 
First, edit the file /System/Library/StartupItems/Sendmail/Sendmail, and find this line:

/usr/sbin/sendmail -bd -q1h &

simply remove the & and the sendmail daemon will start at boot.

Then you have to chmod 755 / or sendmail will complain.

Obviously, don't forget to put the domain for which you desire to receive mail in the /private/etc/mail/local-host-names file.
I allready did the 'chmod' thing and tried removing the '&' but the problem is not starting at boot but quiting after boot and as far as I know '&' like '-bd' only make it run in the background.
Also the problem of putting all the mail in the mail queue instead of sending persists. I can only send my mail by re-starting 'sendmail -q'.......

About editing your sendmail.cf file; I just use the file above and create a sendmail.cf with 'm4 (path-to-m4)/m4/cf.m4 myconfig.mc &gt; /etc/mail/sendmail.cf'. This is handy when you get a newer version, then you only have to use m4 and not having to change your configuration...
     
APC
Junior Member
Join Date: Mar 2001
Location: Italy
Status: Offline
Reply With Quote
Jun 18, 2001, 03:55 AM
 
My reply was badly worded; yes, I knew that it was a .m4 file

About the & thing: I can only point you to: http://www.opensource.apple.com/bugs...l/2547692.html and http://www.opensource.apple.com/bugs.../2679814.html.

Both these pages describe your exact problem and identify the removal of & from the startup script as a workaround.

About the queuing issue... dunno, it all works beautifully here. (Please take note that I upgraded to sendmail 8.11.3).

Bye

[ 06-18-2001: Message edited by: APC ]
APC Mac-head since 1987
-- what? image signature? nah, too lazy. --
     
JLL
Professional Poster
Join Date: Apr 1999
Location: Copenhagen, Denmark
Status: Offline
Reply With Quote
Jun 18, 2001, 09:37 AM
 
I've removed the & in the startup file and no errors appears in the mail.log.

But I'm using the FormMail script on a web server and when I send a message nothing happens.

Mail.log says relay=lovcalhost at the end of the line when FormMail has been used but I have entered a mail relay in Sendmail.cf.

What's wrong here?
JLL

- My opinions may have changed, but not the fact that I am right.
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 05:28 PM.
All contents of these forums © 1995-2009 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.4 © 2000-2009, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2