Here are some examples of how you can adjust sendmail to do what you want. Some examples require modifying sendmail.cf. I urge you not to follow these unless you fully understand what you're doing, one single typo or misconfiguration will put the entire sendmail out of function. 1. Adding more than one local mailer: ------------------------------------- My definition of local mailers in sendmail.cf looks like: Mlocal,P=/bin/mail,F=DFMlrmns,R=25/10,S=10,A=mail -d $u,C=LATIN1,X=29,T=tunnel Mlocal-mime,P=/bin/mail,F=DFMlrmns,R=25/10,S=10,A=mail -d $u,C=LATIN1,X=29,T=mime Mlocal-sun,P=/bin/mail,F=DFMlrmns,R=25/10,S=10,A=mail -d $u,C=LATIN1,X=29,T=mailtool Mlocal-mac,P=/bin/mail,F=DFMlrmns,R=25/10,S=10,A=mail -d $u,C=MACINTOSH,X=29,T=eudora Mlocal-tunnel,P=/bin/mail,F=DFMlrmns,R=25/10,S=10,A=mail -d $u,C=MACINTOSH,X=29,T=tunnel Each of them corresponds to a specific conversion routine and a specific charset. 2. Adding support for local user based conversion (by Neil Rickert) ------------------------------------------------------------------- First, I would add the name SPECIAL to my definition of PSEUDODOMAINS. This is to create a set of domains for which the nameserver will not be consulted. Second, I create the following entries in xaliases: martin: martin@local-a.SPECIAL peter: peter@local-b.SPECIAL Third, I add the following entries to MAILERTABLE: local-a!localhost local-a.SPECIAL local-b!localhost local-b.SPECIAL This approach will not yield the appropriate fromcharset. If you need that look at the following exmaple. 3. Adding support for coupled local user/ local mailer based conversion ----------------------------------------------------------------------- (Don't do this if you're not sure about what you're doing) Add another table to sendmail.cf. Call it localtable: OKG/usr/local/lib/mail/generics OKM/usr/local/lib/mail/mailertable OKN/usr/local/lib/mail/domaintable OKP/usr/local/lib/mail/pathtable OKU/usr/local/lib/mail/uucpxtable OKT/usr/local/lib/mail/localtable <<<<<<<< Add this line Modify rulesets S0 and S26 (they resolve the local mailer) to use the localtable for mailer resolution for local users. S0 # Force any routing thru localhost to be local. Used for alias building, # and to avoid sending to MAILSERVER. # NOTE: If you are stuck with an old version of sendmail+IDA - one which # does not recognize $&x on the LHS of rewrite rules - change the # first rule below to: # R<@localhost>,@$+$=Y$+ ?$>29$>8<@$1>$2$3 Relativize R$&f<@localhost>,@$+$=Y$+ ?$>29$>8<@$2>$3$4 Relativize R?<@$=w>$=Y$+ ?<>,$3 Remove local host #R?<$*>$+ $#LOCAL$@$w$:$>25<$1>$2 << Comment out #R<@localhost>,$~A$* $#LOCAL$@$w$:$1$2 << Comment out R?<@$=w>$=Y$+ $#$(T$2$:LOCAL$)$@$w$:$>25<$1>$2 << Replace with this R<@localhost>,$~A$* $#$(T$1$:LOCAL$)$@$w$:$1$2 << and this S26 # Reformat local addresses so easily recognized. R<@$=w>$+ <>,@$1$2 Reformat locals R<>,@$+$=Y$+ <>,$3 for easy recognition # Search for possible global alias R<$+>$=Y$~A$* $:<$1>$2$3$4?$>4$>25<$1>,$3$4 externalize R<$+>$+?$+ $:<$1>$2?$3?$(@ $3 $: $) search aliases R<$+>$+?$+?$+ <>,$3 Found, format as local R$+?$* $1 not found, remove marks # Deliver to locals right away #R<>,$+ $#LOCAL $@$w $:$1 << Comment out R<>,$+ $#$(T$1$:LOCAL$)$@$w$:$1 << And replace with this Edit the new table localtable according to: LOCAL-MIME martin Add mailer/user pairs for each user that should use another local mailer than "local". Add making of localtable in your table Makefile: localtable.dir: localtable ./dbm -LN make localtable localtable Be sure to use the -r flag with xalparse to relativize to localhost. Remake localtable, refreeze your sendmail.fc and restart sendmail. Now you should have coupled a local user to a local mailer. This method will enable sendmail to yield fromcharset from local mailers. One drawback with this method, however, is that now sendmail will no longer recognize tha additional local mailers as "the" local mailer, thus will not look for .forward in the users home directory and so on. To fix this edit every check for LocalMailer in the sendmail source to check for the string "local" in the mailer name instead. I.e.: Change: if (m == LocalMailer) to if (!strncasecmp(m->m_name, "local", 5) 4. Setting up an always-MIME-out sendmail ----------------------------------------- Setting up sendmail to always send MIME as output is for example very simple. Modify the TCP-mailer to use the mime conversion script as: MTCP, P=[IPC],F=CDFMXhnmu,E=\r\n,R=10/11,S=11,A=IPC $h,C=LATIN1,X=29,T=mime If you want the local users also to receive only MIME messages modify the local mailer accordingly. Good Luck! Martin.Wendel@udac.uu.se