[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

openbsd sendmail virtusertable howto



this assumes, of course, that your domains are functioning and the openbsd
server serves as their mx

first you'll need to create your own mc file (used to generate cf files)
using the openbsd default as a template:
cd /usr/share/sendmail/cf
cp openbsd-proto.mc custom.mc

now edit your custom.mc file with your favorite editor, adding the following
lines after the uucp line:
FEATURE(`virtusertable', `hash /etc/mail/virtusertable')
FEATURE(use_cw_file)

use make to generate the cf file, back up our existing cf file, and replace
it with our custom one:
make custom.cf
cd /etc/mail
mv sendmail.cf sendmail.cf.dist
mv /usr/share/sendmail/cf/custom.cf ./sendmail.cf

create a file named local-host-names, listing each domain you wish to accept
mail for:
domain1.com
domain2.com

create a file named relay-domains, adding a line for each subnet you will
allow to send mail using your smtp
server.  blank octets following a period indicate wildcards:
123.123.123.123
192.168.0.

create a file named maps, which will serve as your virtual user table
database template.  the general syntax is
SOURCE DESTINATION.  source can be a full email address (bob@domain1.com) or
a null one (@domain2.com).  null email addresses denote catch-all addresses,
so ALL mail not otherwise directed to a
specific address will go to its destination.  destinations can be usernames
or foreign email addresses:
bob@domain1.com     bob
jane@domain1.com    jane
@domain1.com           joe
dave@domain2.com    dave@aol.com
phone@domain2.com    8005551212@messaging.nextel.com

create the virtusertable database and restart sendmail, and you're off:
makemap hash virtusertable < maps
kill -HUP `cat /var/run/sendmail.pid`

----- Original Message -----
From: <mariano@insecure.com.ar>
To: <misc@openbsd.org>
Sent: Thursday, April 11, 2002 8:31 AM
Subject: popa3d


> Hi. I have popa3d running on my Open 2.9 and sendmail with auth.
> every thing is working fine with one domain, but I want to add a new
> domain, so I added the domain in relay-domains and in the DNS...
> but when I send a new mail for the new domain... the mail newer
> arrive, and every 4 hours I recibe a warning mail saying that the
> mail could not be deliverated.