Convert from UUCP to SMTP

Hello.

I need to convert a mailsystem from UUCP to SMTP. but I can´t  understand the .cf file.

What do a need in my .mc file to get this configuration work with smtp instead. Or should I just edit the .cf file?

Best Regards
Daniel

#
#      @(#) sendmail.cf 96/12/17
#
# **************************************************************************
#
#       Copyright (c) 1996
#
# **************************************************************************
#
# Initial sendmail.cf file.
#
#

###############################################################################
###                                                                         ###
###            sendmail configuration for generic complex host              ###
###                with both UUCP and Internet connections                  ###
###                                                                         ###
###############################################################################

###############################################################################
###   baseline definitions that sendmail needs to operate                   ###
###############################################################################

# Our local domain
# CHANGE
DDtest.se
CDtest.se


# All the names we are known by (put all the names & nick names on the next
# line, separated by spaces. If you need another line, begin it with "Cw")
#
Dwmail
#
#
Cwmail
# Our UUCP name
# CHANGE
DUtest

# the list of UUCP hosts that we speak to (same rules as Cw, use the
# output of the "uuname" command; also, when you add or delete a host
# from /usr/lib/uucp/Systems, don't forget to add or delete it here)
CUtest

##########################
###   Special macros   ###
##########################

DVSCA-6.6

# my official hostname
Dj$w.$D
# my name (the name on mailer bounces)
DnMAILER-DAEMON
# UNIX header format
DlFrom $g $d
# delimiter (operator) characters
Do.:%@!^/[]
# format of a total name
Dq$?x$x <$g>$|$g$.
# SMTP login message
De$j Sendmail $v/$V ready at $b

###################
###   Options   ###
###################

# send MIME-format error messages
Oj
# (don't) require DNS (no fallback to /etc/hosts)
#OI
# we have full sendmail support here
#Oa
# location of alias file
OA/etc/mail/aliases
OA/etc/mail/aliases.test
# default delivery mode (deliver in background)
Odbackground
# (don't) connect to "expensive" mailers
#Oc
# temporary file mode
OF0600
# default GID
Og12
# location of help file
OH/usr/lib/sendmail.hf
# log level
OL9
# Send to me too (even if I'm in an alias expansion)
Om
# default messages to old style
Oo
# queue directory
OQ/usr/spool/mqueue
# read timeout -- violates protocols (timeout an SMTP idle for 2 hours)
Or2h
# status file
OS/usr/lib/sendmail.st
# queue up everything before starting transmission
Os
# default timeout interval (returns undelivered mail after 3 days)
OT3d
# time zone names (V6 only)
# OtPST,PDT
# default UID
Ou1
# wizard
# OW
# rebuild the aliasfile automagically
OD
# maximum load average before queueing mail
Ox10
# maximum load average before rejecting connections
OX15

###############################
###   Message precedences   ###
###############################

Pfirst-class=0
Pspecial-delivery=100
Pbulk=-60
Pjunk=-100

#########################
###   Trusted users   ###
#########################

Troot
Tdaemon
Tnews
Tuucp
Tcron

#############################
###   Format of headers   ###
#############################

HReceived: $?sfrom $s $.$?_($_) $.by $j ($v/$V) $?r with $r$.
      id $i$?u for $u$.; $b
H?P?Return-Path: <$g>
H?D?Date: $a
H?F?From: $q
H?x?X-Full-Name: $x
HSubject:
H?F?Resent-From: $q
H?D?Resent-Date: $a
H?M?Resent-Message-Id: <$t.$i@$D>
H?M?Message-Id: <$t.$i@$D>


###############################################################################
#            RULESET ZERO PREAMBLE                                         #
###############################################################################

S0
# first make canonical
R$*<$*>$*            $1$2$3                        defocus
R$+                  $:$>3$1                        make canonical

# handle special cases.....
R@                  $#local$:$n                  handle <> form
R$*<@[$+]>$*            $1<@$[[$2]$]>$3                  numeric internet spec

# now delete the local info
R$*<$*$=w.UUCP>$*      $1<$2>$4                  thishost
R$*<$*$=w.$D>$*            $1<$2>$4                  thishost
R$*<$*$=w>$*            $1<$2>$4                  thishost
R$*<$*.>$*            $1<$2>$3                  drop trailing dot
R<@>:$*                  $@$>0$1                        retry after route strip
R$*<@>                  $@$>0$1                        strip null trash & retry

# try to canonicalize local UUCP stuff in case user mails localmachine!user
R$-!$+                  $:$>11$1!$2
R$*.$D!$+            $2<@$1.$D>            domain-ize

# return uucp mail that looks like decvax!ittvax!marsvax! since it
# will be rejected at the final site with no username on it
R$*!<@$-.UUCP>            $#error$:Destination address truncated
R$*@$+!$+            $#error$:Illegal Address Format


###############################################################################
###  Machine dependent part of ruleset zero (where we decided what to do)   ###
###############################################################################

# resolve UUCP links to hosts known to this machine
#R$*<@$=U>$*            $#uucp$@$2$:$1            resolve local uucp

