Q:

This is my sendmail.mc:

# This is a generic configuration file for Linux.
# It has support for local and SMTP mail only. If you want to
# customize it, copy it to a name appropriate for your environment
# and do the modifications there.
#
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp
$’)
OSTYPE(linux)dnl
DOMAIN(generic)dnl
dnl ——————————————————————-
dnl Enable this for debug output from Sendmail.
dnl define(`confLOG_LEVEL’, `14′)dnl
dnl ——————————————————————-
dnl Enable this to see even more debug output.
dnl Defaults to confLOG_LEVEL.
dnl
dnl If Milter.LogLevel is greater-than:
dnl
dnl 0 Communication errors
dnl 8 Header & RCPT modification messages
dnl 9 Connect to info
dnl 10 Milter error return codes, abort messages
dnl 12 More return code info, connection/open errors
dnl 14 Sender & rcpts info
dnl 17 Show headers & body sent to a milter.
dnl 18 Quit
dnl 21 Time a milter
dnl define(`confMILTER_LOG_LEVEL’, 14)dnl
define(‘confMAX_MESSAGE_SIZE’,`100000000
‘)dnl
define(`confME_TOO’,` True’)dnl
define(`confPRIVACY_FLAGS’,`
authwarnings,goaway,restrictmailq,restri
ctqrun,noexpn,noetrn)dnl
define(‘confSMTP_LOGIN_MSG’, ‘$j AUTHORIZED USE ONLY! UNSOLICTED EMAIL
NOT WELCOME!’)dnl
define(`confDOUBLE_BOUNCE_ADDRESS’,`post
master’)dnl
FEATURE(`no_default_msa’,`dnl’)dnl
F{FullSubjects} -o /etc/mail/subjects_full
F{PartSubjects} -o /etc/mail/subjects_part
HSubject: $>CheckSubject
SCheckSubject
R$={FullSubjects}$* $: REJECTSUBJECT
R$* $={PartSubjects} $* $: REJECTSUBJECT
R$* REJECTSUBJECT $* $#error $: “553 Subject indicates unsolicited
email.”
LOCAL_CONFIG
KWormCheck regex -f -q -a<MATCH> boundary=\\”[a-z][a-z]*\\””$$
HContent-Type: $>+ContentType
D{VMsg}This message may contain a virus
LOCAL_RULESETS
SContentType
R$* $:$(WormCheck $&{currheader} $)
R$* <MATCH> $#error $: 550 5.7.0 ${VMsg}
EXPOSED_USER(`root’)dnl
FEATURE(`local_procmail’)dnl
FEATURE(`use_cw_file’)dnl
FEATURE(`always_add_domain’)dnl
FEATURE(`access_db’,`hash -T<TMPF> /etc/mail/access’)dnl
FEATURE(`use_ct_file’)dnl
FEATURE(accept_unresolvable_domains)
FEATURE(`delay_checks’,`friend’)
FEATURE(dnsbl, `rbl-plus.mail-abuse.org’, `”550 Email Rejected – see
http://www.mail-abuse.org/rbl/enduser.html“‘)dnl
FEATURE(`dnsbl’,`relays.ordb.org’,`”550 Email rejected – see:
http://www.ordb.org/faq/\#why_rejected“‘)dnl
FEATURE(`enhdnsbl’, `bl.spamcop.net’, `”550 Email Rejected see:
http://spamcop.net/bl.shtml?“$&{client_addr’})dnl
MAILER(local)dnl
MAILER(smtp)dnl
INPUT_MAIL_FILTER(`mimedefang’,
`S=unix:/var/spool/MIMEDefang/mimedefang.sock, T=S:5m;R:5m’)
INPUT_MAIL_FILTER(`sample’, `S=local:/var/run/f1.sock’)

From the cf cf directory – in Sendmail 8.13.0 – running:

../Build sendmail.cf gets me:

Using M4=/usr/bin/m4
rm -f sendmail.cf
/usr/bin/m4 ../m4/cf.m4 sendmail.mc > sendmail.cf || ( rm -f sendmail.cf
&& exit
1 )
sendmail.mc:32: /usr/bin/m4: Warning: Excess arguments to built-in
`define’ igno
red
NONE:0: /usr/bin/m4: ERROR: EOF in argument list
make: *** [sendmail.cf] Error 1

What is wrong with this file?

 


A:

m4 expectrss back-tick – tick quoting (`xxx’)

1) There is no closing tick (‘) arounf second argument of
define(`confPRIVACY_FLAGS’,…)
2) Both arguments of define(`confSMTP_LOGIN_MSG’,…) use wrong quoting.
Insted of correct back-tick – tick they use tick – tick quoting

 

QA:

Thanks,

I fixed the quotes and was able to compile – Now I still have one issues: In
the resulting sendmail.cf, there are the entries:

# class E: names that should be exposed as from this host, even if we
masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{E}root
C{E}root

Why is the entry:

C{E}root in the file 2 times?

 

Because you have EXPOSED_USER(`root’) both in the cf/domain/generic.m4
file that you pull in via DOMAIN(generic) and in the .mc file itself.
But as already noted, it’s no problem – two (or more) such lines have
exactly the same effect as one. (C and F lines accumulate the contents
of the specified class, and a class is a set.)