LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 12-18-2003, 03:19 PM   #1
Josh_T_2
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Rep: Reputation: 0
Qpopper not getting email (using PAM/Samba Winbind Auth)


I originally installed Debian 3.0 (stable) and Samba 3 to do some testing on adding a Linux based file server to a Windows 2000 domain. I'm pretty sure Samba is working correctly - joined it to our domain ADS style and winbind works good for using Windows usernames for Samba. However, I noticed you can use winbind and Linux's PAM to authenticate any PAM aware application, so I decided to try making a intranet email server that "automagically" has accounts available for any Windows account.

Debian defaults to installing Exim as the SMTP part, and I installed qpopper for the POP3 part because it supports pam. I could send and receive using standard Linux usernames with the default packages, so I altered qpopper's pam file as follows:

FILE: /etc/pam.d/qpopper
#%PAM-1.0
#auth required pam_unix_auth.so shadow
#account required pam_unix_acct.so

#jdt 12-16-2003
auth required /lib/security/pam_winbind.so
account required /lib/security/pam_winbind.so

Then I could successfully authenticate via POP3 using Windows usernames as winbind creates them ("DOMAIN+user"). Tested exim with "exim -bt DOMAIN+user" - it refused to accept that apparently because it doesn't see their home dir, so I reconfigured samba to use /home/DOMAIN as all Windows user's home dir, then exim successfully accepts mail for the Windows users and puts it in /var/spool/mail/domain+user files. However, qpopper says the users have 0 messages when they connect. (note I'm testing using netcat and manually issuing the POP3/SMTP commands, if that makes a difference) - which confuses me because qpopper worked fine when using local linux accounts before I changed its pam file.

So do I have a qpopper problem, or could this be an exim or a pam or a samba problem? qpopper and exim are pretty much at debian's defaults as I couldn't find anything obviously wrong with their config. Is what I am trying to do even feasible? Or will I have problems down the road even if I can get this to work because of the winbind dynamically setting UIDs for the Windows account.

Thanks ahead of time for any insight or tips anyone can provide.
 
Old 12-18-2003, 03:42 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Have you verified that Exim is actually writing data to the mboxes? Did you compile Qpopper for mbox, maildir, hashdirs, etc? The spool layout might be different than what Qpopper expects. Did you compile Qpopper with debugging support? If so you can enable debugging and increase the log level to see where it's trying to read from.
 
Old 12-19-2003, 10:57 AM   #3
Josh_T_2
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Well, I've been experimenting all morning with no luck...

Exim writes data to /var/spool/mail/ directory, as long as the user's home dir exists. Its single text file per user that starts with From, which should be mbox format.

I didn't compile qpopper - I used apt-get to install the package from Debian stable. Anyway, the default config seems to use the same format as exim - with the default pam config mail works fine for normal Linux accounts, but not Windows Domain accounts. I ran into trouble after I modified the pam file (/etc/pam.d/qpopper) to auth via winbind - I can successfully authenticate using Windows accounts, but they have no mail via POP3, even if exim put mail for them in /var/spool/mail. I tried enabling debugging - support seems to be compiled in, but I didn't see anything that really could help me.

I also tried replacing qpopper with the popa3d package - same result - works great by local Linux accounts by default - change its pam file, and Windows accounts can log in but don't get mail.
 
Old 12-19-2003, 12:52 PM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
You could truss -p the qpopper process and see what syscalls it's making, i.e. what files it's trying to open. The point is, it's looking like qpopper is not opening the right mailspool file. Maybe it's opening just the "user" mbox rather than "domain+user".
 
Old 12-19-2003, 01:21 PM   #5
Josh_T_2
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Not sure what truss is, but I think strace will do the same thing. Looks like my problem is here - I'll Google to see what it means...


[pid 8581] lstat64("/var/mail/MYDOMAIN+hrx", 0xbfffdbec) = -1 ENOENT (No such file or directory)
 
Old 12-19-2003, 01:28 PM   #6
Josh_T_2
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, it appears to be a case problem - Winbind uses capitals for the domain, but exim is lowercasing it when it makes the mbox (/var/mail/mydomain+hrx).
 
Old 12-19-2003, 01:45 PM   #7
Josh_T_2
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Got it solved - switched to popa3d (liked it better than qpopper), all I need to do is use all lowercase for the POP username and it works. Thanks for the help.
 
Old 12-19-2003, 01:47 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
qpopper has a setting that will lower-case all. I can't remember if that's a compile time or run time option. It's in their PDF file at www.eudora.com/qpopper (I think that's where it redirects to, you can try www.qpopper.com too).
 
Old 12-19-2003, 01:52 PM   #9
Josh_T_2
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Ok - its downcase-user in the config file for qpopper. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
winbind --with-winbind-auth-challenge paul_mat Linux - Networking 0 09-27-2005 02:19 AM
Samba, Pam, winbind and ADS loaf Linux - Software 5 08-17-2004 08:46 PM
Cyrus/Winbind/Pam taggedd Linux - Software 0 10-27-2003 08:28 AM
Slackware, Samba, Winbind & PAM; Oh My! BulletSponge Slackware 3 06-20-2003 06:01 PM
Need help w/Samba & PAM Auth DocJones Linux - Software 3 05-14-2003 09:42 AM


All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration