You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Mike Bridge <mi...@bridgecanada.com> on 2001/11/06 18:42:02 UTC
Using James with Sendmail
I spent some time yesterday figuring out how to configure
sendmail to forward to james, and I thought other people
might find it useful too. (I adapted this from the Lyris
documentation.)
-Mike
===================
Setting up Sendmail to Forward to James on Same IP Address
This describes how to set up sendmail and James so that
they can coexist on the same machine. The content has
been adapted from the Lyris documentation. The example will
configure the domain "z.com" to be processed by sendmail and
"list.z.com" to be processed by james.
1) Set up James
Sendmail (I'm using 8.11.6) and James (2.0a1) will have
to run on separate ports. Once you have James extracted,
add the line
<servername>list.x.com</servername>
so that James knows to accept mail for this domain.
You will also need to change the port configurations in config.xml.
Under the <smtpserver> section, change the port value to 26.
Restart James, and make sure it comes up correctly. Check the log
to see if you get any errors.
2) Configure the DNS and /etc/hosts file
You will need to make sure that "list.z.com" is an A record,
which points to the same IP address. Creating a CNAME will
not work, because CNAME aliases will usually get rewritten
by sendmail. In the z.com zone file:
original IN A 192.168.0.1
list IN A 192.168.0.1
Then, create MX records for the new subdomain like this:
list IN MX 5 original.z.com.
Once that's done, you can also add list.z.com to the /etc/hosts file.
3) Configure sendmail
a) Define a mail delivery agent
You first need tell sendmail that james is a mail delivery agent. Add
the following line to your sendmail.cf file. Note that
there are TABS before the P=, T= and A=.
Mjames, P=[IPC], F=mDFMuX8ak, E=\r\n, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h 26
b) Create the S0 rule
The following rule tells sendmail to use the delivery agent
we defined in (a) for addresses ending in @list.z.com:
R$*<$*...@list.z.com>$* $#lyris $@list.z.com :$1<$2...@list.z.com>$3
This line goes somewhere after a line that says "S0".
Note that the first whitespace is actually TAB, and the other two spaces
are actually spaces.
c) Allow sendmail to relay to your new hostname.
Normally, you'll need to either add a Cw entry in your sendmail.cf
file, or you'll add the domain to the file /etc/mail/relay_allow.
(This file name appears in the line F{RelayTo}).
d) Add a mailertable entry
Lastly, you'll need to make sure that mailertable is enabled in
sendmail.cf, e.g.:
Kmailertable hash /etc/mail/mailertable
and add a line to your mailertable file that looks like this:
list.z.com james:original.z.com
then run makemap:
makemap hash mailertable < mailertable
Once you've restarted sendmail, james should be receiving
mail for @list.z.com.
--
Mike Bridge <mi...@bridgecanada.com>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>