# special case violation of RFC822 for hybrid bang/at addresses
# if uucphost!user@arpahost, forward to uucphost if we speak to it.
#R$=U!$+<@$+>$*            $#uucp$@$1$:$2@$3$4
#R$=U!$+                  $#uucp$@$1$:$2


# resolve various and sundry other unofficial networks
#R$*<@$+.BITNET>$*      $#tcp$@cunyvm.cuny.edu$:$1@$2.BITNET$3            BITNET
#R$*<@$+.MFENET>$*      $#tcp$@nmfecc.arpa$:$1@$2.MFENET$3            MFENET
#R$*<@$+.CSNET>$*      $#tcp$@relay.cs.net$:$1@$2.CSNET$3            CSNET

# try to canonicalize so that we can optimize the local path
R$*<@$->$*            $:$>11$1<@$2>$3            canonicalize user@host


# when all else fails, look up the whole name in the host table
R$*<@$=D>$*            $:$>99$1<@$2>            special...
R$+<@$+>            $#uucp$@test$:$1@$2            user@domain
R$~U!$-                  $#uucp$@test$:$2@$1
R$~U!$-!$*            $#uucp$@test$:$1!$2!$3
R$~U!$-.$+!$*            $#uucp$@test$:$1!$2.$3!$4


# remaining names must be local

R@                  $n                              fix magic token
R$+                  $#local$:$1                        everything else


###############################################################################
###   End of ruleset zero                                                   ###
###############################################################################

###########################
#  Name Canonicalization  #
###########################

S3
# handle "from:<>" special case
R$*<>$*                  $@@                        resolve into magic token

# basic textual canonicalization
R$*<$*<$*<$+>$*>$*>$*      $4                        3-level <> nesting
R$*<$*<$+>$*>$*            $3                        2-level <> nesting
R$*<$+>$*            $2                        basic RFC821/822 parsing
R$+ at $+            $1@$2                        "at" -> "@" for RFC 822
R$*<$*>$*            $1$2$3                        in case recursive

# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@$+,$+                  @$1:$2                        change all "," to ":"

# localize and dispose of domain-based addresses
R@$+:$+                  $@$>6<@$1>:$2                  handle <route-addr>

# more miscellaneous cleanup
R$+                  $:$>9$1                        host dependent cleanup
R$+<@$+>            $@$>6$1<@$2>                  canonical <a.b!c>
R$+:$*;@$+            $@$1:$2;@$3                  list syntax
R$+@$+                  $:$1<@$2>                  focus on domain
R$+<$+@$+>            $1$2<@$3>                  move gaze right
R$+<@$+>            $@$>6$1<@$2>                  already canonical

# convert old-style addresses to a domain-based address
R$+^$+                  $1!$2                        convert ^ to !
R$+!$+                  $@$>9$1!$2                  uucp name hackery
R$+%$+                  $:$>5$1%$2                  user%host%host
R$+<@$+>            $@$>6$1<@$2>                  canonical


S5
# Given multiple %'s change rightmost % to @.
R$*<$*>$*            $1$2$3                        defocus
R$*%$*                  $1@$2                        First make them all @'s.
R$*@$*@$*            $1%$2@$3                  Undo all but the last.
R$*@$*                  $@$1<@$2>                  Put back the brackets.

###############################################################################
####   Assorted name hackery to make things simple for people              ####
###############################################################################

# here we look for addresses of the form: user%host.domain@gateway
# and strip off the gateway name (for the ones that we know)

S6
#R$+<@$=U.$+>$*            $@$2!$1            Strip domains for uucp neighbors

# conventional percent format
R$+%$+.MFENET<@nmfecc.arpa>            $>5$1<%$2.MFENET>      strip
R$+%$+.BITNET<@cunyvm.cuny.edu>            $>5$1<%$2.BITNET>      strip
#R$+%$+.CSNET<@relay.cs.net>            $>5$1<%$2.CSNET>      strip

# regulation route-addr format
R<@nmfecc.arpa>:$+@$+.MFENET            $1<@$2.MFENET>            strip
R<@cunyvm.cuny.edu>:$+@$+.BITNET      $1<@$2.BITNET>            strip
R<@relay.cs.net>:$+@$+.CSNET            $1<@$2.CSNET>            strip


S7
# mung up names for the outside world - called from tcp mailer
R$+@$+.MFENET            $1%$2.MFENET@nmfecc.arpa      user@host.MFENET
R$+@$+.BITNET            $1%$2.BITNET@cunyvm.cuny.edu      user@host.BITNET
#R$+@$+.CSNET            $1%$2.CSNET@relay.cs.net      user@host.CSNET

###############################################################################
####   UUCP address hackery                                                ####
###############################################################################

S9
R$*$=w!$+            $3                        collapse loops
R$+!$+@$+            $@$>6$3!$1!$2                  a.b!c.d!user
R$-.$+!$+            $@$>6$3<@$1.$2>                  do.main!user
R$+@$=U                  $@$2!$1                        fix user@UUCPhost
#R$=U!$+            $@$>6$2<@$1>                  host!user
R$=U!$+                  $@$>6$1!$2                  host!user
R$~U!$+                  $@$1!$2


#R$-!$+                  $@$>6$2<@$1>.UUCP            host!user

################################
#  Sender Field Pre-rewriting  #
################################

S1
R$*<$*>$*            $1$2$3                        defocus

###################################
#  Recipient Field Pre-rewriting  #
###################################

S2
R$*<$*>$*            $1$2$3                        defocus

###################################
#  Final Output Post-rewriting    #
#  Standard Domain-based version  #
###################################

S4
R@                  $n                        handle <> error addr

# externalize local domain info
R@$+:$+:$+            $@@$1,$2:$3                  <route-addr> canonical

# UUCP must always be presented in old form
R$+@$-.UUCP            $2!$1                        u@h.UUCP => h!u

###############################################################################
###   Local, and Program Mailer specifications                              ###
###############################################################################

Mlocal,            P=/usr/bin/procmail, F=lsDFMAw5:/|@qmn, S=10, R=20,
            T=DNS/RFC822/X-Unix,
            A=procmail -r $g -d $u
Mprog,            P=/bin/sh, F=lsDFMoqeu9, S=10, R=20, D=$z:/,
            T=X-Unix,
            A=sh -c $u

S10

S20

###############################################################################
####    IP/TCP/SMTP mailer (going out to internet land)                    ####
###############################################################################

Mtcp,      P=[IPC], F=msDFMuCXP, S=14, R=20, A=IPC $h, E=\r\n

S14
R$*@[$+]$*            $@$1@[$2]$3            already ok (inet addr spec)
R@$+@$+                  $@@$1@$2            already ok (route-addr)
R$+@$=X.UUCP            $2!$1@$X            fix remote UUCP
R$+@$=Y.UUCP            $2!$1@$Y            fix remote UUCP
R$+@$=Z.UUCP            $2!$1@$Z            fix remote UUCP
R$+@$-.UUCP            $2!$1@$j            undo local UUCP hack
R$+@$+                  $@$>7$1@$2            fix up names for the internet
R$+                  $@$1@$j                  add our official host name

###############################################################################
####   UUCP mailer (bangland)                                              ####
###############################################################################

# if none of your UUCP neighbors are 4.1 BSD sites, add an "m" after "F="
# this will cause multiple recipients on the same remote host to be done
# in the same uux command (i.e. one letter sent for "n" recipients)
#
# if you want uucico to be invoked immediately after a letter is queued
# (i.e. initiate the phone call immediately) remove the "-r" flag from the
# uux command line.
#
# if you want uux to notify you upon completion of the transfer,
# add a "-z" flag from the uux command line.
# example:
#      A=uux - -z -a$f -gC $h!rmail ($u)

Muucp,      P=/usr/bin/uux, F=mDFMhu, S=13, R=23,
      A=uux - -r -a$f -gC $h!rmail ($u)

S13
#R$+@$-.UUCP            $2!$1                        u@host.UUCP => host!u
#R$=w!$+                  $2                        zap dups
#R@$+@$+                  $@$U!@$1@$2                  ugh, route-addrs
# unfortunately, I have to resolve route-addrs before this rule, because
# it is so general that it matches them too, with disastrous results. - EEF
#R$+@$-.$+            $2.$3!$1                  uucpize address
#R$+                  $:$U!$1                        stick on our host name

S23
# nothing here because bangland mailers are supposed to rewrite these headers
# relative to the sender by themselves anyway.

#
# canonicalize with the DNS
#
S11
R$*<@$->$*            $:$1<@$[$2$]>            canonicalize
R$-!$-                  $:$[$1$]!$2            canonicalize

S99
R$*<@$D>            $#local$:$1                  handle user@domain
R$*.$*<@$D>            $#local$:$1.$2                  handle user@domain
Daniel-SanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jlevieCommented:
Your sendmail.cf looks lie it supports both Internet and UUCP transports. So converting is simply a matter of disabling the UUCP polling for mail.
0
anfiCommented:
You may generete new sendmail.cf from standard sendmail.mc file.

Use FEATURE(`uucpdomain') to convert *all* uucp bang addresses to smtp addresses.
http://www.sendmail.org/m4/features.html#uucpdomain

uudomain file:
uucp-node  smtp.domain.of.uucp-node
0
Daniel-SanAuthor Commented:
I´m not sure I understand either of this Answers.

Please consider that I´m a total newbie on sendmail.

Regards
Daniel
0
anfiCommented:
Your sendmail.cf is *old*. I hope you use more fresh sendmail binary.
[Sendmail had 3 security problems in 2003 - it was bad year]

1) generate standard sendmail configuration
http://www.sendmail.org/m4/intro.html
2) add  FEATURE(`uucpdomain') to *.mc file to convert *all* uucp bang addresses to smtp addresses.
http://www.sendmail.org/m4/features.html#uucpdomain

e.g.to make sendmail convert uucp-node!user to user@smtp.domain.of.uucp-node use the following entry in uudomain file:
uucp-node  smtp.domain.of.uucp-node

P.S.
Sorry, The Sendmail Bible (The Bat Book 3rd edition) is 1000+ pages thick.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.