ctnchris said:I tried to use it using up2date imap then running the configure, but It tells me it cant find "rfc822.h."
rpm -e imapd
cd /usr/local/directadmin/scripts/
./imapd.sh
Chris
ctnchris said:I tried to use it using up2date imap then running the configure, but It tells me it cant find "rfc822.h."
Thanks, that worked perfectlytino said:Lots of info on compiling php with imap
configure:40064: checking for IMAP support
configure:40513: checking for pam_start in -lpam
configure:40532: gcc -o conftest -g -O2 -R/usr/local/lib -L/usr/local/lib conftest.c -lpam -lintl -lpng -lz -ljpeg -lcurl -lz -
configure:40670: checking for crypt in -lcrypt
configure:40689: gcc -o conftest -g -O2 -R/usr/local/lib -L/usr/local/lib conftest.c -lcrypt -lpam -lintl -lpng -lz -ljpeg -lcu
configure:41120: checking whether SSL libraries are needed for c-client
configure:41250: gcc -o conftest -g -O2 -R/usr/local/lib -L/usr/local/lib -R/usr/local/imap-2004/lib -L/usr/local/imap-2004/lib
/usr/bin/ld: cannot find -lgssapi_krb5
configure: failed program was:
#line 41225 "configure"
#include "confdefs.h"
void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}
char auth_gssapi_valid();
int main() {
auth_gssapi_valid();
return 0;
}
configure:41276: checking whether IMAP works
configure:41309: gcc -o conftest -g -O2 -R/usr/local/lib -L/usr/local/lib -R/usr/local/imap-2004/lib -L/usr/local/imap-2004/lib
/usr/bin/ld: cannot find -lgssapi_krb5
configure: failed program was:
#line 41284 "configure"
#include "confdefs.h"
void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}
char mail_newbody();
int main() {
mail_newbody();
return 0;
}
DirectAdmin Support said:Hello,
Just a note that the imapd binary we've included isn't standard because it required changes to accomodate the virtual pop accounts. Using up2date might install another one that won't work with these email accounts.
The rfc822.h header that is used with the build of our imapd binary is found in the c-clients directory of the http://files.directadmin.com/services/imapback.tar.gz
file, after it's built (use ./buildit)
John
DirectAdmin Support said:Hello,
Just a note that the imapd binary we've included isn't standard because it required changes to accomodate the virtual pop accounts. Using up2date might install another one that won't work with these email accounts.
The rfc822.h header that is used with the build of our imapd binary is found in the c-clients directory of the http://files.directadmin.com/services/imapback.tar.gz
file, after it's built (use ./buildit)
John
# wget [url]ftp://ftp.cac.washington.edu/imap/c-client.tar.Z[/url]
# tar -zxvf c-client.tar.Z
Version may differ on date used
# cd imap-2004d/
# make lrh EXTRACFLAGS=-I/usr/kerberos/include EXTRALDFLAGS=-I/usr/kerberos/lib
Create directories.
Version may differ on date used
# mkdir /usr/local/imap-2004d
Create libraries dir
# mkdir /usr/local/imap-2004d/lib
Create include dir
# mkdir /usr/local/imap-2004d/include
Change dir into the c-client dir.
# cd c-client/
Copy all .h files into /usr/local/imap-2004d/include/
# cp *.h /usr/local/imap-2004d/include/
Copy all .c files.
# cp *.c /usr/local/imap-2004d/lib/
Copy c-client.a
# cp c-client.a /usr/local/imap-2004d/lib/libc-client.a
Change the configure file of php.
# pico /usr/local/directadmin/customapache/configure.php
Add:
\
--with-imap=/usr/local/imap-2004d
Where \ is on the end of the last line in the file before you started changing it.
# /usr/local/directadmin/customapache/build php
We are not recompiling other things besides php, so we said no to all questions.
After everything is finished, restart apache.
# service httpd restart
<?php
phpinfo();
?>
IMAP c-Client Version 2004
make sslnopwd
make[1]: Entering directory `/root/imap-2004d'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Building in full compliance with RFC 3501 security
+ requirements:
++ TLS/SSL encryption is supported
++ Unencrypted plaintext passwords are prohibited
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
make[1]: Leaving directory `/root/imap-2004d'
Applying an process to sources...
tools/an "ln -s" src/c-client c-client
tools/an "ln -s" src/ansilib c-client
tools/an "ln -s" src/charset c-client
tools/an "ln -s" src/osdep/unix c-client
tools/an "ln -s" src/mtest mtest
tools/an "ln -s" src/ipopd ipopd
tools/an "ln -s" src/imapd imapd
tools/an "ln -s" src/mailutil mailutil
tools/an "ln -s" src/mlock mlock
tools/an "ln -s" src/dmail dmail
tools/an "ln -s" src/tmail tmail
ln -s tools/an .
make build EXTRACFLAGS='' EXTRALDFLAGS='' EXTRADRIVERS='mbox' EXTRAAUTHENTICATORS=''
PASSWDTYPE=std SSLTYPE=nopwd IP=4 EXTRASPECIALS='' BUILDTYPE=lnp \
SPECIALS="GSSDIR=/usr/kerberos SSLDIR=/usr/share/ssl
SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib LOCKPGM=/usr/sbin/mlock" \
EXTRACFLAGS=" -I/usr/kerberos/include"
make[1]: Entering directory `/root/imap-2004d'
Building c-client for lnp...
echo `cat SPECIALS` > c-client/SPECIALS
cd c-client;make lnp EXTRACFLAGS='-I/usr/kerberos/include'\
EXTRALDFLAGS=''\
EXTRADRIVERS='mbox'\
EXTRAAUTHENTICATORS=''\
PASSWDTYPE=std SSLTYPE=nopwd IP=4\
GSSDIR=/usr/kerberos SSLDIR=/usr/share/ssl
SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib LOCKPGM=/usr/sbin/mlock
make[2]: Entering directory `/root/imap-2004d/c-client'
make build EXTRACFLAGS='-I/usr/kerberos/include' EXTRALDFLAGS='' EXTRADRIVERS='mbox' EXTRAAUTHENTICATORS=''
PASSWDTYPE=std SSLTYPE=nopwd IP=4 `cat SPECIALS` OS=lnx \
SIGTYPE=psx CHECKPW=pam CRXTYPE=nfs \
SPOOLDIR=/var/spool \
ACTIVEFILE=/var/lib/news/active \
RSHPATH=/usr/bin/rsh \
BASECFLAGS="-g -fno-omit-frame-pointer -O2" \
BASELDFLAGS="-lpam -ldl"
make[3]: Entering directory `/root/imap-2004d/c-client'
sh -c 'rm -rf auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o
ARCHIVE *FLAGS *TYPE c-client.a || true'
Once-only environment setup...
echo cc > CCTYPE
echo -g -fno-omit-frame-pointer -O2 '-I/usr/kerberos/include' > CFLAGS
echo -DCREATEPROTO=unixproto -DEMPTYPROTO=unixproto \
-DMAILSPOOL=\"/var/spool/mail\" \
-DANONYMOUSHOME=\"/var/spool/mail/anonymous\" \
-DACTIVEFILE=\"/var/lib/news/active\" -DNEWSSPOOL=\"/var/spool/news\" \
-DRSHPATH=\"/usr/bin/rsh\" -DLOCKPGM=\"/usr/sbin/mlock\" > OSCFLAGS
echo -lpam -ldl > LDFLAGS
echo "ar rc c-client.a osdep.o mail.o misc.o newsrc.o smanager.o utf8.o siglocal.o dummy.o pseudo.o
netmsg.o flstring.o fdstring.o rfc822.o nntp.o smtp.o imap4r1.o pop3.o
unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o;ranlib c-client.a" > ARCHIVE
echo lnx > OSTYPE
./drivers mbox imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile dummy
./mkauths md5 pla log
make[4]: Entering directory `/root/imap-2004d/c-client'
echo -DMD5ENABLE=\"/etc/cram-md5.pwd\" >> OSCFLAGS
make[4]: Leaving directory `/root/imap-2004d/c-client'
ln -s os_lnx.h osdep.h
ln -s os_lnx.c osdepbas.c
ln -s log_std.c osdeplog.c
ln -s sig_psx.c siglocal.c
ln -s crx_nfs.c crexcl.c
ln -s ip4_unix.c ip_unix.c
sh -c '(test -f /usr/include/sys/statvfs.h -a lnx != sc5 -a lnx != sco) && ln -s
nfstnew.c nfstest.c || ln -s nfstold.c nfstest.c'
Standard password authentication
ln -s ckp_pam.c osdepckp.c
Building with SSL
ln -s ssl_unix.c osdepssl.c
echo -I/usr/include/openssl -I/usr/include/openssl/openssl
-DSSL_CERT_DIRECTORY=\"/usr/share/ssl/certs\"
-DSSL_KEY_DIRECTORY=\"/usr/share/ssl/certs\" >> OSCFLAGS
echo " ssl_onceonlyinit ();" >> linkage.c
echo -L/usr/lib -lssl -lcrypto >> LDFLAGS
Building with SSL and plaintext passwords disabled unless SSL/TLS
echo " mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 2);" >> linkage.c
cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make lnx SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
osdep.c:71:31: security/pam_appl.h: No such file or directory
osdep.c:88: warning: `struct pam_response' declared inside parameter list
osdep.c:88: warning: its scope is only this definition or declaration, which is probably not what you want
osdep.c:88: warning: `struct pam_message' declared inside parameter list
osdep.c: In function `checkpw_conv':
osdep.c:92: sizeof applied to an incomplete type
osdep.c:93: dereferencing pointer to incomplete type
osdep.c:94: `PAM_PROMPT_ECHO_ON' undeclared (first use in this function)
osdep.c:94: (Each undeclared identifier is reported only once
osdep.c:94: for each function it appears in.)
osdep.c:95: invalid use of undefined type `struct pam_response'
osdep.c:95: dereferencing pointer to incomplete type
osdep.c:95: `PAM_SUCCESS' undeclared (first use in this function)
osdep.c:96: invalid use of undefined type `struct pam_response'
osdep.c:96: dereferencing pointer to incomplete type
osdep.c:98: `PAM_PROMPT_ECHO_OFF' undeclared (first use in this function)
osdep.c:99: invalid use of undefined type `struct pam_response'
osdep.c:99: dereferencing pointer to incomplete type
osdep.c:100: invalid use of undefined type `struct pam_response'
osdep.c:100: dereferencing pointer to incomplete type
osdep.c:102: `PAM_TEXT_INFO' undeclared (first use in this function)
osdep.c:103: `PAM_ERROR_MSG' undeclared (first use in this function)
osdep.c:104: invalid use of undefined type `struct pam_response'
osdep.c:104: dereferencing pointer to incomplete type
osdep.c:105: invalid use of undefined type `struct pam_response'
osdep.c:105: dereferencing pointer to incomplete type
osdep.c:109: `PAM_CONV_ERR' undeclared (first use in this function)
osdep.c: At top level:
osdep.c:120: syntax error before '*' token
osdep.c: In function `checkpw_cleanup':
osdep.c:125: `hdl' undeclared (first use in this function)
osdep.c:125: `PAM_DELETE_CRED' undeclared (first use in this function)
osdep.c:126: `PAM_SUCCESS' undeclared (first use in this function)
osdep.c: In function `checkpw':
osdep.c:137: `pam_handle_t' undeclared (first use in this function)
osdep.c:137: `hdl' undeclared (first use in this function)
osdep.c:138: storage size of `conv' isn't known
osdep.c:145: `PAM_SUCCESS' undeclared (first use in this function)
osdep.c:146: `PAM_RHOST' undeclared (first use in this function)
osdep.c:149: `PAM_ESTABLISH_CRED' undeclared (first use in this function)
osdep.c:151: `PAM_DELETE_CRED' undeclared (first use in this function)
osdep.c:152: `PAM_AUTH_ERR' undeclared (first use in this function)
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/root/imap-2004d/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/root/imap-2004d/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/root/imap-2004d'
make: *** [lrh] Error 2
pam_appl.h is included in the pam-devel package in RH3, probably the same for RH/Centos4.Mikej0h said:Code:`cat CFLAGS` `cat OSCFLAGS` -c osdep.c osdep.c:71:31: security/pam_appl.h: No such file or directory
/
--with-imap=/usr/local/imap-2004e
checking for IMAP support... yes
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... no
checking for pam_start in -lpam... yes
checking for crypt in -lcrypt... (cached) yes
configure: error: Cannot find rfc822.h. Please check your c-client installation.
*** There was an error while trying to configure php. Check the configure.php file
costarica said:I am not sure what I am doing wrong... I followed the instructions for imap-2004e given earlier in this thread, copying everything to the /usr/local/imap-2004e 'lib' and 'include' dirs.
Then modified the configure.php and added:
Code:/ --with-imap=/usr/local/imap-2004e
Running ./build php returns this error:
Any ideas? I checked and rfc822.h IS located in the imap-2004e/include dir.