If you have installed Sendmail, you should install the whole set of
configuration files which in the Slackware distribution is hidden in
the package smailcnf.tgz
. You'll find them in your
directory-tree in /usr/src/sendmail/cf
. In this directory
there should be a approx.50KB big README which describes the new
configuration-method.
Though Sendmail is controlled via an almost 20KB big configurationfile
(/etc/sendmail.cf
) you don't have to write it on your own
(which most of the people think, who are scared of sendmail). You only
need the macro processor M4, and a little configurationfile (mc-File)
in /usr/src/sendmail/cf/cf
. M4 will create your
sendmail.cf
from this file and a lot of other config files, which
you do not need to change.
Next FidoGate has to be made known. Therefore create the file
/usr/src/sendmail/cf/mailer/ftn.m4
with the following
content:
PUSHDIVERT(-1) # # /usr/src/sendmail/cf/mailer/ftn.m4 # # FIDOGATE FTN mailer for sendmail V8 # # MAILER(smtp) and MAILER(uucp) must be included! # ifdef(`FTN_MAILER_PATH',, `define(`FTN_MAILER_PATH', /usr/local/lib/fidogate/rfc2ftn)') ifdef(`FTN_MAILER_ARGS',, `define(`FTN_MAILER_ARGS', `rfc2ftn -w normal $u')') ifdef(`FTN_MAILER_FLAGS',, `define(`FTN_MAILER_FLAGS', `')') ifdef(`FTN_MAX_SIZE',, `define(`FTN_MAX_SIZE', 100000)') POPDIVERT ##################################### ### FTN Mailer specification ### ##################################### VERSIONID(`ftn.m4 V1.5') ifdef(`_MAILER_smtp_', `# FIDOGATE mailer Mftn, P=FTN_MAILER_PATH, F=CONCAT(mDFMhu, FTN_MAILER_FLAGS), S=52/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), A=FTN_MAILER_ARGS ')
As one can see the configuration for using rfc2ftn isn't that complex, and we don't have to care about what is exactly happening, we simply use the defined mailer "ftn" like the predefined mailers "smtp", "uucp" etc.
Now let's go on with the configuration of the mc-file. I called it
spinnaker.mc
, but the name isn't that relevant, it is only
necessary that it resides in /usr/src/sendmail/cf/cf
.
spinnaker.mc
looks like this:
# /usr/src/sendmail/cf/cf/spinnaker.mc # # sendmail V8 configuration for spinnaker.rhein.de # using UUCP and FidoGate # include(`../m4/cf.m4') VERSIONID(`spinnaker.mc V1.16') OSTYPE(linux)dnl define(`confUSE_ERRORS_TO', `True')dnl define(`confCOPY_ERRORS_TO', `postmaster')dnl define(`confMIME_FORMAT_ERRORS', `False')dnl FEATURE(notsticky)dnl FEATURE(mailertable,hash -o /etc/sendmail/mailertable)dnl FEATURE(always_add_domain)dnl FEATURE(nodns)dnl FEATURE(nocanonify)dnl MAILER(local)dnl MAILER(ftn)dnl MAILER(smtp)dnl MAILER(uucp)dnl Cwspi spi.rhein.de Cwp13 p13.flokiste.fido.de Cwp13.f111.n2450.z2.fido.sub.de Cwp13.f64.n100.z21.ger.sub.de # define(`SMART_HOST', uucp-dom:rhein) define(`SMART_HOST', ftn:f4.n5000.z2.fido.de) LOCAL_RULE_3 # Route fidonet.org and fido.sub.org via FTN! R$* < $* z2.fidonet.org > $* $1 < $2 z2.fido.sub.de > $3 R$* < $* fido.sub.org > $* $1 < $2 fido.sub.de > $3
deliver
, mail.local
or
procmail
), "ftn" (Fido-compatible nets via FidoGate), "smtp"
(transport via the online-mail-protocol SMTP) and "uucp" (transport
via UUCP) are defined. The latter two ones aren't necessary for a
system that is only connected with FidoGate to the Internet, but the
mailer "ftn" is based on them (that's why ftn.m4
is so short).
In the lines beginning with Cw
various names of my computer are
defined.
By
define(`SMART_HOST', ftn:f4.n5000.z2.fido.de)
define(`SMART_HOST', uucp-dom:rhein)
At the end of spinnaker.mc
I've built in a special gimmick:
LOCAL_RULE_3 # Route fidonet.org and fido.sub.org via FTN! R$* < $* z2.fidonet.org > $* $1 < $2 z2.fido.sub.de > $3 R$* < $* fido.sub.org > $* $1 < $2 fido.sub.de > $3
Here z2.fidonet.org
is mapped into z2.fido.sub.de
and
fido.sub.org
into fido.sub.de
, thus all Fido-mails addressd
to the various Fido-domains will be send to fido.sub.de
, which is
then send via FTN (instead of UUCP). Please note: There should be at
least one TAB between $*
and $1
(not just
blanks).
Therefore we need the above defined file
/etc/sendmail/mailertable
. In this file "exceptions" of the
default routing are defined, e.g. the routing via Fido.
.fido.sub.de ftn:f111.n2450.z2.fido.sub.de .fido.de ftn:f111.n2450.z2.fido.sub.de .ger.sub.de ftn:f64.n100.z21.ger.sub.de .z242.fido.de ftn:f4.n5000.z242.fido.de
/etc/sendmail
:
makemap hash mailertable.db < mailertable
makemap dbm mailertable < mailertable
spinnaker.mc
from hash
to dbm
. Change this
line to
FEATURE(mailertable,dbm -o /etc/sendmail/mailertable)dnl
After spinnaker.mc
is ready edited, we can create
sendmail.cf
from it. Go to the directory
/usr/src/sendmail/cf/cf
and execute pmake spinnaker.cf
there. By this /usr/src/sendmail/cf/cf/obj/spinnaker.cf
is
created. Move this file to /etc/sendmail.cf
and the
configuration is ready. In the case pmake isn't installed run this
instead:
m4 spinnaker.mc > obj/spinnaker.cf
# # /etc/aliases # # compile with # newaliases # nobody: /dev/null support: roland admin: roland operator: roland Roland_Rosenfeld: roland Roland.Rosenfeld: roland postmaster: roland faxadmin: roland usenet: roland sysop: roland rosenfel: roland rosenfeld: roland roro: roland uucp: roland news: roland
newaliases
to a
database after any change.
Now start sendmail as a daemon by entering:
/usr/sbin/sendmail -bd -q20m
/etc/rc.d/rc.local
. On many systems it is already defined in
/etc/rc.d/rc.M
which is possible, too. Alternatively one can
start sendmail by cron, and let inetd listen to the port. For this
enter the following in the crontab of the user root:
*/20 * * * * /usr/sbin/sendmail -q
/etc/inetd.conf
:
smtp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sendmail -bs
killall -1 inetd
after changing
inetd.conf
, to inform inetd about your changes.
Sendmail will write its logmessages via syslog. I recommend to enter
the following entry in /etc/syslog.conf
:
mail.* /var/log/mail