[Dovecot] adding new user to dovecot

wouter at pair.com wouter at pair.com
Sun Apr 18 21:01:10 EEST 2004


On Sun, 18 Apr 2004, Kartik Vaidyanathan wrote:

> [...]
> a. What do you mean by virtual users.

The mail accounts are not unix accounts. All email accounts are in a
database (sql, ldap, text file, whatever), but these users do not have
access to the unix system. Usually, all mailboxes are owned by the mailer
daemon or whatever does the distribution. Check the Dovecot wiki.

This is the most likely way big companies do things (you asked about
yahoo). Obviously, yahoo would not like its free webmail users to log in
on their unix machines. So they just have a lot of mailboxes owned by the
email software they use, and the webmail software takes care that any user
can only read their own mailbox.

This is nothing to do with unix permissions or users anymore - you create
your own definition of what 'user' is and what they can do.

> b. How does one link them to a mailbox.
>

You just let the mail software deliver it to a mailbox owned by the user
needed to check the email.

E.g., your webserver runs as user 'www' - so you deliver all mail to a
mailbox with the username it was sent to, but owned by that user 'www'.
Hence, checking email through a web interface will work, as the user 'www'
-the user of the webserver- will own and thus have access to all of these
mailboxes. You have to be *very* careful to ensure that the users of your
webmail system can't read other mailboxes, ofcourse.

> Very frankly i am confused...
>

A unix user has nothing to do with a user from a webmail system or virtual
email system.

Ofcourse, you can make your own abstraction of what a user is, ignoring
any unix background (users, permissions, etc), as long as the software can
read and possibly write to the proper files.

> 1.Well lets say i have a user who wants to create a new group say
> GROUP1.Lets say i have users who want to create GROUP1 at pigeonhole.com or
> GROUP2 at pigeonhole.com .This group name will be entered in my JSP page,
> now what do i have to do to create the group.
>

There are several ways to do it. You could add a user 'group1' and add all
email addresses that subscribe to a file called 'group1.users'. Then you
have to get the email to 'group1' either passed on to your software which
then sends out an email for the people in your 'group1.users' database, or
find the MTA specific way of forwarding to all the users in this
'group1.users' file (with other words, you take care yourself of sending
the email on to all the people in your list, or you find out how you can
use any specific mailer daemon functionality that can expand an address to
many addresses like sendmail's 'include').

> 2.How do i see to that anyone who sends a mail to GROUP2 at pigeonhole
> receives it in it mailbox( Firstly does the group have a mails box in
> the groups name).Will one create a account(mailbox) for the group or how
> is it done.
>

You either create a virtual user (check the dovecot website, especially
the wiki, it has several pages on this) - that is a 'user' that has
nothing to do with the unix concept of 'user', but is your own abstraction
in a database - and you set up the mail system to get its addresses from
this database

-or-

you create a real unix user 'group1'.

This user will receive all email in the mailbox specified by the MTA
software.

Then, you need to find a way to either duplicate the email FROM THE
MAILER SOFTWARE, pass it on to your program which then sends it on to
everybody on your list; or you can find a way to use alias expansion
functionality in the MAILER SOFTWARE, which will then replace 'group1' by
all the users in your 'group1.users' database/file.

I'm not a java expert, but I guess this part of the software will probably
need to be written in a more unix-y language (c, c++, perl, python, etc).

> 3.Lastly I actually want to create a mailing List manager.
>

It's not hard to create a program (java, if you want) that just adds email
addresses to a file or database, and allows to remove these addresses.
That's pretty much all the mailinglist manager does, basically.

But you need something that accepts emails from the unix mail daemon, and
then expands this file/database and sends on the email to all the people.
Or can make use of forwarding functionality present in mailing software.

All of this has nothing to do with Dovecot or IMAP. If you provide a
webmail interface like yahoo, I don't think you even need any IMAP server.

> Please advice on how to go about it.
>

I suggest you check out GNU Mailman, Majordomo and other free mailinglist
software. They have extensive information on how to plug your database or
program in the mailing daemon.

It probably is a better idea to install one of these mailinglist managers,
and then create a java (that's what you wanted, wasn't it) frontend to the
database of subscribed people. Otherwise, you will still have a lot of
learning about unix backend to do... ;)

May I point out this is very irrelevant to the Dovecot mailinglist, you
might find more useful help on lists about mailinglist software or even
MTA's like postfix, sendmail, exim, etc. Dovecot is only a pop/imap
server, and has no connection with what you want to do (except, maybe,
after you set all the other things up and want to provide IMAP access).

Regards,

  Wouter



More information about the dovecot mailing list