Where is the complete sendmail.mc file in Sendmail source?

Where is the complete sendmail.mc file in Sendmail source?

am 06.10.2007 17:30:28 von leoh

I have installed sendmail from source.

Following the README instructions I did:

cd cf/cf
cp generic-linux.mc sendmail.mc
make install-cf

It creates a /etc/mail/sendmail.cf

The questions is: How to I get a complete sendmail.mc file after
installing sendmail from source?

The only sendmail.mc file available is a small file whith few
definitions (about 6 lines)

What about other definitions in the devtools/Site/site.config.m4 file?
They must be in this sendmail.mc too!

Re: Where is the complete sendmail.mc file in Sendmail source?

am 06.10.2007 19:16:02 von Bill Cole

In article <1191684628.673255.257500@d55g2000hsg.googlegroups.com>,
leoh wrote:

> I have installed sendmail from source.
>
> Following the README instructions I did:
>
> cd cf/cf
> cp generic-linux.mc sendmail.mc
> make install-cf

I think you did not understand the README. It is uncommon for a generic
..mc file to be a reasonable source for any specific functioning mail
system. The generic .mc files that come in the Sendmail distribution are
best used as starting points for the .mc you actually use.

> It creates a /etc/mail/sendmail.cf
>
> The questions is: How to I get a complete sendmail.mc file after
> installing sendmail from source?

You create one yourself. The .mc files included in the distribution are
examples that you can use as starting points for making your own .mc for
your own needs.

> The only sendmail.mc file available is a small file whith few
> definitions (about 6 lines)

A working .mc can be very short, if you don't need much configuration
complexity or if the complexity that you need is implemented in a small
set of conceptual features.

> What about other definitions in the devtools/Site/site.config.m4 file?
> They must be in this sendmail.mc too!

No, that file is only used for compiling the sendmail binaries from the
C source code with some m4 help. The sendmail.mc file is use for
building the sendmail.cf file from the m4 sources in the cf directory.

--
Now where did I hide that website...

Re: Where is the complete sendmail.mc file in Sendmail source?

am 06.10.2007 21:21:07 von leoh

In the source, from a generic sendmail.mc I created a sendmail.cf
using the comand:

make sendmail-cf inside cf/cf

This generic sendmail.cf is working fine.

But, when I type:

m4 sendmail.mc > sendmail.cf

The sendmail.cf created in this way it not even close to the one
created using "make sendmail-cf".

I just need this generic mc file used by sendmail source to create the
generic sendmail.cf. That will be my starting point.

I saw in the cf/cf directory many generic-distribution.cf file of
about 41k in size.
But the generic-distribution.mc file are all about 800Bytes.
Why?

On 6 out, 14:16, Bill Cole wrote:
> In article <1191684628.673255.257...@d55g2000hsg.googlegroups.com>,
>
> leoh wrote:
> > I have installed sendmail from source.
>
> > Following the README instructions I did:
>
> > cd cf/cf
> > cp generic-linux.mc sendmail.mc
> > make install-cf
>
> I think you did not understand the README. It is uncommon for a generic
> .mc file to be a reasonable source for any specific functioning mail
> system. The generic .mc files that come in the Sendmail distribution are
> best used as starting points for the .mc you actually use.
>
> > It creates a /etc/mail/sendmail.cf
>
> > The questions is: How to I get a complete sendmail.mc file after
> > installing sendmail from source?
>
> You create one yourself. The .mc files included in the distribution are
> examples that you can use as starting points for making your own .mc for
> your own needs.
>
> > The only sendmail.mc file available is a small file whith few
> > definitions (about 6 lines)
>
> A working .mc can be very short, if you don't need much configuration
> complexity or if the complexity that you need is implemented in a small
> set of conceptual features.
>
> > What about other definitions in the devtools/Site/site.config.m4 file?
> > They must be in this sendmail.mc too!
>
> No, that file is only used for compiling the sendmail binaries from the
> C source code with some m4 help. The sendmail.mc file is use for
> building the sendmail.cf file from the m4 sources in the cf directory.
>
> --
> Now where did I hide that website...

Re: Where is the complete sendmail.mc file in Sendmail source?

am 07.10.2007 05:45:36 von per

In article <1191698467.808418.41560@k79g2000hse.googlegroups.com> leoh
writes:
>In the source, from a generic sendmail.mc I created a sendmail.cf
>using the comand:
>
>make sendmail-cf inside cf/cf

I assume you mean 'make sendmail.cf' - there's no "sendmail-cf" target
in there.

>This generic sendmail.cf is working fine.
>
>But, when I type:
>
>m4 sendmail.mc > sendmail.cf
>
>The sendmail.cf created in this way it not even close to the one
>created using "make sendmail-cf".

Because that's not the correct way to create sendmail.cf - why not use
the 'make' method, as it works? Otherwise look at the commands printed
when you use it, and reproduce them...

>I saw in the cf/cf directory many generic-distribution.cf file of
>about 41k in size.
>But the generic-distribution.mc file are all about 800Bytes.
>Why?

Uh, why not? The generic-distribution.mc are all very minimal but
completely functional files that you can (at least) use as a starting
point for your own .mc file, the corresponding .cf were generated from
them and could in principle be installed as sendmail.cf.

--Per Hedeland
per@hedeland.org

Re: Where is the complete sendmail.mc file in Sendmail source?

am 07.10.2007 15:52:16 von leoh

I use make to create a sendmail.cf file. but this Makefile could say
somenthing like this: "Hey, here is the generic sendmail.cf that I
have created for you based on many things that you told me and things
I got by my self from your system. AND here is the corresponding
sendmail.mc file that I buldled for you from all those MC files that I
used to create your CF file."

You see? Than I would have a single sendmail.mc file to make changes.

Anyway, here is my solution:

Create an empty dir
1 - copy your cf.m4 file into an empty directory
2 - copy the generic-.mc to sendmail.mc
3 - type m4 cf.m4 sendmamil.mc > sendmail.cf
4 - It will complain about missing M4 files. Copy all the missing into
this directory. Keep on doing it until you have all m4 files used to
create the sendmail.cf (its about 13 files in the simples config for
linux)

Now, we I must join all those .mc files into a single mc file. It's
not simples as a cat * > file command. It requires some knowledge of
m4 command that I don't have by now.

Thats all.






I did it. Manually, but working.

The process is quite simple:
1 -


On 7 Out, 00:45, p...@hedeland.org (Per Hedeland) wrote:
> In article <1191698467.808418.41...@k79g2000hse.googlegroups.com> leoh
>
> writes:
> >In the source, from a generic sendmail.mc I created a sendmail.cf
> >using the comand:
>
> >make sendmail-cf inside cf/cf
>
> I assume you mean 'make sendmail.cf' - there's no "sendmail-cf" target
> in there.
>
> >This generic sendmail.cf is working fine.
>
> >But, when I type:
>
> >m4 sendmail.mc > sendmail.cf
>
> >The sendmail.cf created in this way it not even close to the one
> >created using "make sendmail-cf".
>
> Because that's not the correct way to create sendmail.cf - why not use
> the 'make' method, as it works? Otherwise look at the commands printed
> when you use it, and reproduce them...
>
> >I saw in the cf/cf directory many generic-distribution.cf file of
> >about 41k in size.
> >But the generic-distribution.mc file are all about 800Bytes.
> >Why?
>
> Uh, why not? The generic-distribution.mc are all very minimal but
> completely functional files that you can (at least) use as a starting
> point for your own .mc file, the corresponding .cf were generated from
> them and could in principle be installed as sendmail.cf.
>
> --Per Hedeland
> p...@hedeland.org

Re: Where is the complete sendmail.mc file in Sendmail source?

am 07.10.2007 17:02:59 von Bill Cole

In article <1191698467.808418.41560@k79g2000hse.googlegroups.com>,
leoh wrote:

> In the source, from a generic sendmail.mc I created a sendmail.cf
> using the comand:
>
> make sendmail-cf inside cf/cf

You must be using something other than a normal recent sendmail
distribution. There's no 'sendmail-cf' rule defined in the standard
cf/cf/Makefile.


> This generic sendmail.cf is working fine.

The generic .mc files yield basically functional sendmail.cf files for
very simple sites.

> But, when I type:
>
> m4 sendmail.mc > sendmail.cf
>
> The sendmail.cf created in this way it not even close to the one
> created using "make sendmail-cf".

The answer to that can be seen by reading the Makefile. You need to
preface the .mc file with cf/m4/cf.m4, not simply run the .mc through
m4. The cf.m4 prologue is the entry point into the m4 build system for
the sendmail.cf file. Without including that first, most of the .mc file
directives won't even be seen as macros by m4.

> I just need this generic mc file used by sendmail source to create the
> generic sendmail.cf. That will be my starting point.

There is no single universal generic sendmail.mc. The standard sendmail
distributiopn contains no file named sendmail.mc

> I saw in the cf/cf directory many generic-distribution.cf file of
> about 41k in size.
> But the generic-distribution.mc file are all about 800Bytes.
> Why?

That's largely a question about what m4 does.

m4 is a macro processing tool that is useful for assembling complex text
files like sendmail.cf. The cf directory tree in the sendmail
distribution is a collection of snippets of cf code with embedded m4
macros (with some mostly-m4 files in cf/m4) designed to turn a .mc file
with a handful of lines into a working sendmail.cf with dozens of
kilobytes of cf code. The .mc file is just a serious of commands to to
assemble a series of logical features from that complex of m4-hooked
text.

