Re: Debian sendmail.cf

Pablo Saratxaga (srtxg@linux.chanae.stben.be)
Tue, 29 Jul 1997 11:06:34 +0200 (MET DST)

--ELM870167194-32015-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

<!--Kaixo !

>> I was wondering if there are any Debian users out there who have a
>> sendmail.cf set up for ifmail. I've tried Pablo's m4 routine and kludging
>> one up myself, but haven't hit the mark yet.

maybe some paths are different... you need to put fnet.m4 in the mailer/
subdirectory and put ifmail.mc in the cf/ directory; or modify its line

include(`../m4/cf.m4')

to have the right path to include cf.m4 (use locate to found out)

> Then you need to setup the mailertable. Below is my mailertable:
>
> .fidonet.org fido:f245.n640.z3.fidonet.org

that is indeed simple, but will miserabily crash if you try to write to
srtxg@mail.z2.fidonet.org for exemple (which is a valid address).

That is why I included in the sample ifmail.mc some rules to recognize that
kind of addresses. then routing other than for fidonet uplink and
internet default (either by smart host or by fido gateway) goes in
/etc/mailertable too.

I'll atach the sample ifmail.mc (btw, I use "fnet" as the mailer name
instead of "fido").

It adds anti-spam feature too :)
put email addresses and domains you want to reject in /etc/sendmail.rej, eg:

home_employ.net
home_employ@juno.com
havecredit@impsat1.com.ar
tj3905@cleopatra.org
]
theduplicator.com

(the "]" will reject any address like "user@[123.45.67.89]", as it matches
" * @ * ] " )

What you have to configurate in the *.mc file :

define(`LOCAL_LOGIN_NAME', ``emartine'')
define(`SMART_HOST', ``[smtp.your.provider.com]'')
define(`FIDO_HOST_ADDRESS', ``f15.n2.z3.fidonet.org'')
define(`FIDO_SMART_HOST', ``f1.n2.z3.fidonet.org'')
define(`FIDO_GATEWAY', ``f4.n5.z6.fidonet.org'')
define(`ISP_LOGIN_NAME', ``emartine'')
define(`ISP_MAIL_DOMAIN', ``provider.com'')
define(`USE_FGATE')

LOCAL_LOGIN_NAME: your local login. [1]
ISP_LOGIN_NAME: what is before the "@" on your email address at your ISP [1]
ISP_MAIL_DOMAIN: what is after the "@" on your email address at your ISP [1]
SMART_HOST: your internet smart host [2]
FIDO_HOST_ADDRESS: your fidonet address
FIDO_SMART_HOST: your fidonet uplink
FIDO_GATEWAY: the fidonet gateway nearest to you
define(`USE_FGATE') or undefine(`USE_FGATE') [3]

[1] : these are used so if you receive a message for yourlogin@your.isp
it doesn't go to the internet to get back by pop...
if you have not ISP account leave them blank.
[2] : the machien where you send all mail, default is by smtp, but you can
also use uucp whith "uucp-dom:remotename" for exemple.
the enclosing [ ] tells not to use DNS lookup for MX (that cause
problems if you write mail when not online, so putting [] avoids
the problem :) )
[3] : if you define it all internet mail will go through the gateway, if you
have a true internet access undefine it.

That's all.
create the sendmail.cf and edit /etc/sendmail.cw and /etc/mailertable as
usual.

-- 

A bientôt, Pablo Saratxaga

~ ~ :wq ;-) PGP Key available, key ID: 0x8F0E4975 -->

--ELM870167194-32015-0_ Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: attachment; filename=ifmail.mc Content-Description: /usr/lib/sendmail-cf/cf/ifmail.mc Content-Transfer-Encoding: 7bit

divert(-1) define(`LOCAL_LOGIN_NAME', ``emartine'') define(`SMART_HOST', ``[smtp.your.provider.com]'') define(`FIDO_HOST_ADDRESS', ``f15.n2.z3.fidonet.org'') define(`FIDO_SMART_HOST', ``f1.n2.z3.fidonet.org'') define(`FIDO_GATEWAY', ``f4.n5.z6.fidonet.org'') define(`ISP_LOGIN_NAME', ``emartine'') define(`ISP_MAIL_DOMAIN', ``provider.com'') define(`USE_FGATE')

include(`../m4/cf.m4') define(`confDEF_USER_ID',``8:12'') define(`confMATCH_GECOS',`True') define(`confTRY_NULL_MX_LIST',`True') define(`confTO_QUEUEWARN', `2d') define(`confTO_QUEUERETURN', `8d') define(`confTRUSTED_USERS',`fnet') OSTYPE(`linux') undefine(`UUCP_RELAY') undefine(`BITNET_RELAY') FEATURE(redirect) FEATURE(always_add_domain) FEATURE(use_cw_file) FEATURE(local_procmail) FEATURE(nodns) FEATURE(nocanonify) FEATURE(mailertable) MAILER(procmail) MAILER(smtp) MAILER(fnet) MAILER(uucp)

LOCAL_CONFIG # Pseudo-domains (don't call the DNS on them) CPz1.fidonet.org z2.fidonet.org z3.fidonet.org z4.fidonet.org CPz5.fidonet.org z6.fidonet.org ftn

# Domains and addresses we refuse mail from FR/etc/sendmail.rej

# for fidonet address, don't send trough fnet mailer addresses like # smtp.z2.fidonet.org, www.z2.fidonet.org, etc CFfidonet ns ns2 mail smtp www ftp

LOCAL_NET_CONFIG # ************ FIDONET.ORG *********** # for nodes allways put leading $* if you want to route his points too # routed trough default smart host FIDO_SMART_HOST R$* < @ $~F $+ .z1.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z1.fidonet.org > $4 R$* < @ $~F $+ .z2.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z2.fidonet.org > $4 R$* < @ $~F $+ .z3.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z3.fidonet.org > $4 R$* < @ $~F $+ .z4.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z4.fidonet.org > $4 R$* < @ $~F $+ .z5.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z5.fidonet.org > $4 R$* < @ $~F $+ .z6.fidonet.org . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z6.fidonet.org > $4

# all the remaining FTN's (via fido smart host FIDO_SMART_HOST) R$* < @ $+ .ftn . > $* $#fnet $@ FIDO_SMART_HOST $: $1 < @ $2 .ftn > $3

# If you don't have internet connectivity comment out this line # to send through the gateway FIDO_GATEWAY # (packets will go to your default uplink FIDO_SMART_HOST) ifdef(`USE_FGATE',`',`#')R$* < @ $* > $* $#fnet $@ FIDO_SMART_HOST $: $1 % $2 < @ FIDO_GATEWAY > $3

LOCAL_RULE_0 # ************ ME (and local) *************** ifdef(`ISP_LOGIN_NAME', `', `#')R ifdef(`ISP_LOGIN_NAME',`ISP_LOGIN_NAME',`login')<@ ifdef(`ISP_MAIL_DOMAIN',`ISP_MAIL_DOMAIN',`provider.com') > $* $#local $: LOCAL_LOGIN_NAME

################### # ANTI-SPAM RULES # ###################

Scheck_mail R < $+ @ $* $=R > $#error $@ 5.7.1 $: "571 unsolicited email is refused" R $+ @ $* $=R $#error $@ 5.7.1 $: "571 unsolicited email is refused" R < $=R > $#error $@ 5.7.1 $: "571 unsolicited email is refused" R $=R $#error $@ 5.7.1 $: "571 unsolicited email is refused" R$* $@ OK

Scheck_compat #sender-address $| recipient-address R < $+ @ $* $=R > $| $* $#error $@ 5.7.1 $: "571 unsolicited email is refused" R $+ @ $* $=R $| $* $#error $@ 5.7.1 $: "571 unsolicited email is refused" R < $=R > $| $* $#error $@ 5.7.1 $: "571 unsolicited email is refused" R $=R $| $* $#error $@ 5.7.1 $: "571 unsolicited email is refused" R $* $=R @ FIDO_GATEWAY $| $* $#error $@ 5.7.1 $: "571 unsolicited email is refused"

# To: "UUCP" at local is returned back. Because it happens whith ifmail # receiving mail to "UUCP" via FTN but whitout a To: line specifying a # destination ! 8-) R $* fidonet.org $| UUCP $#error $: "You MUST provide a To: address" R $* ftn $| UUCP $#error $: "You MUST provide a To: address"

R$* $@ OK

--ELM870167194-32015-0_--