change the save partition for new acounts

Eduard

Verified User
Joined
Nov 24, 2007
Messages
37
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.
 
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
 
Hello,

I want to say Thanx for support!

I fint /etc/default/useradd , now i must to test.

Againt Tnx.

Eduard.
 
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.

HTML:
<=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.
 
Last edited:
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
 
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
Code:
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=/etc/passwd+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:
Code:
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
 
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.
 
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
 
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
 
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
Code:
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=/etc/passwd+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:
Code:
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



Code:
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

Code:
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"
 
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
 
Back
Top