On Tue, Sep 18, 2012 at 04:17:06PM -0700, Tom Brown wrote: > >Pass the -access and the -accesslocal parameter to couriertcpd, > >and set up an access file that sets the DEFDOMAIN environment > >variable based on the local IP address. > > I don't understand how this is going to do anything that couriertcpd > isn't already doing...
If user connects to 192.0.2.1 and username has no domain, append @foo to username. If user connects to 192.0.2.2 and username has no domain, append @bar to username. > ... but I don't see anything in imap/imaplogin.c that seems to do > what you suggest... It's in courier-authlib. courier-authlib-0.64.0 $ grep -R DEFDOMAIN . ./authmoduser3.c:** - DEFDOMAIN if username does not contain any characters frP ./authmoduser3.c:** the first char of DEFDOMAIN) ./authmoduser3.c: q=getenv("DEFDOMAIN"); ./authsaslcram.c: /* If DEFDOMAIN is set, pick apart the response and reae ./authsaslcram.c: q=getenv("DEFDOMAIN"); You can follow it from there. > Sounds like my trivial patches to the imap/imaplogin.c and > imap/pop3login.c files is likely to be much simpler, as the only > setup required is turning off the default -nodnslookup flag. Creating an access file is easy, and if you can avoid keeping a custom code fork then I think it's worthwhile. I used this for a while without problems. To make the access.db I used exim_dbmbuild -nozero access.in access.db since I happened to have exim around. You can probably cobble something together with perl and tie, if you can't find Sam's code. Typing 'makesmtpaccess' into google gives you http://www.courier-mta.org/makesmtpaccess.html I believe it's part of the full courier suite, not just courier-imap. Regards, Brian. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Courier-imap mailing list Courier-imap@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap