[Dovecot] lda and home directory
Hello,
I am using qmail and lda configured such that lda should not have to do a lookup for delivery. I set my defaultdelivery like so:
|HOME=/home/mail/$USER /var/qmail/bin/preline -f /usr/local/libexec/dovecot/dovecot-lda
Given that the email address being delivered to is bob.miller@computerisms.com, I expect $USER to be equal to bob.miller and $HOME to expand to /home/mail/bob.miller/.
The problem is lda reports:
Debug:_Home_dir_not_found:_/home/mail/bob.miller@computerisms.com/
The whole system up to here uses only the bob.miller part, and I can't find where it keeps adding the domain part from.
I have tried changing all sorts of variables and config values to try and make it quit adding the domain part, but no matter what I change lda still tries to deliver the email address as username. The only measure of success I can report is that in some configurations mail delivers to /home/mail//.
Where exactly is dovecot getting this value?
Side question: I note in places throughout the wiki and internet variables such as $EXT, $USER, $DEST_USERNAME, and $FROM_ENVELOPE are used. I can find no documentation, beyond my own common sense anyway, to explain how/when these variables are expanded, and what I do find doesn't seem consistent to me. For example, on the CheckPassword page, $USER is implied to expand to Username, which could contain the domain or not. However on the lda/qmail page, the variable shown is $EXT@ $USER, which implies $USER will expand as only the domain part after the @ symbol and $EXT as everything before, yet changing the variable from $USER to $EXT in my defaultdelivery file has $HOME expand to /home/mail//. Where do I find the story on how these variables (as opposed to the % variables) work? (or more specifically, is there a $VAR I can use instead of $USER that will expand to just the part before the @?)
--
Computerisms
Bob Miller
867-334-7117 / 867-633-3760
http://computerisms.ca
Quoting Bob Miller bob@computerisms.ca:
Hello,
I am using qmail and lda configured such that lda should not have to do a lookup for delivery. I set my defaultdelivery like so:
|HOME=/home/mail/$USER /var/qmail/bin/preline -f /usr/local/libexec/dovecot/dovecot-lda
Given that the email address being delivered to is bob.miller@computerisms.com, I expect $USER to be equal to bob.miller and $HOME to expand to /home/mail/bob.miller/.
The problem is lda reports:
Debug:_Home_dir_not_found:_/home/mail/bob.miller@computerisms.com/
The whole system up to here uses only the bob.miller part, and I can't find where it keeps adding the domain part from.
I have tried changing all sorts of variables and config values to try and make it quit adding the domain part, but no matter what I change lda still tries to deliver the email address as username. The only measure of success I can report is that in some configurations mail delivers to /home/mail//.
Where exactly is dovecot getting this value?
Side question: I note in places throughout the wiki and internet variables such as $EXT, $USER, $DEST_USERNAME, and $FROM_ENVELOPE are used. I can find no documentation, beyond my own common sense anyway, to explain how/when these variables are expanded, and what I do find doesn't seem consistent to me. For example, on the CheckPassword page, $USER is implied to expand to Username, which could contain the domain or not. However on the lda/qmail page, the variable shown is $EXT@ $USER, which implies $USER will expand as only the domain part after the @ symbol and $EXT as everything before, yet changing the variable from $USER to $EXT in my defaultdelivery file has $HOME expand to /home/mail//. Where do I find the story on how these variables (as opposed to the % variables) work? (or more specifically, is there a $VAR I can use instead of $USER that will expand to just the part before the @?)
-- Computerisms Bob Miller 867-334-7117 / 867-633-3760http://computerisms.ca
Hi Bob,
I had/have the same issue. In Dovecot 1.x I was able to use LDA with vpopmail and only environment variables to deliver to a home directory. I was never able to get it to work with Dovecot 2.x - don't know if using environment variables is depricated, but I ended up having to setup an auth server to use lda with qmail/vpopmail. :(
For your environment variable questions, those come from Qmail. See: http://www.lifewithqmail.org/lwq.html#environment-variables
Rick
Hi Rick,
I had/have the same issue. In Dovecot 1.x I was able to use LDA with vpopmail and only environment variables to deliver to a home directory. I was never able to get it to work with Dovecot 2.x - don't know if using environment variables is depricated, but I ended up having to setup an auth server to use lda with qmail/vpopmail. :(
My hosting server uses vpopmail and lda, and I don't recall having to do that. If you want to compare configs, let me know.
In this case, I authenticate against samba active directory, and a (seemingly) small config change there led me on an epic quest of configuration updates through the whole email system until I got stuck in this lda box that didn't even have a problem in it. sigh. I was doing so well....
But you showed me the outside of the box:
For your environment variable questions, those come from Qmail. See: http://www.lifewithqmail.org/lwq.html#environment-variables
It's stunningly obvious now that you point it out. Soooo obvious, in fact, I probably would have been weeks figuring it out. Thank you so much...
change my defaultdelivery to:
|HOME=/home/mail/$LOCAL /var/qmail/bin/preline -f /usr/local/libexec/dovecot/dovecot-lda
and lda looks for the correct directory again.
I guess environment variables are not deprecated, presumably that's good news?
participants (2)
-
Bob Miller
-
Rick Romero