LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   m4 sendmail.mc > sendmail.cf generate unwanted result on OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/m4-sendmail-mc-sendmail-cf-generate-unwanted-result-on-opensolaris-668372/)

johncsl82 09-08-2008 08:46 AM

m4 sendmail.mc > sendmail.cf generate unwanted result on OpenSolaris
 
Hello Solaris and OpenSolaris Professionals,

I am having problem generating sendmail.cf

my latest sendmail.mc

Code:

divert(-1)
#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988, 1993
#        The Regents of the University of California.  All rights reserved.
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident        "@(#)sendmail.mc        1.11        04/06/21 SMI"
#
#  This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later
#  subsidiary machines.  It has support for local and SMTP mail.  The
#  confFALLBACK_SMARTHOST macro is enabled, which means that messages will
#  be sent to that host (which is set to mailhost.$m [$m is the local domain])
#  if MX records are unavailable.  A short-cut rule is also defined, which
#  says if the recipient host is in the local domain, send to it directly
#  instead of the smart host.
#
#  If you want to customize this further, copy it to a name appropriate
#  for your environment and do the modifications there.
#

divert(0)dnl
VERSIONID(`@(#)sendmail.mc        1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl

FEATURE(`access_db')dnl
FEATURE(`authinfo')dnl

#define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
define(`SMART_HOST', `smarthost-local.localhost')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 25')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 25')dnl

MAILER(`local')dnl
MAILER(`smtp')dnl

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*        $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

once, I type "m4 sendmail.mc > sendmail.cf"

sendmail.cf will become:

Code:

VERSIONID(@(#)sendmail.mc        1.11 (Sun) 06/21/04)
OSTYPE(solaris8)DOMAIN(solaris-generic)
FEATURE(access_db)FEATURE(authinfo)
#define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl

MAILER(local)MAILER(smtp)
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*        $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

What seems to be the problem?


sendmail -d0.10t < /dev/null:

Code:

Version 8.14.2+Sun
 Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8
                MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS
                NISPLUS PIPELINING SCANF STARTTLS TCPWRAPPERS USERDB
                USE_LDAP_INIT XDEBUG
    OS Defines: HASCLOSEFROM HASFCHOWN HASFCHMOD HASFDWALK
                HASGETUSERSHELL HASINITGROUPS HASLDAPGETALIASBYNAME HASLSTAT
                HASNICE HASRANDOM HASRRESVPORT HASSETREGID HASSETREUID
                HASSETRLIMIT HASSETSID HASSETVBUF HASURANDOMDEV HASSTRERROR
                HASULIMIT HASUNAME HASUNSETENV HASWAITPID IDENTPROTO
                IP_SRCROUTE SAFENFSPATHCONF SYS5SETPGRP SYSTEM5 USE_DOUBLE_FORK
                USE_SA_SIGACTION USE_SIGLONGJMP USESETEUID
Kernel symbols:        /dev/ksyms
    Conf file:        /etc/mail/submit.cf (default for MSP)
    Conf file:        /etc/mail/sendmail.cf (default for MTA)
      Pid file:        /var/run/sendmail.pid (default)
Canonical name: opensolaris.local
 UUCP nodename: opensolaris
        a.k.a.: opensolaris.local
        a.k.a.: localhost
        a.k.a.: loghost
        a.k.a.: [127.0.0.1]
    Conf file:        /etc/mail/submit.cf (selected)
      Pid file:        /var/spool/clientmqueue/sm-client.pid (selected)

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = opensolaris
  (canonical domain name) $j = opensolaris.local
        (subdomain name) $m = local
              (node name) $k = opensolaris
========================================================

Recipient names must be specified

Thank you

johncsl82 09-08-2008 11:25 PM

hello,

I tried:

Code:

john@opensolaris:/etc/mail/cf/cf# su
john@opensolaris:/etc/mail/cf/cf# ls -l
total 175
-rw-r--r-- 1 root root 40413 2008-09-08 20:49 local.cf
-r--r--r-- 1 root mail 40268 2008-04-27 10:00 local.cf.prev
-r--r--r-- 1 root mail  1814 2008-04-27 10:00 local.mc
-r--r--r-- 1 root mail  4201 2008-04-27 10:00 Makefile
-rw-r--r-- 1 root root  2150 2008-09-09 12:19 sendmail.cf
-r--r--r-- 1 root mail 40190 2008-04-27 10:00 sendmail.cf.prev
-r--r--r-- 1 root mail  1379 2008-09-08 21:23 sendmail.mc
-r--r--r-- 1 root mail 40551 2008-04-27 10:00 submit.cf
-r--r--r-- 1 root mail  843 2008-04-27 10:00 submit.mc
john@opensolaris:/etc/mail/cf/cf# m4 ../m4/cf.m4 sendmail.mc > sendmail.cf

m4:sendmail.mc:30 can't open file
include(../feature/authinfo.m4)
john@opensolaris:/etc/mail/cf/cf#

Not sure what is the problem......


Code:

john@opensolaris:/etc/mail/cf/cf# m4 sendmail.mc
VERSIONID(@(#)sendmail.mc      1.11 (Sun) 06/21/04)
OSTYPE(solaris8)DOMAIN(solaris-generic)
FEATURE(access_db)FEATURE(authinfo)
#define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl

MAILER(local)MAILER(smtp)
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*        $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
john@opensolaris:/etc/mail/cf/cf#

Thank you


All times are GMT -5. The time now is 09:34 PM.