--
Now where did I hide that website...

Re: Where is the complete sendmail.mc file in Sendmail source?

am 07.10.2007 20:27:30 von per

In article <1191765136.356135.300930@o80g2000hse.googlegroups.com> leoh
writes:
>I use make to create a sendmail.cf file. but this Makefile could say
>somenthing like this: "Hey, here is the generic sendmail.cf that I
>have created for you based on many things that you told me and things
>I got by my self from your system. AND here is the corresponding
>sendmail.mc file that I buldled for you from all those MC files that I
>used to create your CF file."

What on earth would be the point of that? Do you think someone will
break into your computer and remove the cf tree from the sendmail source
directory?

>You see? Than I would have a single sendmail.mc file to make changes.

You already have that. You just need to keep the cf tree around for when
you want to rebuild sendmail.cf. On many OSes that ship with sendmail
but don't include the source by default, that tree will be installed as
/usr/share/sendmail-cf or somesuch.

>Anyway, here is my solution:
>
>Create an empty dir
>1 - copy your cf.m4 file into an empty directory
>2 - copy the generic-.mc to sendmail.mc
>3 - type m4 cf.m4 sendmamil.mc > sendmail.cf
>4 - It will complain about missing M4 files. Copy all the missing into
>this directory. Keep on doing it until you have all m4 files used to
>create the sendmail.cf (its about 13 files in the simples config for
>linux)
>
>Now, we I must join all those .mc files into a single mc file. It's
>not simples as a cat * > file command. It requires some knowledge of
>m4 command that I don't have by now.

This is completely crazy. Even if you manage to combine everything you
need into a single file, it will be hideously complex instead of the
simple .mc file you already have, and if you want to use some new
feature it won't be included there, so you have to start over again.
Not to mention that you have to redo everything when upgrading sendmail
to a new version, as opposed to just carrying the simple .mc file along.
Why not just use the things the way they were intended to be used?

--Per Hedeland
per@hedeland.org

Re: Where is the complete sendmail.mc file in Sendmail source?

am 11.10.2007 17:14:23 von leoh

I am going to keep "cf" and "devtools" direcotry in my system:

# cp -r sendmail-8.14.1/cf sendmail-8.14.1/devtools /opt/sendmail-cf

In this way I will be able to run re-create my sendmail.cf file
without keeping all the source files around.

# cd /opt/sendmail-cf
# sh Build sendmail.cf

Thank you for helping me understanding this sendmail compilation
paradigm ;)


On Oct 7, 3:27 pm, p...@hedeland.org (Per Hedeland) wrote:
> In article <1191765136.356135.300...@o80g2000hse.googlegroups.com> leoh
>
> writes:
> >I use make to create a sendmail.cf file. but this Makefile could say
> >somenthing like this: "Hey, here is the generic sendmail.cf that I
> >have created for you based on many things that you told me and things
> >I got by my self from your system. AND here is the corresponding
> >sendmail.mc file that I buldled for you from all those MC files that I
> >used to create your CF file."
>
> What on earth would be the point of that? Do you think someone will
> break into your computer and remove the cf tree from the sendmail source
> directory?
>
> >You see? Than I would have a single sendmail.mc file to make changes.
>
> You already have that. You just need to keep the cf tree around for when
> you want to rebuild sendmail.cf. On many OSes that ship with sendmail
> but don't include the source by default, that tree will be installed as
> /usr/share/sendmail-cf or somesuch.
>
> >Anyway, here is my solution:
>
> >Create an empty dir
> >1 - copy your cf.m4 file into an empty directory
> >2 - copy the generic-.mc to sendmail.mc
> >3 - type m4 cf.m4 sendmamil.mc > sendmail.cf
> >4 - It will complain about missing M4 files. Copy all the missing into
> >this directory. Keep on doing it until you have all m4 files used to
> >create the sendmail.cf (its about 13 files in the simples config for
> >linux)
>
> >Now, we I must join all those .mc files into a single mc file. It's
> >not simples as a cat * > file command. It requires some knowledge of
> >m4 command that I don't have by now.
>
> This is completely crazy. Even if you manage to combine everything you
> need into a single file, it will be hideously complex instead of the
> simple .mc file you already have, and if you want to use some new
> feature it won't be included there, so you have to start over again.
> Not to mention that you have to redo everything when upgrading sendmail
> to a new version, as opposed to just carrying the simple .mc file along.
> Why not just use the things the way they were intended to be used?
>
> --Per Hedeland
> p...@hedeland.org