Title: OpenCA Guides for 0.9.2+, chapter configuration of sendmail.

Hi folks,

It took me some time to get OpenCA together with sendmail working in an existing environment
with a Microsoft Exchange mail server.
(Basically applicable to all servers which understand SMTP and require a LOGIN)
I saw that the chapter in the OpenCA Guides for configuring the email is still empty.

Maybe the latter example is of interest for someone else in the community.
(I have stripped it to the basic authentication tasks and added comments for
additional commands to be performed)

Cheers
Ulrich

File /etc/mail/sendmail.mc:

divert(-1)dnl
dnl # Example for establishing email distribution with sendmail(client) via Microsoft Exchange Server
dnl # This is the sendmail macro config file for m4.
dnl # If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to generate the
dnl # /etc/mail/sendmail.cf file (by means of the sendmail-cf and m4)

dnl # general: comments start with dnl, statements end with dnl
dnl # command for creating sendmail.cf:
dnl # =>  m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
dnl # requisite: sendmail-cf

dnl # include sendmail-cf path: 
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl

dnl # initiating masquerading
GENERICS_DOMAIN(`localhost.localdomain localhost')dnl

dnl # create genericstable (file in /etc/mail)and insert records for name mapping:
dnl # root: [EMAIL PROTECTED]
dnl # openca: [EMAIL PROTECTED]
dnl # initialising of genericstable
dnl # =>  sendmail -bi -oA/etc/mail/genericstable

dnl # activating masquerading
FEATURE(genericstable)dnl
FEATURE(masquerade_envelope)dnl

dnl # mailserver where we connect to 
define(`SMART_HOST',`<URL mailserver>')dnl

FEATURE(redirect)dnl
FEATURE(nocanonify)dnl
define(`SMTP_MAILER_FLAGS',`e')dnl

dnl # some time-outs
define(`confTO_CONNECT', `1m')dnl
define(`confTO_IDENT', `0')dnl

dnl # since this mailserver requires logon authentication we have to
dnl # provide this information
dnl # create auth-info (file in /etc/mail), insert record:
dnl # AuthInfo:<URL mailserver> "U:<user>" "P:<password>" "M:LOGIN"
dnl # this mailserver requires AUTH LOGIN
dnl # sendmail requires db-file:
dnl # =>  makemap hash /etc/mail/auth-info.db </etc/mail/auth-info

FEATURE(`authinfo', `hash -o /etc/mail/auth-info.db')dnl
dnl # we use SMTP
MAILER(smtp)dnl

dnl # while testing:
dnl # changes in sendmail.mc: compile with m4 to new sendmail.cf
dnl # =>  service sendmail stop
dnl # =>  service sendmail start
dnl # or for testing start sendmail as demon and logging dialog to file:
dnl # => sendmail  -bd  -O LogLevel=14  -X /tmp/out1.log

dnl # for basic checking, set up manual communication with mailserver
dnl # => telnet <URL mailserver) 25
dnl # => ehlo localhost
dnl # … <receiving basic info>
dnl # =>  AUTH LOGIN
dnl # mailserver replies base64 encoded, we have to reply base64-encode
dnl # => <first user> …
dnl # => <then password>…
dnl # => MAIL FROM: <valid mail-address>
dnl # => RCPT TO: <vaild mail-address>
dnl # => DATA
dnl # …
dnl # stop communication with <new line> . <new line>
dnl # QUIT

Reply via email to