Mac Os X And Postfix

carconni

Registered
Hi - First, let me thank you in advance for reading through this post and any assistance with this issue would be really appreciated.

I have a tough assignment here and am not sure what the best approach should be. I've been assigned to rebuild Postfix on our XServer with OSX 10.4.2 installed. I need all of the functionality that comes with the current build, I just need to to add Mysql support.

Here's what I need to do. I have 2 "domains". One is a corporate domain and the members reside in the Open Ldap program (Apple's). The second domain is a contractor domain and the members reside in a remote mysql database. All my mailboxes live on the XServer. I only need Postfix to check the mysql database for authentication.

I have to maintain cyrus/imap. mailman, & squirrel mail as well as open directory support.

I have tried to upgrading MYSQL:

make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/AppleInternal/Developer/Headers -I/usr/include/mysql -I/usr/local/mysql/lib' 'AUXLIBS=-L/usr/lib/mysql/ -lmysqlclient -lz -lm'

but I get at the end of install:

cc -DHAS_MYSQL -I/AppleInternal/Developer/Headers -I/usr/include/mysql -I/usr/local/mysql/lib -DBIND_8_COMPAT -DNO_NETINFO -g -O -I. -I../../include -DMACOSX -o local alias.o command.o delivered.o dotforward.o file.o forward.o include.o indirect.o local.o mailbox.o recipient.o resolve.o token.o deliver_attr.o maildir.o biff_notify.o unknown.o local_expand.o aod.o ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a -L/usr/lib/mysql/ -lmysqlclient -lz -lm -flat_namespace
/usr/bin/ld: Undefined symbols:
_CFDataCreate
_CFDictionaryContainsKey
_CFDictionaryGetTypeID
_CFDictionaryGetValue
_CFGetTypeID
_CFPropertyListCreateFromXMLData
_CFRelease
_CFStringGetCStringPtr
_CFStringGetTypeID
___CFStringMakeConstantString
_dsBuildListFromStrings
_dsBuildListFromStringsAlloc
_dsCloseAttributeValueList
_dsCloseDirNode
_dsCloseDirService
_dsDataBufferAllocate
_dsDataBufferDeAllocate
_dsDataListDeAllocate
_dsDataListDeallocate
_dsDeallocAttributeEntry
_dsDeallocAttributeValueEntry
_dsDeallocRecordEntry
_dsFindDirNodes
_dsGetAttributeEntry
_dsGetAttributeValue
_dsGetDirNodeName
_dsGetRecordEntry
_dsGetRecordList
_dsGetRecordNameFromEntry
_dsOpenDirNode
_dsOpenDirService
_dsReleaseContinueData
_kCFAllocatorDefault
collect2: ld returned 1 exit status
make: *** [local] Error 1
make: *** [update] Error 1

