Hello,

In order to facilitate the configuration of sendmail I made a little
m4 script, it replaces the ugly SENDMAIL.sh :)
It needs fnet.m4 that is included in last tx and that goes in 
 ..../sendmail-cf/mailer/ while the ifmail.mc goes in ..../sendmail-cf/cf/

You have to configure a few lines in ifmail.mc then do

m4 ifmail.mc > /etc/sendmail.cf

and you have a good sendmail.cf

You need the m4 macros for sendmail (come whith the sendmail sources, 
or you can have sendmail-cf.blabla.rpm; sure other distrib schemes have 
their equivalent packages too)

NOTES:
* it has anti-spam support (trough the /etc/mail/access database)
* it assumess you use *.fidonet.org domain for fidonet and *.ftn for othernets
* it uses a "mailertable" database for special routings (others than internet
  smart host and FTN smart host)
* it uses "revaliases" database to masquerade From: lines; putting the real
  email on them.
* it uses a "pirateo" database to redirect messages to addresses on other
  domains than yours (that is useful to avoid sending to internet mail
  write on your machine to users that are also on your machine)

What is configurable ?

Only these lines :

define(`SMART_HOST',            ``[smtp.your.provider.com]'')
define(`FIDO_SMART_HOST',       ``f1.n2.z3.fidonet.org'')
define(`FIDO_GATEWAY',          ``f4.n5.z6.fidonet.org'')
define(`USE_FGATE')
FEATURE(accept_unresolvable_domains)
FEATURE(nodns)

SMART_HOST defines your ISP smart host, that is the machine you sent
	email to. That is a machine accessible by smtp (when you
	connect t othe internet throug PPP do "sendmail -q" and it
	delivers the mail). enclose the name whith [ ] if you are not 
	connected 24h/24h, otherwise problems will happen.
FIDO_SMART_HOST your fido uplink address, that is where you send pkt to.
FIDO_GATEWAY the fidonet -> internet gateway nearest to you
USE_FGATE this one is a little different. If you have *NO* internet
	connectivity at all, that is if you rely on the fidonet gateway,
	put this line:

define(`USE_FGATE')

	however, if you can connect to the internet to send to a smart host
	put this one instead :

undefine(`USE_FGATE')

accept_unresolvable_domains and nodns features are defined if you don't
	have a 24h/24 internet connection.

That's all for a simple setup ! run (m4 ifmail.mc > /etc/sendmail.cf)

=========================================================================
Don't forget to put in /etc/mail/sendmail.cw the list of all your machine
local addresses (either uucp name if one, fidonet, other FTN,...).
Exemple I have :

# sendmail.cw - include all aliases for your machine here.
chanae.stben.be
linux.chanae.stben.be
f2219.n293.z2.fidonet.org
p29.f1.n850.z4.fidonet.org
f4120.n320.z101.francom.ftn

=========================================================================
If you are connected to other FTN networks or if you want some routing
other than trough FIDO_SMART_HOST and/or SMART_HOST edit the file
/etc/mail/mailertable to add some special routings, using the syntax :

domain		transport:trough.system

ex:

f2219.n293.z2.fidonet.org	fnet:f2219.n293.z2.fidonet.org

sends direct to 2:293/2219 trough fnet. NOTE: points aren't handled, for
that you will also need:

.f2219.n293.z2.fidonet.org	fnet:f2219.n293.z2.fidonet.org

note the leading dot !

For *your* points put (assming you are f15.n2.z3.fidonet.org) :

.f15.n2.z3.fidonet.org		fnet:%1.f15.n2.z3.fidonet.org

(again note the leading dot, and the %1)

for othernets is the same, ex:

.maxwellnet.ftn			fnet:f12.n34.z555.maxwellnet.ftn

and for other transports too:

.some.uucp			uucp-dom:barney
.some.smtp			smtp:[local.networked.machine]

each time you modify /etc/mail/mailertable you need to recompile it running:

makemap hash /etc/mail/mailertable < /etc/mail/mailertable

=========================================================================
To masquerade From: addresses edit /etc/mail/genericstable and add lines like

localuser	login@somewhere

to masquerade the local user "localuser" as "login@somewhere".
each time you modify /etc/revaliases you need to recompile it running:

makemap hash /etc/mail/genericstable < /etc/mail/genericstable

=========================================================================
To redirect mail to specific users  of other domains add in /etc/mail/pirateo
lines like:

someuser@somewhere	someother@other.place
user@domain		localuser

For exemple if you use "peter" as your login on your linux box; and
your email at your ISP is psmith@aol.com; then you can put:

psmith@aol.com		peter

so if someone sends mail to psmith@aol.com it isn't sent to internet
but directly sent to local user peter.

each time you modify /etc/mail/pirateo you need to recompile it running:

makemap hash /etc/mail/pirateo < /etc/mail/pirateo
=========================================================================
sendmail 8.9.* has powerfull anti-spam features; if you want to reject
mail from given addresses, hosts or domains you can add them in
/etc/mail/access whith the keyword REJECT. Other keywords are OK which
overrides all other cases and allow the given address, RELAY, to
accept relaying and DISCARD to simply ignore the message.
If you want to act as a gateway to internet for your FTN network you should
allow relaying for fidonet.org and ftn.
I also suggest you allways accept mail from postmaster@* and abuse@*
so the file should be like:

abuse@			OK
postmaster@		OK
fidonet.org		RELAY
ftn			RELAY
somespammer@aol.com	REJECT
cyberpromo.com		REJECT
mail.for.u		DISCARD

If you are connected 24h/24 you should consider the Real-time Black List.
see http://maps.vix.com/

after any modification of /etc/mail/access you must rebuild it

makemap hash /etc/mail/access < /etc/mail/access


-- 

A bientôt,
Pablo Saratxaga
