On Thu, 13 Nov 2008 00:15:07 +0800 (CST) Stephen Liu <[EMAIL PROTECTED]> wrote:
> I have the database maildb created Do you really need to use a database? It would be much easier if you could use a text file to list domains and users. Once it's works, you can still switch to using a database. > I have run following commands previously to create the 1st domain on > this box:- > > mysql> INSERT INTO aliases (mail,destination) VALUES > -> ('@satimis.com.tld','[EMAIL PROTECTED]'), > -> ('[EMAIL PROTECTED]','[EMAIL PROTECTED]'), > -> ('[EMAIL PROTECTED]','[EMAIL PROTECTED]'); > Query OK, 3 rows affected (0.00 sec) > Records: 3 Duplicates: 0 Warnings: 0 That seems to have created a virtual domain satimis.com.tld, with the users postmaster and abuse and, respectively, these being aliases of postmaster and abuse at satimis.com. I don't think that "tld" is a valid top level domain. Do you somehow have MX entries for that domain? > To add the first new user to the system > > mysql> INSERT INTO users (id,name,maildir,clear) VALUES > -> ('[EMAIL PROTECTED]','Stephen','Stephen/','x05satimis'); > Query OK, 1 row affected (0.00 sec) > > mysql> INSERT INTO aliases (mail,destination) VALUES > -> ('[EMAIL PROTECTED]','[EMAIL PROTECTED]'); > Query OK, 1 row affected (0.00 sec) > > > But I can't find the folder 'Stephen/' Yeah, that is confusing because of the database overhead. You need to know what all of this actually means. > I don't know why? Me neither --- I'm somewhat unhappy with the postfix documentation I found (http://www.postfix.org/postconf.5.html#virtual_mailbox_domains). It creates some confusion about what an option like virtual_mailbox_domains actually is. It would expect it takes some type of lookup, but the documentation doesn't say, other than "This parameter expects the same syntax as the mydestination configuration parameter." It also says the default for virtual_mailbox_domains is $virtual_mailbox_maps, but virtual_mailbox_maps apparently requires some type of lookup and cannot be a list separated by whitespace or commas. Further, virtual_mailbox_maps is always optional, which means that virtual_mailbox_domains eventually has a default or not, which I think is bad design. Then, the only purpose of virtual_mailbox_maps seems to be to be able to specify a path for each users mailbox. It's sort of a backwards version of virtual_mailbox_domains. Do you actually need both? The documentation says: "The SMTP server validates recipient addresses with $virtual_mailbox_maps and rejects mail for non-existent recipients." That would mean that $virtual_mailbox_maps is not optional. For virtual_mailbox_maps, it says: "In a lookup table, specify a left-hand side of "@domain.tld" to match any user in the specified domain that does not have a specific "[EMAIL PROTECTED]" entry." What is that supposed to mean? Does "not have a specific "[EMAIL PROTECTED]" entry" where? What do they mean with "left-hand side of "@domain.tld"? The local part, I guess. But what else do you specify in the table? Anyway, I wouldn't use both virtual_mailbox_maps and virtual_mailbox_domains, but only virtual_mailbox_maps. If you use both, you will run into troubles with maintaining consistency once you got a few domains and a few users in these lists. > Besides I haven't figured out how to edit main.cf directing the > incoming mails to their respective folders. Advice would be > appreciated. TIA It seems that should be specified in virtual_mailbox_maps. But I wonder how postfix deals with the different data formats of virtual_mailbox_maps and virtual_mailbox_domains when virtual_mailbox_domains defaults to virtual_mailbox_maps ... > No, I don't have large number of domains/users. This is only a test. > I'm trying to learn how to make it through test. Oh, ok. Keep it as simple as possible then, you can make it as complicated as you want any time later :) That's one of the things I like about mail servers: It's basically very simple, but it can be extremely complicated at the same time. Unless it's only for testing, the simpler you can keep it, the better the setup is. > How to make it? Thanks Since you want to make it all virtual, make it all virtual :) > > But the recipient address <[EMAIL PROTECTED]> is graylisted for > > some > > reason. And afair, 450 is a temporary error, telling the sending MTA > > to > > try again later because it is to be expected that the problem will > > be solved and the mail can be accepted later, see the RFC. You need > > to find out why this message has been delivered though it > > shouldn't, and weather 450 is the right response or not: If you > > always don't want to accept incoming mail to greylisted addresses, > > the response should be 550. > > > But this only happened once. That means that it can happen again. You always need to know what's going on on your servers so that you can decide if something needs to be done about it, especially if it's something unusual. Once I had Exim relay mail for an exchange server, and I noticed that they were relaying quite a number of mails to a particular domain. Since I had precautions in place that would prevent my server from being flooded, and since they were supposed to relay mail, there was nothing to worry about. The next day I got a call from the recipient --- they were telling me they had to summon their administrator in the middle of the night because their exchange server had been flooded with about 50000 mails and went down under the load, and their administrator had to spend the rest of the night and a day to delete all the mails and get it working again. I told them that I had seen some mails being relayed and that my server worked just fine and that they needed to talk to the people sending all the mails. Not my problem, but if I hadn't known what's going on, it wouldn't have been so funny --- and watching what was going on had been what had lead me to take precautions against flooding quite some time before. I still don't know how a mail server can break down under only 50000 mails recieved over about 14 hours, that's not a great load ... but exchange is groupware, I guess. > > To be curious, what happens when a mail is detected to be SPAM or to > > contain a virus? Exim can have mails scanned before accepting them; > > does > > postfix the same? > > > I don't know. I'm learning. Try it out --- you need to know what happens ... :) > Yahoo. On clicking the URL on browser it is directed to; > > http://postgrey.schweikert.ch/ Yeah --- so the postgrey on your server doesn't work right? > > > Now how can I make the 1st incoming mail creating subdirectoris > > /cur > > > /new etc automatically. TIA > > > > You need to configure postfix to use maildir instead of (I think) > > mbox. > > > But this arrangement is NOT for virtual domain. But the documentation says it is: "The virtual(8) delivery agent uses this table to look up the per-recipient mailbox or maildir pathname. If the lookup result ends in a slash ("/"), maildir-style delivery is carried out, otherwise the path is assumed to specify a UNIX-style mailbox file." > > ? Is that a directory in which the mail is delivered that goes to > > virtual domains? > > > No. All incoming mails are added on /var/spoon/mail/satimis file. That would indicate that no mail is delivered to virtual domains. It's probably because mydestinations takes precedence over what is specified in virtual_mailbox_maps. The documentation warns against specifying virtual domains there --- maybe the behavior for this is undefined? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]