Qmailers: I have been reading the qmail archives and found some threads that are very close to what I want accomplish and I though I would ask the qmail list for some help me with my logic. BTW: I have read the Life with Qmail and the Big Pictures documents numerous times and could not find the answer I was looking for... I have also check the www.qmail.org site and I am probably going to head out to the local bookstore to buy the new qmail book: http://www.mcp.com/sams/detail_sams.cfm?item=0672319454 so here goes... Just to refresh everyone's memory... ---Begin FIRST THREAD--- virtual mail domains I have a box which I want to be the primary MX host for virtual mail domains. That is, none of the mail is to be delivered locally, but is to have the envelope (but not the header) address rewritten and the mail forwarded. There are three classes of forwarding that I want to do. [regexps, brackets and $n a la perl ;o)] (.*)@virtual.domain.com --> $1@xxxxxxxxxxxxxxx [ie, localparts same at both domains, so domain maps to domain] (.*)@virtual.domain.com --> user@xxxxxxxxxxxxxxx [ie, everything in that domain goes to a single address] The third type is to have a nice big set of rules for mapping localparts in the domain to soem ADDRESSLIST where ADDRESSLIST ::= localpart@xxxxxxxxxxxxxxxxxxxxxxx or ADDRESSLIST ::= ADDRESSLIST, somelocalpart@xxxxxxxxxxxxxxxxxxxxxxx If you see what I mean. and in this third type, any localpart in the virtual domain that is not explicity listed can have a default of Bouncing, or going to some ADDRESSLIST The other thing is, I may have more that one virtual domain being hosted on this box, and of course user@xxxxxx and user@xxxxxx are different, so need to be handled differently. Also, although I said above that no mail would be delivered locally, that's not strictly true. I may want one of my domains (the "real" domain) to deliver locally. How can I easily do this with qmail? ---End FIRST TRHEAD--- ---Begin RESPONSE THREAD--- virtual mail domains > (.*)@virtual.domain.com --> $1@xxxxxxxxxxxxxxx in control/virtualdomains, add virtual.domain.com:alias-virtual in ~alias/.qmail-virtual-default, put |forward "$LOCAL@xxxxxxxxxxxxxxx" > (.*)@virtual.domain.com --> user@xxxxxxxxxxxxxxx in control/virtualdomains, add virtual.domain.com:user-virtual in ~user/.qmail-virtual-default, put &user or |forward "$USER" > The third type is to have a nice big set of rules for mapping > localparts in the domain to soem ADDRESSLIST where > ADDRESSLIST ::= localpart@xxxxxxxxxxxxxxxxxxxxxxx > or > ADDRESSLIST ::= ADDRESSLIST, somelocalpart@xxxxxxxxxxxxxxxxxxxxxxx > > If you see what I mean. > > and in this third type, any localpart in the virtual domain that is > not explicity listed can have a default of Bouncing, or going to some > ADDRESSLIST Write a program to do it. Read qmail-command.0. It explains what environment variables get set. > The other thing is, I may have more that one virtual domain being hosted on > this box, and of course user@xxxxxx and user@xxxxxx are different, so > need to be handled differently. Not a problem. ---End RESPONSE THREAD--- Now, my situation is very similar. I have a box that is going to act as a high speed mail relay for several virtual domains with NONE of the email coming in to be stored locally. I have taken some virtualusers tables from the previously used sendmail and created a cdb database with newaliases from fastforward. I would like to stay away from making a large number of .qmail-virtualdomain-default files... I have some lines in the file which look like: @somemail.com %1~[EMAIL PROTECTED] newaliases creates the cdb file without any problems. So when I go to test it with the fastforward command: env DEFAULT=george HOST=somemail.com /var/qmail/bin/fastforward -nd /etc/aliases.cdb from <original envelope sender> to <%1~[EMAIL PROTECTED]> The thing that I cannot figure out is why I am getting the %1 instead of having it resolved to: george~[EMAIL PROTECTED] My /var/qmail/alias/.qmail-defautl contains: | /var/qmail/bin/fastforward -d /etc/aliases.cdb I guess my question is do I need to put some other variable into .qmail-default so that %1 gets changed to george (or some other random user name), or do I even need to change the %1 to something else like $DEFAULT or something... Wow... I know this was long, but I guess I am at a loss... Thanks. -- Specializing in computer and network consulting... Timothy Lorenc USmail: Lorenc Advantage, Inc. Consultant/President 6732 E. State Blvd. PMB 304 Email: [EMAIL PROTECTED] Fort Wayne, IN 46815-7762