I have also tried downloading Postfix from www.postfix.com and installing on the MAC, however it broke (apparently there are some issues regarding group names [maildrop vs postdrop] not to mention launchd and the loss of mailman and squirrel mail.

If anyone can help me with the build or maybe I'm just approching this from the wrong perspective.

Thanks again for any insight you can provide.

Constance
 
Constance...

I have the same need (Postfix & Courier-IMAP to be linked with MySQL). And getting the same results building postfix. Those missing definitions are unrelated to building postfix for MySQL. For instance, if you try to build postfix without mysql support (e.g. simply: make -f Makefile.init makefiles; make), you will get the same result.

The missing definitions belong to something called DirectoryService: http://darwinsource.opendarwin.org/tarballs/apsl/DirectoryService-351.13.tar.gz and the library for this does not appear to be included with OSX by default.


building/installing this appears to be a large can of worms, since it depends on yet more BS to build, and lord knows what those dependencies depend on. I am also concerned with how it will integrate/interfere with OSX once it is installed. Welcome to the GNU cesspool.

Lemme know if you make any progress. best, Jay
 
Have you guys tried installing postfix through fink's package management system? There really is never any reason to build everything yourself, and fink makes it all nice if you really want to do an optimized compile on your system in those rare cases. Most of the time it just uses the packaged binaries.

Anyhow, goto http://fink.sf.net and check out what it has to offer. It takes care of all your dependencies, and it has a postfix install option. The other benefit is that it keeps everything updated for you, and it installs into a /sw directory which makes manual removal very simple.

Edit: checking the fink postfix packages, there is indeed a postfix install that supports mysql, packaged as postfix-mysql.

HTH,
Travis
 
Hi - Thank you JJDeluxe, Leleu & BjarneDM. I appreaciate your help and advice. I did try fink actually and it didn't go over well. I haven't tried BjarneDM's build yet but will just as soon as I can. I had to "shelve" the project due to time constraints. I did contact Apple and they were concerned that building Postfix with MYSQL support could "break" smtp auth. I'll let you know as I progress - thanks again.
 
hmmm ... SMTP auth support in enabled by default in versions above 2.0: http://www.thecabal.org/~devin/postfix/smtp-auth.txt

And on Mac OS X Client the libraries are included:
Code:
[10:44:36@/]$ sudo find /usr/lib -iname '*sasl*' | xargs -n1 ls -ald
lrwxr-xr-x   1 root  wheel  16 Nov  1 14:44 /usr/lib/libsasl2.2.0.1.dylib -> libsasl2.2.dylib
lrwxr-xr-x   1 root  wheel  16 Nov  1 14:44 /usr/lib/libsasl2.2.0.15.dylib -> libsasl2.2.dylib
-r-xr-xr-x   1 root  wheel  85700 Sep 27 13:45 /usr/lib/libsasl2.2.dylib
lrwxr-xr-x   1 root  wheel  16 Nov  1 14:44 /usr/lib/libsasl2.dylib -> libsasl2.2.dylib
drwxr-xr-x   39 root  wheel  1326 Mar 26  2005 /usr/lib/sasl2
-r-xr-xr-x   1 root  wheel  22340 Mar 21  2005 /usr/lib/sasl2/disabled/libsasldb.2.so
-rw-r--r--   1 root  wheel  694 Mar 21  2005 /usr/lib/sasl2/disabled/libsasldb.la
[10:48:47@/]$ ls -al /usr/lib/sasl2
total 2464
drwxr-xr-x    39 root  wheel    1326 Mar 26  2005 .
drwxr-xr-x   293 root  wheel    9962 Nov  1 15:18 ..
-rw-r--r--     1 root  wheel     631 Mar 21  2005 apop.la
-r-xr-xr-x     1 root  wheel   17496 Mar 21  2005 apop.so
-rwxr-xr-x     1 root  wheel     629 Mar 21  2005 dhx.la
-r-xr-xr-x     1 root  wheel  699612 Mar 21  2005 dhx.so
-rw-r--r--     1 root  wheel     653 Mar 21  2005 digestmd5WebDAV.la
-r-xr-xr-x     1 root  wheel   43132 Mar 21  2005 digestmd5WebDAV.so
drwxr-xr-x     8 root  wheel     272 Jun 29 10:51 disabled
-r-xr-xr-x     1 root  wheel   17660 Mar 21  2005 libanonymous.2.so
-rw-r--r--     1 root  wheel     694 Mar 21  2005 libanonymous.la
-r-xr-xr-x     1 root  wheel   17740 Mar 21  2005 libcrammd5.2.so
-rw-r--r--     1 root  wheel     682 Mar 21  2005 libcrammd5.la
-r-xr-xr-x     1 root  wheel   47228 Mar 21  2005 libdigestmd5.2.so
-rw-r--r--     1 root  wheel     703 Mar 21  2005 libdigestmd5.la
-r-xr-xr-x     1 root  wheel   22688 Mar 21  2005 libgssapiv2.2.0.18.so
lrwxr-xr-x     1 root  wheel      21 Nov  1 14:44 libgssapiv2.2.so -> libgssapiv2.2.0.18.so
-rw-r--r--     1 root  wheel     739 Mar 21  2005 libgssapiv2.la
-r-xr-xr-x     1 root  wheel   22504 Mar 21  2005 libkerberos4.2.so
-rw-r--r--     1 root  wheel     628 Mar 21  2005 liblogin.la
-rw-r--r--     1 root  wheel     637 Mar 21  2005 libntlm.la
-r-xr-xr-x     1 root  wheel   30816 Mar 21  2005 libntlm.so
-r-xr-xr-x     1 root  wheel   67668 Mar 21  2005 libotp.2.so
-rw-r--r--     1 root  wheel     667 Mar 21  2005 libotp.la
-r-xr-xr-x     1 root  wheel   17604 Mar 21  2005 libplain.2.so
-rw-r--r--     1 root  wheel     670 Mar 21  2005 libplain.la
-r-xr-xr-x     1 root  wheel   17612 Mar 21  2005 login.so
-rwxr-xr-x     1 root  wheel     639 Mar 21  2005 mschapv2.la
-r-xr-xr-x     1 root  wheel   22792 Mar 21  2005 mschapv2.so
drwxr-xr-x     6 root  wheel     204 Jun 29 10:51 openldap
-rwxr-xr-x     1 root  wheel     651 Mar 21  2005 shadow_auxprop.la
-r-xr-xr-x     1 root  wheel   18580 Mar 21  2005 shadow_auxprop.so
-rwxr-xr-x     1 root  wheel     635 Mar 21  2005 smb_lm.la
-r-xr-xr-x     1 root  wheel   22316 Mar 21  2005 smb_lm.so
-rwxr-xr-x     1 root  wheel     635 Mar 21  2005 smb_nt.la
-r-xr-xr-x     1 root  wheel   22316 Mar 21  2005 smb_nt.so
-rwxr-xr-x     1 root  wheel     568 Mar 21  2005 smb_ntlmv2.la
-r-xr-xr-x     1 root  wheel   22616 Mar 21  2005 smb_ntlmv2.so
-r-xr-xr-x     1 root  wheel   21960 Mar 21  2005 twowayrandom.so
[10:49:28@/]$
so you shouldn't have any problems getting SMTP auth support compiled into Postfix. Otherwise, you can get a newer cyrus-sasl2 library from DarwinPorts (instructions on how to install and maintain DarwinPorts can be found here: http://www.macosx.com/forums/showthread.php?t=257956 )
 
Back
Top