Deja News Toolbar
 
Interest Finder
Browse Groups

 
Search
 

Find messages in the archive
Home About Deja News My Deja News Post Power Search Home Search Help
 
3Com
3Com

Message 2 of 11 help
return to current results
Re: Virtual domains with smail
more headers
 
<<
Previous
message
  >>
N e x t
message
 
Author:   Jeremy Malcolm   author profile
email reply
view thread
post new · post reply
subscribe
Email: terminus@odyssey.apana.org.au
Date: 1998/08/16
Forums: comp.mail.smail
view for bookmarking  ·  text only  


Received this excellent reply from Bruce Esquibel:

Ok, think I figured this out, I don't remember all the reasons why but to
get smail to take in mail for other domains MX'ed to you, here is the
proceedure.

First off, we're a s5r4 system and everything for smail was compiled into
/usr/local/lib/smail. That directory contains the stuff for smail (other
than the binaries) like the files "config", "transports", "routers" and so
forth.

The first thing to do is modify the file called routers by adding these
lines into it. I beleive the file is acted upon in order so it should go
towards the beginning, we put ours after the entry for force_paths: ...

fakedomain:
        driver=pathalias,
        method=file;
        file=file.paths,
        proto=lsearch,
        optional,

This creates a router rule (driver?) for a new format called fakedomain
using the data contained into a file called file.paths, which is also in the
directory the rest of them are in (config,transports,routers).

In that directory create a file called file.paths containing the domain name
(with leading dot), tab, then a short name for it which will be used in the
transports file with a !%s at the end. Thus if you are supposed to handle
the mail for xyzincorporated.com and nitwit.org, the entries could look like
this:

.xyzincorporated.com xyzi!%s
.nitwit.org  nitwit!%s

Now edit the transports file by adding "what to do with the mail", all of
the entries can be added at the end of the file, order isn't important.
Let's say the xyz inc. people want their mail forwarded to xyz@aol.com,
their entry would look like this:

xyzi:
        driver=pipe,
        return_path, from;
        cmd="/usr/local/bin/smail xyz@aol.com",
        pipe_as_sender,

The nitwit people have an account on your system and pick up the mail there
using the account name thenits. Their entry would look like this:

nitwit:
        driver=appendfile,
        return_path, from, unix_from_hack;
        file=/var/mail/thenits,
        user=thenits,
        append_as_user, mode = 0620,

The last thing you have to do is something I don't remember why it has to be
done, but I'm pretty sure nothing works if you don't. In the ?/lib/smail
directory you have another directory called methods which is probably empty.
In this directory (?/lib/smail/methods) you create a file called file. The
contents of this is simply the short names you are using for the transports
entries, tab, followed by the name again.

Using the above examples the ?/lib/smail/methods/file would look like:

xyzi xyzi
nitwit nitwit


Basically that is it, once the routers file is modified you don't have to
touch it again. When adding a new domain you edit transports, file.paths and
methods/file duplicating the above steps to your needs.

There is probably a more elegant solution but we never got anything else to
work (properly anyway) and still use the above today.

The only warnings I have to give you is that certain things may not work.
For example by default when smail is compiled there are options to hard-code
the location of config,transports,routers and so forth so what you are
editing doesn't mean those are the ones smail are using when running. This
can be over-ridden by editing the config file. Of course if you compiled it
you know if that was the case. There is also an option for using a second
config location "if it exists".

In the transports file examples I used in the above the:

return_path, from, unix_from_hack;

and

append_as_user,mode = 0620

may have been unique to s5r4 unix systems. I don't think it'll hurt anything
but these are used so the mail file doesn't get owned by root or the
permissions mess up so it can't be world readable or something like that.

Also in the transports example I used /var/mail, yours is probably /usr/mail
or /usr/spool/mail or whatever.

We handle the mail for about 250 domains and it works just fine. It is a
pain in the ass adding entries, or remembering to edit all the files but it
beats the hell out of trying to figure out Sendmail.

Anything unclear just drop me a line.

-bruce
bje@ripco.com

Email a Friend
 
Join The Discussion Now!

Message 2 of 11 <<
Previous
message
  >>
N e x t
message
3Com
3Com
 
  Home  ·  Search  ·  My Deja News  ·  Post  ·  Power Search  ·  Help  ·  How are we doing?

Free Coupons!  |  Register Your Domain Name  |  Yellow Pages  |  Auctions  |  Directories
Trade Now! with Datek Online |  Developer Resources
Movies & Music!  |  Great Deals at uBid!

New Users · About Deja News · Ad Info · Our Advertisers · Deja News Store
Free Web Email · Link to Deja News · Create Your Own Forum


Copyright © 1995-98 Deja News, Inc. All rights reserved. Conditions of use.
Site privacy statement reviewed by TRUSTe.