An HTML attachment was scrubbed... URL: <http://dovecot.org/pipermail/dovecot/attachments/20040415/6df3374c/attachment-0002.html> -------------- next part -------------- Hi, This is from your documentation Creating new users ------------------ Dovecot is interested in only one thing - being able to find the user's mail directory. With maildir you need to do mkdir ~user/Maildir, with mbox mkdir ~user/mail. what does ~ refer to. Pardon my ignorance in unix, i am relatively new to unix. Does not ~ refer to the user account in which you have logged in. So does that mean that maildir folder exist for only user accounts that already exist.My intention for asking the above is that i have a java program running, that will take a new users name and password, so with that can i create a mailbox for that person , or does the admin have to create an user account for that person , so that his maildir folder can be created. Please clarify my understanding of how it workds.. Thanks
On Thu, 2004-04-15 at 09:15, Kartik Vaidyanathan wrote:> Dovecot is interested in only one thing - being able to find the user's > mail directory. With maildir you need to do mkdir ~user/Maildir, with mbox mkdir ~user/mail. > > what does ~ refer to. > Pardon my ignorance in unix, i am relatively new to unix.You have to understand that the "magic" here is not "~", but "~user", and conventionally "~user" refers to the $HOME directory for "user". Of course, what dovecot really looks for can be specified in its configuration file (so you can also use ~user/.invisimail) or whatever. IIRC it is not specified as "~" or "~user" in the config file, but "$user" or so. johannes
"Normally" you would have one system user account for each mail user. The mail user would be the system account. Therefore, you would create a user kartik (any other name is fine too). The mails would be stored in the home directory of this user (normally, this would be /home/kartik). This is all configurable... As Johannes already pointed out, ~ is a synonym for the home directory of the current user in a shell. If you, as user kartik, type: kartik> echo ~ you get the answer /home/kartik which is the home directory of user kartik. You can use ~kartik or ~root or anything else and this always resolves to the home directory of the specified user. Maybe you should tell us what you would like to do. Operating system, number of users, existing solution... Sven
An HTML attachment was scrubbed... URL: <http://dovecot.org/pipermail/dovecot/attachments/20040416/699668e2/attachment-0003.html> -------------- next part -------------- Hi, Thanks a lot?for the mails.Well one major doubt that was prevailing was that do i need to create a system account for each person in order to send/receive mails, and from both(Sven Kirmess & Johannes Berg ) your mails i gather it is a must. But Is there a workaround to this? I have actually configured dovecot because i required a mail server in order to build a mailing list manager.A mail list manager is something in the likes of yahoogroups, where each group in my case must have a mailbox. 1. I am using Debian OS. The software that i am creating , which is going developed in JSP, will take a new users name and password and create a account for him by executing a shell script in my linux machine.I assume yahoo also does something similar to this to create new mail boxes for any new user.Please correct me if i am wrong. In fact this very mail that i have received from you is because i have subscribed to the dovecott mailing list. How do you think dovecott has been able to accomplish this. Is it not because that dovecott has a mailbox in the group name "dovecott" in some system, that internally does the sending of mails to all those in the groups refering to some database. 2.Will the mail server support me in anyway by giving me some functionality to add users, thereby creating maildir's (imap) for the users. 3.Dont I need to know the admin login and passwd, to create users? 3.Lastly i know this is not that prevalent a question -> I was told mail man does a similar job as to what my software will do.Do you know how mailman works (or even yahoogroups)?. Please enlighten me on the above issues. Thanks a lot for you time. Regards Kartik
Kartik Vaidyanathan wrote:> Well one major doubt that was prevailing was that do> i need to create a system account for each person in > order to send/receive mails, and from both > (Sven Kirmess & Johannes Berg ) your mails i gather > it is a must. That's not correct. Take a look at http://wiki.dovecot.org/. They have an example with "Virtual user support with OpenLDAP" and "Virtual user support with PostgreSQL". You either use LDAP or a PostgreSQL database to store the mail users. The mail can then be stored in any directory.> The software that i am creating , which is going developed > in JSP, will take a new users name and password and create > a account for him by executing a shell script in my linux machine.Should be possible. You have to create the account in SQL or LDAP with that script... > I assume yahoo also does something similar to this to > create new mail boxes for any new user. You use the mailbox for the mailing list archive?> In fact this very mail that i have received from you is > because i have subscribed to the dovecott mailing list. > How do you think dovecott has been able to accomplish this.That's done by the mail delivery agent (sendmail, postfix). If you just have to send a mail to each recepient you do not need an IMAP server.> 2.Will the mail server support me in anyway by giving me some> functionality to add users, thereby creating maildir's > (imap) for the users. No. You have to add the user to the database (LDAP, SQL or /etc/passwd) and create the directory yourself.> 3.Dont I need to know the admin login and passwd, to> create users? Yes and no. You need either the root account to create an entry in /etc/passwd or a user which is able to write to SQL or LDAP. Depending on which database you use.> 3.Lastly i know this is not that prevalent a question ->> I was told mail man does a similar job as to what my > software will do. Do you know how mailman works (or even yahoogroups)?. You probably should ask in as mailman group. They might know better. I will explain how majordomo does this. Majordomo is abother mailing list software (Probably not the best one, but the one I know). In the /etc/aliases file (which belongs to sendmail, postfix or whatever is your MDA. This files does _not_ belong to dovecot.) there is an entry like this: dovecot: :include:/usr/local/majordomo/lists/dovecot Then, the file /usr/local/majordomo/lists/dovecot contains a list of all the persons subscribed to this mailing list. One email address per line. The MDA does send each mail sent to dovecot individually to each entry in the /usr/local/majordomo/lists/dovecot file. The mailing list software does now manage the /usr/local/majordomo/lists/dovecot (adding and removing users). To create a new list, you have to add an entry to /etc/aliases. Please let me know if the answer does not match to your question. ;-) Sven
On Fri, 16 Apr 2004, Kartik Vaidyanathan wrote:> Hi, > > I have actually configured dovecot because i required a mail server in > order to build a mailing list manager.A mail list manager is something > in the likes of yahoogroups, where each group in my case must have a > mailbox. >You need a MTA, such as postfix, qmail, sendmail, exim, etc. It's more important than an imap server for what you want to do. Actually, I don't really understand why you need an imap server when making a mailinglist manager.> 1. I am using Debian OS. > The software that i am creating , which is going developed in JSP, will > take a new users name and password and create a account for him by > executing a shell script in my linux machine.I assume yahoo also does > something similar to this to create new mail boxes for any new > user.Please correct me if i am wrong. >I don't know, I don't work at yahoo. But I think they create virtual users in database systems for email, I can't imagine all of the users they have are in one passwd file on one tiny machine.> In fact this very mail that i have received from you is because i have > subscribed to the dovecott mailing list. How do you think dovecott has > been able to accomplish this. Is it not because that dovecott has a > mailbox in the group name "dovecott" in some system, that internally > does the sending of mails to all those in the groups refering to some > database. >Dovecot doesn't have anything to do with that. It's mostly the MTA, aided by the mailing list manager. Here's how majordomo (popular mailinglist manager) works: Bob wants to subscribe to the pigeonhole mailinglist. He emails or enters his email address in a web form so it ends up in a database file with all the other users on that list. The mailinglist manager's job is to take care of adding (or removing) email addresses to (from) that file; it adds Bob's address. When an email is sent to pigeonhole at pigeonhole.org, the mailer daemon (MTA) receives this email, and instead of delivering it to a local user, either it (1) delivers it to a pipe - it passes the email to the mailinglist software, which then just generates an email that replaces the original destination with the list of email addresses; or (2) the mailer daemon itself forwards the email by alias expansion to the list of email addresses the mailinglist software made. In the former case, the mailinglist manager reads the original message and replaces the address with all those in the list's database; in the latter case, basically the only thing a mailinglist manager does, is taking care of an error-free database file with email addresses so the MTA can forward the email to the addresses in this file. Because Bob's email address is in this file, his address will be inserted in the headers of the message, and he will receive the email.> 2.Will the mail server support me in anyway by giving me some > functionality to add users, thereby creating maildir's (imap) for the > users. >No, adding users is not the job of a mail server daemon. Or of an imap server. Usually, you don't allow people to add users to your system, for obvious reasons. If you want to add users to a mailing list, you don't need accounts for those users, only when you also want to provide them with an email address. What do you want to do: provide email addresses, or a mailinglist manager?> 3.Dont I need to know the admin login and passwd, to create users? >Yes, ofcourse. Unless your users are in a database server, in that case you need the ability to add records to that database. (Shared webhosting accounts usually allow adding virtual users, if that's the reasoning behind your question.)> 3.Lastly i know this is not that prevalent a question -> I was told mail > man does a similar job as to what my software will do.Do you know how > mailman works (or even yahoogroups)?. >Not precisely, but pretty much like I said above. You can check out the documentation and source code of said software. Yahoogroups probably uses custom written software, but still based on the simple approach of a mailinglist manager taking care of a list of subscribers, and the mailer daemon either itself or by aid of an external program multiplicating the recipients. A mailinglist manager has nothing to do with Dovecot. Dovecot has nothing to do with *sending* email, only with retrieving it from a system with IMAP of POP. It's the end-of-the-line for emails, delivery to final destination; it does not forward or duplicate.> Please enlighten me on the above issues. > Thanks a lot for you time. >I'll send you the bill later. ;)> Regards > Kartik > > > >
An HTML attachment was scrubbed... URL: <http://dovecot.org/pipermail/dovecot/attachments/20040418/bb63344a/attachment-0002.html> -------------- next part -------------- Hi, Your mail was very insightful. You have stated in you mail as follows .. "But I think they create virtual users in database systems for email, I can't imagine all of the users they have are in one passwd file on one tiny machine." a. What do you mean by virtual users. b. How does one link them to a mailbox. Very frankly i am confused... 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. 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. 3.Lastly I actually want to create a mailing List manager. Please advice on how to go about it. Regards Kartik On Sun, 18 Apr 2004 Wouter Van Hemel wrote :>On Fri, 16 Apr 2004, Kartik Vaidyanathan wrote: > > > Hi, > > > > I have actually configured dovecot because i required a mail server in > > order to build a mailing list manager.A mail list manager is something > > in the likes of yahoogroups, where each group in my case must have a > > mailbox. > > > >You need a MTA, such as postfix, qmail, sendmail, exim, etc. It's more >important than an imap server for what you want to do. > >Actually, I don't really understand why you need an imap server when >making a mailinglist manager. > > > 1. I am using Debian OS. > > The software that i am creating , which is going developed in JSP, will > > take a new users name and password and create a account for him by > > executing a shell script in my linux machine.I assume yahoo also does > > something similar to this to create new mail boxes for any new > > user.Please correct me if i am wrong. > > > >I don't know, I don't work at yahoo. But I think they create virtual users >in database systems for email, I can't imagine all of the users they have >are in one passwd file on one tiny machine. > > > In fact this very mail that i have received from you is because i have > > subscribed to the dovecott mailing list. How do you think dovecott has > > been able to accomplish this. Is it not because that dovecott has a > > mailbox in the group name "dovecott" in some system, that internally > > does the sending of mails to all those in the groups refering to some > > database. > > > >Dovecot doesn't have anything to do with that. It's mostly the MTA, aided >by the mailing list manager. > >Here's how majordomo (popular mailinglist manager) works: > >Bob wants to subscribe to the pigeonhole mailinglist. He emails or enters >his email address in a web form so it ends up in a database file with all >the other users on that list. The mailinglist manager's job is to take >care of adding (or removing) email addresses to (from) that file; it adds >Bob's address. > >When an email is sent to pigeonhole at pigeonhole.org, the mailer daemon >(MTA) receives this email, and instead of delivering it to a local user, >either it (1) delivers it to a pipe - it passes the email to the >mailinglist software, which then just generates an email that replaces the >original destination with the list of email addresses; or (2) the mailer >daemon itself forwards the email by alias expansion to the list of email >addresses the mailinglist software made. > >In the former case, the mailinglist manager reads the original message and >replaces the address with all those in the list's database; in the latter >case, basically the only thing a mailinglist manager does, is taking care >of an error-free database file with email addresses so the MTA can forward >the email to the addresses in this file. > >Because Bob's email address is in this file, his address will be inserted >in the headers of the message, and he will receive the email. > > > 2.Will the mail server support me in anyway by giving me some > > functionality to add users, thereby creating maildir's (imap) for the > > users. > > > >No, adding users is not the job of a mail server daemon. Or of an imap >server. Usually, you don't allow people to add users to your system, for >obvious reasons. > >If you want to add users to a mailing list, you don't need accounts for >those users, only when you also want to provide them with an email address. > >What do you want to do: provide email addresses, or a mailinglist manager? > > > 3.Dont I need to know the admin login and passwd, to create users? > > > >Yes, ofcourse. Unless your users are in a database server, in that case >you need the ability to add records to that database. > >(Shared webhosting accounts usually allow adding virtual users, if that's >the reasoning behind your question.) > > > 3.Lastly i know this is not that prevalent a question -> I was told mail > > man does a similar job as to what my software will do.Do you know how > > mailman works (or even yahoogroups)?. > > > >Not precisely, but pretty much like I said above. You can check out the >documentation and source code of said software. > >Yahoogroups probably uses custom written software, but still based on the >simple approach of a mailinglist manager taking care of a list of >subscribers, and the mailer daemon either itself or by aid of an external >program multiplicating the recipients. > > >A mailinglist manager has nothing to do with Dovecot. Dovecot has nothing >to do with *sending* email, only with retrieving it from a system with >IMAP of POP. It's the end-of-the-line for emails, delivery to final >destination; it does not forward or duplicate. > > > Please enlighten me on the above issues. > > Thanks a lot for you time. > > > >I'll send you the bill later. ;) > > > Regards > > Kartik > > > > > > > > >
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