Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

User's Maildir in dir other than $HOME

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


up at 3

Aug 6, 2009, 11:30 AM

Post #1 of 5 (1699 views)
Permalink
User's Maildir in dir other than $HOME

I am integrating 3 existing servers into one, which raises a conflict of
sorts. Most users currently get their mail delivered to
/home/$USER/Maildir. The only exceptions are the vpopmail users, which
aren't system users at all, obviously.

However, many of the system users also have virtual web hosts that are
kept under /home/servers/theirdomain. For ftp login and proftp "chroot"
purposes, it is desirable to have that path as their $HOME. Of course,
this breaks qmail's deliver, and sicne many of these users have no login
shell, it's not something you can fix in their envs shell profiles.

In addition, I'd prefer if .qmail files were not in the virtual web host
directory $HOME. In a nutshell, joeuser has:

/web/servers/joeswebsite.com This would be their ftp chroot $HOME.

/home/users/joeuser This would be where their Maildir and .qmail
files are located.

/home/vpopmail/domains/vpopdomains These domains cannot be affected
by any changes.


I would think that perhaps /var/qmail/boot/home or maildir would be the
way to implement this, but am not clear exactly which files to edit and if
that's the best way, or if having both vpopmail and "regular" virtual
domains makes this unfeasible. If worse comes to worse, I will just let
virtual web host customers deal with Maildirs and .qmail files in their
$HOME.

James Smallacombe PlantageNet, Inc. CEO and Janitor
up [at] 3 http://3.am
=========================================================================


net-ezmlist at jmatt

Aug 6, 2009, 11:43 AM

Post #2 of 5 (1576 views)
Permalink
Re: User's Maildir in dir other than $HOME [In reply to]

At 2:30 PM 8/6/09, up [at] 3 wrote:
>In addition, I'd prefer if .qmail files were not in the virtual web
>host directory $HOME. In a nutshell, joeuser has:
>
>/web/servers/joeswebsite.com This would be their ftp chroot $HOME.
>
>/home/users/joeuser This would be where their Maildir and .qmail
> files are located.


Read the man page for qmail-users and play with /var/qmail/users/assign


up at 3

Aug 7, 2009, 9:05 AM

Post #3 of 5 (1568 views)
Permalink
Re: User's Maildir in dir other than $HOME [In reply to]

On Thu, 6 Aug 2009, Matt Simpson wrote:

> At 2:30 PM 8/6/09, up [at] 3 wrote:
>> In addition, I'd prefer if .qmail files were not in the virtual web host
>> directory $HOME. In a nutshell, joeuser has:
>>
>> /web/servers/joeswebsite.com This would be their ftp chroot $HOME.
>>
>> /home/users/joeuser This would be where their Maildir and .qmail
>> files are located.
>
> Read the man page for qmail-users and play with /var/qmail/users/assign

Thanks for your reply....I just did that, as well as had a look at
qmail-pw2u. It looks like if I were to use qmail-pw2u and have a
users/assign entry for every system user, it would put me back to square
one, since it takes the user's home directory path directly from the
/etc/passwd file. However, if I could get by with one wildcard entry,
that would do the trick.

In other words, after all of the vpopmail entries in users/assign, there
was a wildcard entry that had a variable for $USER. I'm just not clear on
whether that's possible, or what the exact syntax of the entry would be.
If I had to guess:

+:-:-:-:/home/users/$USER:-::

However, I've seen nothing in the docs that shows that the $USER variable
would work there...any ideas would be appreciated.

TIA!

James Smallacombe PlantageNet, Inc. CEO and Janitor
up [at] 3 http://3.am
=========================================================================


net-ezmlist at jmatt

Aug 7, 2009, 10:24 AM

Post #4 of 5 (1573 views)
Permalink
Re: User's Maildir in dir other than $HOME [In reply to]

At 12:05 PM 8/7/09, up [at] 3 wrote:
>Thanks for your reply....I just did that, as well as had a look at
>qmail-pw2u. It looks like if I were to use qmail-pw2u and have a
>users/assign entry for every system user, it would put me back to
>square one, since it takes the user's home directory path directly
>from the /etc/passwd file. However, if I could get by with one
>wildcard entry, that would do the trick.


Sorry. Maybe I misunderstood the problem. users/assign will allow
you to specify any directory you want for the user's "home" directory
(which is where qmail will look for .qmail files, and maybe where it
will look for Maildir, depending on what it finds in .qmail files and
qmail startup default). This will be checked for anything that qmail
thinks is a local user, which would include "users" mapped from
virtual domains, whether or not they actually exist as system users.
(I don't use vpopmail, so I'm a little fuzzy about how it fits into
the picture). This will allow you to separate mail directories from
web hosting directories.

AFAIK, there is no wildcarding capability for the directory parameter
of the assign entry, so you would probably need one assign entry for
each owner of a mail directory. If you're looking for a way to avoid
all those entries, I don't have any ideas.


up at 3

Aug 7, 2009, 11:17 AM

Post #5 of 5 (1563 views)
Permalink
Re: User's Maildir in dir other than $HOME [In reply to]

On Fri, 7 Aug 2009, Matt Simpson wrote:

> At 12:05 PM 8/7/09, up [at] 3 wrote:
>> Thanks for your reply....I just did that, as well as had a look at
>> qmail-pw2u. It looks like if I were to use qmail-pw2u and have a
>> users/assign entry for every system user, it would put me back to square
>> one, since it takes the user's home directory path directly from the
>> /etc/passwd file. However, if I could get by with one wildcard entry, that
>> would do the trick.
>
> Sorry. Maybe I misunderstood the problem. users/assign will allow you to
> specify any directory you want for the user's "home" directory (which is
> where qmail will look for .qmail files, and maybe where it will look for
> Maildir, depending on what it finds in .qmail files and qmail startup
> default). This will be checked for anything that qmail thinks is a local
> user, which would include "users" mapped from virtual domains, whether or not
> they actually exist as system users. (I don't use vpopmail, so I'm a little
> fuzzy about how it fits into the picture). This will allow you to separate
> mail directories from web hosting directories.
>
> AFAIK, there is no wildcarding capability for the directory parameter of the
> assign entry, so you would probably need one assign entry for each owner of a
> mail directory. If you're looking for a way to avoid all those entries, I
> don't have any ideas.

Ok, that pretty much answered my question, thanks. It did occur to me
that I could use qmail-pw2u once to create the file, then simply hand edit
the virtual host users and have my adduser script add an entry to
users/assign each time I add a new user.

I would however, prefer to avoid that complexity and the potential
pitfalls I see there (removing users, changing them from/to vhost
customers, etc). I'm thinking now that instead of messing with the qmail
end of things, perhaps proftp's "DefaultRoot" entry might be a better way
to approach this. In other words, make every mail system user's $HOME be
/home/users/$USER and tell proftp to chroot them to
/web/servers/theirdomain when they FTP in. Those that have shell logins
will be presumed to know how to deal with it. :)

Thanks!

James Smallacombe PlantageNet, Inc. CEO and Janitor
up [at] 3 http://3.am
=========================================================================

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.