• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

setup a mail account without...


i had setup www.abc.com, and for mail anything@abc.com goes to owner abc.

but now, i would like to add john@abc.com for a separate user 'john' thats mean john has his own mail box.

beside add new 'john' account to my server before setting the john@abc.com ,

is there any other way to do it?

  • 6
  • 4
1 Solution
bsherAuthor Commented:
Adjusted points to 25
This depends on your mail server.
Is this  UNIX box, completely under your control.
Or is this a box/shares server at some ISP.

If your site is hosted at an ISP, you will have to
inquire with them as all of them have their own set of tools to do so.

If you have a UNIX box under your control,
I could help you out.
bsherAuthor Commented:
the mail server i under my control, so ....
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

is it a standard sendmail.. is it a UNIX/Linux System?
What is the version of Sendmail?
bsherAuthor Commented:
sendmail version 8.8.7
the 'in the guts' method, that will always work, is to edit the sendmail.cf file, and add specific rules that say what to do with mail to a particular user or domain.


adding rules in ruleset 98 is a good start, and a rule like

R foouser < @ $* foodomain.com. >     $#local $: baruser
R blockeduser < @ $* foodomain.com. >        $#error $@ 5.7.1 $: "blocked address -  mail denied."
R $+ < @ $* foodomain.com. > $#local $: catchall

these three rules specify how to handle mail for foodomain. (make sure you specify foodomain as a local host either by adding it to Cw near the top of the sendmail.cf, or by putting it in the sendmail.cw if you're using one)

the first rule specifies that mail to foouser@foodomain get sent locally to baruser.
the second rule says mail to blockeduser gets bounced with an error message.
the third says anything else sent to foodomain.com ends up in the local user 'catchalll' 's box.

this, and the o'reilly sendamil boox should get you on your way.

BTW, this is not the most simple way to do this. one can user virtuser tables, domain maps, and any number of other ways to accomplish the same thing. but this way _does_ work. wear it in good health.

bsherAuthor Commented:
what i want is create a mail account for a user called john@abc.com without creat a unix account for him?

Is this the way?

I m not very familiar with sendmail

Thanx for help
The question now is how is that user going to access his email.   If you plan to forward that email
somewhere else, you can just use aliases to direct the mail. But if you want someone to access the mail
locally, it will be much easy to creat a local user id.

So. Will this person access the mail from the local machine?  if so creat a local user account.

If not.. you can forward the emails for that person
to a remote system using aliase forwarding.
bsherAuthor Commented:
yes he will access locally....

so i need to create a account for him..

By the way, how to disable ftp and telnet for that account, since i only want him to access mail only?
Disable ftp and telnet for the account.

Easiest thing to do is assign an invalid shell. to that user:

in /etc/passwd file
assign the shell as /nosuchshell /nobin/restricteduser
for that user.

Shell is the last field in the password entry
for example /bin/sh /bin/csh ( bash tcsh ksh etc.. )
this will prevent user from doing ftp and

bsherAuthor Commented:
if i would like to forward, what r the steps i need to do

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now