View Full Version : change the save partition for new acounts
Eduard
01-17-2008, 04:55 AM
Hy,
I want to now if is posible to save the new account added with DA to another /home-directori/
ex: /home2/
If any have a sugestion, i will be happy to try`it
Eduard.
DirectAdmin Support
01-17-2008, 11:11 AM
To use /home2, first edit /etc/default/useradd
Change:
HOME=/home
to
HOME=/home2
DA does not specify the path for new homes, it's determined by the settings of the useradd program (or pw for freebsd).
This will create users in /home2.
Note that you'll need to setup quotas for the 2nd partition:
http://www.directadmin.com/features.php?id=611
John
Eduard
01-17-2008, 12:45 PM
Hello,
I want to say Thanx for support!
I fint /etc/default/useradd , now i must to test.
Againt Tnx.
Eduard.
Eduard
01-24-2008, 02:11 PM
Hy
I test this situation ( to save the new account in /home2) but i stiil have a problem with email,
When i try to send an email to my domain( it is save on /home2 partition) i have this error.
<=R=virtual_user T=virtual_localdelivery defer (13): Permission denied: cannot create /home/gazduire/imap/gazduire-siteuri.net/support/Maildir
this is the corect location /home2/gazduire/imap/gazduire-siteuri.net/support/Maildir
it must be sent to /home2/gazduire... not /home/gazduire...
If somebody have a sugestion, please let me now.
Tnx
Eduard.
nobaloney
01-28-2008, 08:09 AM
Ouch!
I wonder if using multiple home directories is incompatible with exim.conf.
Since the changes to exim.conf to support Maildir came from DA staff and not from me, I hope John will chime in on this one.
Jeff
Eduard
01-28-2008, 08:44 AM
Hy :)
I`m waiting an answer/ sugestion .
Eduard.
DirectAdmin Support
01-28-2008, 11:05 PM
If I recall correctly.. the paths in the /etc/exim.conf are just /home/$username .. instead of finding the true home directory path for that user from the /etc/passwd file (which would be a bit messy, but correct).
With Maildir/Dovecot, there would be 2 entires in the /etc/exim.conf
directory = /home/$local_part/Maildir/
directory = /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}/imap/${domain}/${local_part}/Maildir
Notice the hardcoded /home/ bit..
Basically, the /home/user part needs to be replaced with a variable.
I found this thread here:
http://www.directadmin.com/forum/showthread.php?t=18190&highlight=%2Fetc%2Fpasswd+directory
But making it work will add some overhead (I believe why it was left as-is)
Post #12 shows the long/messier correct version that does multiple "hits" on lookups files, hence the slowdown, but it's correct.
New versions:
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/"
directory = "${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}lsearch{/etc/passwd}{$value}}}}/imap/${domain}/${local_part}/Maildir"John
Eduard
01-29-2008, 05:32 AM
Hello John,
I just modify the exim.conf, it is ok now. I test this situation and same to be fine.
Again i want to tnx for your asistence.
Eduard.
nobaloney
02-08-2008, 04:35 PM
What do you think, John? Shall we add it to the final SpamBlocker3? I think maybe we should. With all the overhead of using SpamAssassin, exim filters, and the like, I don't see a problem with a bit more to support multiple home directories.
What do you think? I can do it in my final SpamBlocker3 release if you agree.
Jeff
DirectAdmin Support
02-08-2008, 06:13 PM
Yes, it's more correct this way. Removing it is a simple optimization for anyone needing every last once of performance out of their system.
John
mehrdadabed
09-01-2011, 01:41 AM
If I recall correctly.. the paths in the /etc/exim.conf are just /home/$username .. instead of finding the true home directory path for that user from the /etc/passwd file (which would be a bit messy, but correct).
With Maildir/Dovecot, there would be 2 entires in the /etc/exim.conf
directory = /home/$local_part/Maildir/
directory = /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}/imap/${domain}/${local_part}/Maildir
Notice the hardcoded /home/ bit..
Basically, the /home/user part needs to be replaced with a variable.
I found this thread here:
http://www.directadmin.com/forum/showthread.php?t=18190&highlight=%2Fetc%2Fpasswd+directory
But making it work will add some overhead (I believe why it was left as-is)
Post #12 shows the long/messier correct version that does multiple "hits" on lookups files, hence the slowdown, but it's correct.
New versions:
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/"
directory = "${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}lsearch{/etc/passwd}{$value}}}}/imap/${domain}/${local_part}/Maildir"John
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/"
directory = "${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}lsearch{/etc/passwd}{$value}}}}/imap/${domain}/${local_part}/Maildir"
should be
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/Maildir/"
directory = "${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}lsearch{/etc/passwd}{$value}}}}/imap/${domain}/${local_part}/Maildir"
nobaloney
09-01-2011, 10:28 AM
You've just posted to a thread over 3-1/2 years old. When you say should be which version of exim.conf are you using?
Jeff
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.