From: viza on
Hi

In the configuration readme it says to do:

m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf

but (unless I'm being stupid) it seems to have been deemed too obvious to
say where to put the resulting file.

sendmail(8) says that -C specifies to use an alternate file, but doesn't
say which file or files are used otherwise.

In a fresh install of OpenBSD 4.3 I have

/etc/mail/localhost.cf
/etc/mail/sendmail.cf
/etc/mail/submit.cf

which seem to have been generated from

openbsd-localhost.mc
openbsd-proto.mc
submit.mc (?)

Is only sendmail.cf used (and the others are examples)? or are the others
used at different times (eg local invocation of sendmail vs. SMTP mail).
Which other files might be read (other than ones that are referenced by
these, obviously).

More generally, where can I find good sendmail documentation? I have
found through google http://www.sendmail.org/m4/readme.html , which is a
reformation of the configuration readme into html, but isn't linked to
from the front page of sendmail.org. I have also found the Linux Network
Administrators Guide ( http://tldp.org/LDP/nag2/x-087-2-sendmail.html )
very useful, but wonder what else might be out there that you might
recommend.

Many thanks,
viza

--
My mum uses Linux now, I think I'd better go over to BSD to keep my cred.

From: seaPea on
viza wrote:
> Hi
>
> In the configuration readme it says to do:
>
> m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
>
> but (unless I'm being stupid) it seems to have been deemed too obvious to
> say where to put the resulting file.
>

same place as where the config.mc is.

> [...]
>
> More generally, where can I find good sendmail documentation? I have
> found through google http://www.sendmail.org/m4/readme.html , which is a
> reformation of the configuration readme into html, but isn't linked to
> from the front page of sendmail.org. I have also found the Linux Network
> Administrators Guide ( http://tldp.org/LDP/nag2/x-087-2-sendmail.html )
> very useful, but wonder what else might be out there that you might
> recommend.
>
> Many thanks,
> viza

the Sendmail BAT book from O'Reily.
From: Dave Uhring on
On Mon, 23 Jun 2008 14:29:39 +0000, viza wrote:

> In the configuration readme it says to do:
>
> m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
>
> but (unless I'm being stupid) it seems to have been deemed too obvious to
> say where to put the resulting file.

If you intend to use the resulting config.cf as sendmail's configuration
then it goes where sendmail expects to find its configuration file and
with the correct name.

> sendmail(8) says that -C specifies to use an alternate file, but doesn't
> say which file or files are used otherwise.

Because you can use *any* file located anywhere in the filesystems.

> Is only sendmail.cf used (and the others are examples)? or are the
> others used at different times (eg local invocation of sendmail vs. SMTP
> mail). Which other files might be read (other than ones that are
> referenced by these, obviously).

Did you read /etc/rc.conf?

From: viza on
Hi, thanks for your reply.

On Mon, 23 Jun 2008 10:44:00 -0500, Dave Uhring wrote:
> On Mon, 23 Jun 2008 14:29:39 +0000, viza wrote:
>
>> In the configuration readme it says to do:
>>
>> m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
>>
>> but (unless I'm being stupid) it seems to have been deemed too obvious
>> to say where to put the resulting file.
>
> If you intend to use the resulting config.cf as sendmail's configuration
> then it goes where sendmail expects to find its configuration file and
> with the correct name.

Haha, you are as cryptic as the documentation!

>> sendmail(8) says that -C specifies to use an alternate file, but
>> doesn't say which file or files are used otherwise.
>
> Because you can use *any* file located anywhere in the filesystems.

Well, as long as it is on a filesystem that is mounted when sendmail
starts.

What I would like to know is where is the normal place to put it?

Perhaps this is an OpenBSD policy specific question, or perhaps the
sendmail developers have some preference or suggestion. I guess that
this would be a compile time constant.

>> Is only sendmail.cf used (and the others are examples)? or are the
>> others used at different times (eg local invocation of sendmail vs.
>> SMTP mail). Which other files might be read (other than ones that are
>> referenced by these, obviously).
>
> Did you read /etc/rc.conf?

Yes I did. It said:

# For normal use: "-L sm-mta -bd -q30m", and note there is a cron job
sendmail_flags="-L sm-mta -C/etc/mail/localhost.cf -bd -q30m"

But it didn't expand upon what "normal use" meant, and where the
configuration would be read from in the absence of -C.

Since the above starts both a queue runner and an SMTP listener, I guess
that this governs both of these situations, but what if, for example
/usr/sbin/sendmail or /usr/libexec/sendmail/sendmail is invoked? Must
all invocations of sendmail (eg: by php) check have the -C flag? I would
hope that writing to the standard input of a sendmail process would
function the same as writing to port 25 on the loopback interface, but
might this not be the case if my listener is invoked with -C ?

Thanks in advance to anyone who can help explain this.

viza
From: Kari Hurtta on
viza <tom.viza(a)gmil.com> writes in comp.mail.sendmail:

> But it didn't expand upon what "normal use" meant, and where the
> configuration would be read from in the absence of -C.

Try:
sendmail -d0.10 -bv root

/ Kari Hurtta