Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why am I getting this error when building sendmail.cf

441 views
Skip to first unread message

Harry Putnam

unread,
Oct 13, 2014, 7:35:27 PM10/13/14
to
I've been fiddling for a while now with an error I get on a solaris
host when m4'ing the sendmail.mc to sendmail.cf

the error happens when compile with the normal technique on solaris.

/etc/mail has all the needed m4 tools and things are setup to run off
Makefile files

So, cd /etc/mail/cf/cf
root # make sendmail.cf
test ! -f sendmail.cf || /usr/bin/mv sendmail.cf sendmail.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 sendmail.mc > sendmail.cf

/usr/ccs/bin/m4:sendmail.mc:13 cannot open file: No such file or directory
include(../feature/authinfo.m4)
make: *** [sendmail.cf] Error 1

What file is that about?
Also what significance if any is the inclusion of the line:

` include(../feature/authinfo.m4) '

I checked and double checked to make sure the file mentioned at line
13 is where it is supposed to be. Also tried opening permissions to
see if that was the problem,,, neither showed any help.

However if I dnl out the line. The error disappears. So it has to be
something wrong with that line. Just for the record:

ls -l /etc/mail/authinfo*
-r--r--r-- 1 root root 66 Oct 13 11:55 /etc/mail/authinfo
-r--r--r-- 1 root root 81920 Oct 13 18:49 /etc/mail/authinfo.db

(also tried with chmod 600 & 666 )

The problem line:

FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl

Numbered version of the problem *.mc

1 divert(-1)
2
3 divert(0)dnl
4 VERSIONID(`sendmail.mc (Sun)')
5 OSTYPE(`solaris8')dnl
6 DOMAIN(`solaris-generic')dnl
7 define(`SMART_host', `[mail.messagingengine.com]')dnl
8 dnl define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
9 define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
10 define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
11 define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
12 dnl FEATURE(`authinfo',`hash /etc/mail/auth/authinfo')dnl
13 FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
14 define(`confAUTH_OPTIONS', `A p y')dnl
15
16 MAILER(`local')dnl
17 MAILER(`smtp')dnl
18 MAILER(`procmail')dnl
19
20 LOCAL_NET_CONFIG
21 R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

Claus Aßmann

unread,
Oct 13, 2014, 11:01:09 PM10/13/14
to
Harry Putnam wrote:

> So, cd /etc/mail/cf/cf
> root # make sendmail.cf
> test ! -f sendmail.cf || /usr/bin/mv sendmail.cf sendmail.cf.prev
> /usr/ccs/bin/m4 ../m4/cf.m4 sendmail.mc > sendmail.cf
>
> /usr/ccs/bin/m4:sendmail.mc:13 cannot open file: No such file or directory
> include(../feature/authinfo.m4)

> What file is that about?

../feature/authinfo.m4

> I checked and double checked to make sure the file mentioned at line
> 13 is where it is supposed to be. Also tried opening permissions to

Hmm, that is confusing. First you write
"What file is that about?"
and then you claim the file is there...

So does the file exist?
ls -l ../feature/authinfo.m4

> ls -l /etc/mail/authinfo*

> -r--r--r-- 1 root root 66 Oct 13 11:55 /etc/mail/authinfo
> -r--r--r-- 1 root root 81920 Oct 13 18:49 /etc/mail/authinfo.db

Those are obviously NOT the file that is missing...


--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Lew Pitcher

unread,
Oct 14, 2014, 12:41:07 PM10/14/14
to
On Monday 13 October 2014 19:35, in comp.mail.sendmail, "Harry Putnam"
<rea...@newsguy.com> wrote:

> I've been fiddling for a while now with an error I get on a solaris
> host when m4'ing the sendmail.mc to sendmail.cf
>
> the error happens when compile with the normal technique on solaris.
>
> /etc/mail has all the needed m4 tools and things are setup to run off
> Makefile files
>
> So, cd /etc/mail/cf/cf
> root # make sendmail.cf
> test ! -f sendmail.cf || /usr/bin/mv sendmail.cf sendmail.cf.prev
> /usr/ccs/bin/m4 ../m4/cf.m4 sendmail.mc > sendmail.cf
>
> /usr/ccs/bin/m4:sendmail.mc:13 cannot open file: No such file or
> directory include(../feature/authinfo.m4)
> make: *** [sendmail.cf] Error 1
>
> What file is that about?

The file in question defines M4 macros that build the sendmail.cf
configuration entries that govern the definition of the authinfo table.

> Also what significance if any is the inclusion of the line:
>
> ` include(../feature/authinfo.m4) '

This line tells the M4 macro processor to include the macro definitions that
construct the sendmail.cf authinfo settings

> I checked and double checked to make sure the file mentioned at line
> 13 is where it is supposed to be.

Ah, but did you check to ensure that ../feature/authinfo.m4 (in your
case, /etc/mail/cf/feature/authinfo.m4) exists, is readable, and contains
the expected M4 macros?

> Also tried opening permissions to
> see if that was the problem,,, neither showed any help.
>
> However if I dnl out the line. The error disappears. So it has to be
> something wrong with that line. Just for the record:
>
> ls -l /etc/mail/authinfo*
> -r--r--r-- 1 root root 66 Oct 13 11:55 /etc/mail/authinfo
> -r--r--r-- 1 root root 81920 Oct 13 18:49 /etc/mail/authinfo.db
>
> (also tried with chmod 600 & 666 )
>
> The problem line:
>
> FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl

the FEATURE macro expands to an M4 "include" line to grab the appropriate
feature definition macro, and then an invocation of that macro (in this
case, the 'authinfo' macro, with the parameters provided in the remainder
of the FEATURE line.

So, this line
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
is replaced by
include(../feature/authinfo.m4)
and an expansion of the
authinfo(`hash /etc/mail/authinfo')dnl
macro

The
`hash /etc/mail/authinfo'
has nothing to do with the macro definition itself, it is only a parameter
into the macro. The macro transforms it into sendmail configuration
parameters that tell Sendmail where to find the authinfo table.

Your problem is that your installation of the sendmail macros is either
incomplete or corrupt; you don't seem to have the appropriate
cf/feature/authinfo.m4 file available, and thus the M4 macro processor
cannot expand the FEATURE(`authinfo' instruction.

[snip]
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

Harry Putnam

unread,
Oct 14, 2014, 3:54:24 PM10/14/14
to
Claus Aßmann
<ca+sendmail(-no-copies-please)@mine.informatik.uni-kiel.de> writes:

> Harry Putnam wrote:
>
>> So, cd /etc/mail/cf/cf
>> root # make sendmail.cf
>> test ! -f sendmail.cf || /usr/bin/mv sendmail.cf sendmail.cf.prev
>> /usr/ccs/bin/m4 ../m4/cf.m4 sendmail.mc > sendmail.cf
>>
>> /usr/ccs/bin/m4:sendmail.mc:13 cannot open file: No such file or directory
>> include(../feature/authinfo.m4)
>
>> What file is that about?
>
> ../feature/authinfo.m4
>
>> I checked and double checked to make sure the file mentioned at line
>> 13 is where it is supposed to be. Also tried opening permissions to
>
> Hmm, that is confusing. First you write
> "What file is that about?"
> and then you claim the file is there...

I claimed the file mentioned at line 13 of sendmail.mc was there.
Sorry it was so unclear.
>
> So does the file exist?
> ls -l ../feature/authinfo.m4

I was chasing the wrong file...

No (authinfo.m4) is not present That *.m4 is missing entirely. I thought maybe
it was a local mishap but it turns out that this version of Solaris
(Openindiana/hipster) does not include that file. Nor does the main
brance opindiana Build 151_a9.

I think they expect user to use the access.db route to authentication
perhaps. That is what I'm trying now.

>> ls -l /etc/mail/authinfo*
>
>> -r--r--r-- 1 root root 66 Oct 13 11:55 /etc/mail/authinfo
>> -r--r--r-- 1 root root 81920 Oct 13 18:49 /etc/mail/authinfo.db
>
> Those are obviously NOT the file that is missing...

Sorry but it was not obvious to me and it is the file mentioned at
line 13 of sendmail.mc... as mentioned in the original error output.

>> /usr/ccs/bin/m4:sendmail.mc:13 cannot open file: No such file or directory

I see now I was chasing after the wrong file... a poor reading of the
error message.

Harry Putnam

unread,
Oct 14, 2014, 4:01:43 PM10/14/14
to
Lew Pitcher <lew.p...@digitalfreehold.ca> writes:

[...]

>> What file is that about?
>
> The file in question defines M4 macros that build the sendmail.cf
> configuration entries that govern the definition of the authinfo table.
>
>> Also what significance if any is the inclusion of the line:
>>
>> ` include(../feature/authinfo.m4) '
>
> This line tells the M4 macro processor to include the macro definitions that
> construct the sendmail.cf authinfo settings
>
>> I checked and double checked to make sure the file mentioned at line
>> 13 is where it is supposed to be.
>
> Ah, but did you check to ensure that ../feature/authinfo.m4 (in your
> case, /etc/mail/cf/feature/authinfo.m4) exists, is readable, and contains
> the expected M4 macros?

Thanks for clearing it up in a way I can follow. Yes, I was chasing
the wrong file... due to a poor reading of the error output

>> /usr/ccs/bin/m4:sendmail.mc:13 cannot open file: No such file or
>> directory

[...]

>> The problem line:
>>
>> FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl

[...] Thanks for the clear exposition of how it works

> Your problem is that your installation of the sendmail macros is either
> incomplete or corrupt; you don't seem to have the appropriate
> cf/feature/authinfo.m4 file available, and thus the M4 macro processor
> cannot expand the FEATURE(`authinfo' instruction.

I see that now and have found that the version of solaris I'm using
(openindiana/hipster but also the main openindiana branch build
151_a9)

I'm not sure why perhaps the expect users to use the access.db route
to authentication.

I'm trying that now but so far haven't got it to work.

I'll have more details to post in a bit.

Thanks the helpful input.
0 new messages