|
Re: Feature Request (Source included): MySQL result inside of maildroprc: msg#00034mail.maildrop
On Mon, Jan 19, 2004 at 02:09:56PM -0800, Serge Stepanov wrote: > Good day fellow maildrop users! > > I was coming up at the final stop on my path to a perfect installation of > Postfix + Courier + SASL + MySQL + SpamAssassin w/ Maildrop and realized > that the way to setup maildrop described in major HOWTOs was not the most > optimal solution. > > What I wanted to do is this: > Retrieve homedir and maildir information from a MySQL table based on the > email address and deliver to the user's mailbox > (/home/vmail/domain.tld/user/Maildir/) all through one file, > /etc/maildroprc. The only thing preventing me from doing this was that I > had no way to (or at least wasn't aware of any way) to access the variables > returned from the MySQL query in my maildroprc file. [SNIP] > For those wondering, here is how it comes together in my maildroprc file: > [SNIP] > if (/^X-Spam-Flag: *YES/) > { > exception { > to "$HOME/$MAILDIR/.Spam/" > } > } [SNIP] I'm not really seeing the benefit here. You always seem to be using "$HOME/$MAILDIR". Why couldn't you just use "$DEFAULT" instead? >From my understanding, $DEFAULT gets set to the value of the field specified by "maildir_field" in your maildropmysql.config file. You have two choices on how to set this up in MySQL. You could either stuff the "maildir_field" with a relative path (such as "Maildir") and since maildrop changes to your $HOME directory upon execution, then $DEFAULT == $HOME/$DEFAULT However, if you stuff the "maildir_field" with an absolute directory (such as /var/spool/mail/user) then $DEFAULT != $HOME/$DEFAULT. Checking with the source, I see that what you have done is provide a MAILDIR variable which contains the same information as that contained by the DEFAULT variable except that your patch does not check to see if the "maildir_field" had a value configured. In short, looking at what you've done, what you are looking for is already available through the $DEFAULT variable. Of course, I reserve the right to admit that I could be wrong here. If anyone can point out any errors in this, please do so. -- Devin ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Duplicate mail receive: 00034, Anthony |
|---|---|
| Next by Date: | Using courier-maildrop as delivery agent for a virtual domain in postfix: 00034, Sudhakar Chandra |
| Previous by Thread: | Feature Request (Source included): MySQL result inside of maildroprci: 00034, Serge Stepanov |
| Next by Thread: | Duplicate mail receive: 00034, Anthony |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |