maildrop and qmail with virtual users, a howto. Also, please help with setting up sqlite3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

maildrop and qmail with virtual users, a howto. Also, please help with setting up sqlite3

Robert Johnson
Hi.
Sorry for going off-topic, but I am unable to join courier-users. Hitting subscribe has no effect.

I have installed sqwebmail with courier-authlib and it works fine with userdb for both real and virtual users. I am using qmail, and for .qmail the contents are |/usr/local/bin/maildrop

and to allow for virtual users, I have .qmail-default with
|/usr/local/bin/maildrop -w 90 -d `echo "$DTLINE" | sed -e "s/Delivered-To:\ //" -e "s/user-//"`


So far so good.
But I would like to assign a real user for each virtual domain.
I tried doing so with userdb, but courier-authlib did not function when I had more than one real user holding maildirs.

To surmount this limitation (and be able to manage an eventual, larger db of vusers), I am exploring sqlite. I have set up sqlite by issuing the following commands:
 
sqlite3 /var/users.db
sqlite> CREATE TABLE passwd (
 

...> id text not null primary key,
...> crypt text,
...> clear text,
...> name text,
...> uid int,
...> gid int,
...> home text not null,
...> maildir text,
...> defaultdelivery text,
...> quota text,
...> options text);
sqlite> insert into passwd values('[hidden email]', '', 'pass', '', '1000', '1000', '/home/user/vusers/test', 'Maildir', '', '', '');
sqlite> select * from passwd;
[hidden email]||pass||1000|1000|/home/user/vusers/test|Maildir|||
ctrl-d
authtest [hidden email]
Authentication succeeded.

 

Authenticated: [hidden email] (uid 1000, gid 1000)
Home Directory: /home/user/vusers/test
Maildir: (none)
Quota: (none)
Encrypted Password:
Cleartext Password: pass
Options: (none)
 
domain1.com exists (as a different, functional domain), as does the directory /home/user/vusers/test/Maildir and its three subdirs, cur, new, and tmp).
/etc/courier/authdaemonrc is set at defaults with the following,
authmodulelist="authuserdb authpwd authpgsql authldap authmysql authsqlite authpipe"
authsqliterc also is still set at defaults.
 
When I try to login via sqwebmail, I see
"invalid user id or password"
tail /var/log/maillog shows
sqwebmaild: LOGIN FAILED, user=[hidden email], ip=[192.168.1.100]
 
Why would authtest succeed but sqwebmail fail to login? What can I do to make sqwebmail work with sqlite?

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|

Re: maildrop and qmail with virtual users, a howto. Also, please help with setting up sqlite3

Sam Varshavchik
Robert Johnson writes:

> Authenticated: [hidden email] (uid 1000, gid 1000)
> Home Directory: /home/user/vusers/test
> Maildir: (none)
> Quota: (none)
> Encrypted Password:
> Cleartext Password: pass
> Options: (none)
>
> domain1.com exists (as a different, functional domain), as does the  
> directory /home/user/vusers/test/Maildir and its three subdirs, cur, new,  
> and tmp).
> /etc/courier/authdaemonrc is set at defaults with the following,
> authmodulelist="authuserdb authpwd authpgsql authldap authmysql authsqlite  
> authpipe"
> authsqliterc also is still set at defaults.
>
> When I try to login via sqwebmail, I see
> "invalid user id or password"
> tail /var/log/maillog shows
> sqwebmaild: LOGIN FAILED, user=[hidden email], ip=[192.168.1.100]
>
> Why would authtest succeed but sqwebmail fail to login? What can I do to  
> make sqwebmail work with sqlite?
The only thing I can think of is that sqwebmail is different installation of  
courier-authlib on the same box, and sqwebmail is compiled to point to the  
wrong one.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (817 bytes) Download Attachment