> On Tue, Dec 08, 2015 at 08:27:46AM +0100, Sunil Nimmagadda wrote:
> > Thanks for spotting it, I missed this entry in etc/mail/Makefile.
> > The idea was to remove yet another executable and use smtpctl(8)
> > for makemap/newaliases. This diff should fix it. Instead of hardcoding
> > a specific implementation of makemap path, use the standard mailwrapper
> > makemap path which will call the configured executable in mailer.conf.
> >
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/src/etc/mail/Makefile,v
> > retrieving revision 1.11
> > diff -u -p -r1.11 Makefile
> > --- Makefile        26 May 2015 14:34:59 -0000      1.11
> > +++ Makefile        8 Dec 2015 07:10:56 -0000
> > @@ -3,7 +3,7 @@
> >  # Generate the various .db versions from their source files.
> >
> >  DB_FILES= aliases.db
> > -MAKEMAP= /usr/libexec/smtpd/makemap
> > +MAKEMAP= /usr/sbin/makemap
> >
> >  all: ${DB_FILES}
>
> This breaks my system where I use sendmail from ports in /etc/mailer.conf.
>
> cd mail && exec make distribution
> install -c -o root -g wheel -m 644 aliases
/tmp/_etcdir.9nVgeOiVtS/etc/mail/
aliases
> /usr/sbin/makemap -t aliases -o /tmp/_etcdir.9nVgeOiVtS/etc/mail/aliases.db
/tmp/_etcdir.9nVgeOiVtS/etc/mail/aliases
> makemap: error opening type /tmp/_etcdir.9nVgeOiVtS/etc/mail/aliases.db map
/
tmp/_etcdir.9nVgeOiVtS/etc/mail/aliases: Unknown database type
> *** Error 73 in mail (Makefile:17 'distribution')
> *** Error 1 in /usr/src/etc (Makefile:203 'distribution-etc-root-var')
> *** Error 1 in /usr/src (Makefile:83 'build')
>
> man -a newaliases says
>
> Notice: do not use makemap to create the aliases data base, because
> newaliases puts a special token into the data base that is required by
> sendmail.
>
> bluhm

It is building aliases database and can be substituted with
newaliases(8). This should fix build when using sendmail too.  Could
you try this diff please...

Index: Makefile
===================================================================
RCS file: /cvs/src/etc/mail/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile    8 Dec 2015 09:03:50 -0000       1.12
+++ Makefile    15 Dec 2015 02:41:29 -0000
@@ -3,7 +3,6 @@
 # Generate the various .db versions from their source files.

 DB_FILES= aliases.db
-MAKEMAP= /usr/sbin/makemap

 all: ${DB_FILES}

@@ -13,8 +12,7 @@ clean:
 distribution:
        ${INSTALL} -c -o root -g wheel -m 644 aliases \
            ${DESTDIR}/etc/mail/aliases
-       ${MAKEMAP} -t aliases -o ${DESTDIR}/etc/mail/aliases.db \
-           ${DESTDIR}/etc/mail/aliases
+       newaliases
        ${INSTALL} -c -o root -g wheel -m 644 smtpd.conf \
            ${DESTDIR}/etc/mail/smtpd.conf
        ${INSTALL} -c -o root -g wheel -m 644 spamd.conf \

Reply via email to