Why were we using DOS newlines?

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11178 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Nathan Whitehorn 2005-02-01 02:23:21 +00:00
parent a82d0abbd6
commit a8e03a70ea
3 changed files with 1132 additions and 1132 deletions

View File

@ -1,29 +1,29 @@
SubDir OBOS_TOP src add-ons mail_daemon outbound_protocols smtp ; SubDir OBOS_TOP src add-ons mail_daemon outbound_protocols smtp ;
UsePrivateHeaders mail ; UsePrivateHeaders mail ;
SubDirHdrs [ FDirName $(OBOS_TOP) headers os add-ons mail_daemon ] ; SubDirHdrs [ FDirName $(OBOS_TOP) headers os add-ons mail_daemon ] ;
if $(USESSL) { if $(USESSL) {
SubDirC++Flags -DUSESSL ; SubDirC++Flags -DUSESSL ;
SubDirHdrs [ FDirName / boot home config include ] ; SubDirHdrs [ FDirName / boot home config include ] ;
} }
if $(BONE_COMPATIBLE) { if $(BONE_COMPATIBLE) {
SubDirC++Flags -DBONE ; SubDirC++Flags -DBONE ;
} else { } else {
SubDirC++Flags -DBUILDING_R5_LIBNET ; SubDirC++Flags -DBUILDING_R5_LIBNET ;
} }
Addon SMTP : mail_daemon outbound_protocols : Addon SMTP : mail_daemon outbound_protocols :
smtp.cpp smtp.cpp
md5c.c ; md5c.c ;
LinkSharedOSLibs SMTP : be libmail.so $(NETWORK_LIBS) ; LinkSharedOSLibs SMTP : be libmail.so $(NETWORK_LIBS) ;
if $(USESSL) { if $(USESSL) {
LinkSharedOSLibs SMTP : ssl crypto ; LinkSharedOSLibs SMTP : ssl crypto ;
} }
Package haiku-maildaemon-cvs : Package haiku-maildaemon-cvs :
SMTP : SMTP :
boot home config add-ons mail_daemon outbound_protocols ; boot home config add-ons mail_daemon outbound_protocols ;

File diff suppressed because it is too large Load Diff

View File

@ -1,57 +1,57 @@
#ifndef ZOIDBERG_SMTP_H #ifndef ZOIDBERG_SMTP_H
#define ZOIDBERG_SMTP_H #define ZOIDBERG_SMTP_H
/* SMTPProtocol - implementation of the SMTP protocol /* SMTPProtocol - implementation of the SMTP protocol
** **
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved. ** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/ */
#include <String.h> #include <String.h>
#include <MailAddon.h> #include <MailAddon.h>
#ifdef USESSL #ifdef USESSL
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#endif #endif
class SMTPProtocol : public BMailFilter { class SMTPProtocol : public BMailFilter {
public: public:
SMTPProtocol(BMessage *message, BMailChainRunner *runner); SMTPProtocol(BMessage *message, BMailChainRunner *runner);
~SMTPProtocol(); ~SMTPProtocol();
virtual status_t InitCheck(BString *verbose); virtual status_t InitCheck(BString *verbose);
virtual status_t ProcessMailMessage(BPositionIO **io_message, BEntry *io_entry, virtual status_t ProcessMailMessage(BPositionIO **io_message, BEntry *io_entry,
BMessage *io_headers, BPath *io_folder, const char *io_uid); BMessage *io_headers, BPath *io_folder, const char *io_uid);
//----Perfectly good holdovers from the old days //----Perfectly good holdovers from the old days
status_t Open(const char *server, int port, bool esmtp); status_t Open(const char *server, int port, bool esmtp);
status_t Login(const char *uid, const char *password); status_t Login(const char *uid, const char *password);
void Close(); void Close();
status_t Send(const char *to, const char *from, BPositionIO *message); status_t Send(const char *to, const char *from, BPositionIO *message);
int32 ReceiveResponse(BString &line); int32 ReceiveResponse(BString &line);
status_t SendCommand(const char *cmd); status_t SendCommand(const char *cmd);
private: private:
status_t POP3Authentification(); status_t POP3Authentification();
int _fd; int _fd;
BString fLog; BString fLog;
BMessage *fSettings; BMessage *fSettings;
BMailChainRunner *runner; BMailChainRunner *runner;
int32 fAuthType; int32 fAuthType;
#ifdef USESSL #ifdef USESSL
SSL_CTX *ctx; SSL_CTX *ctx;
SSL *ssl; SSL *ssl;
BIO *sbio; BIO *sbio;
bool use_ssl; bool use_ssl;
#endif #endif
status_t fStatus; status_t fStatus;
BString fServerName; // required for DIGEST-MD5 BString fServerName; // required for DIGEST-MD5
}; };
#endif /* ZOIDBERG_SMTP_H */ #endif /* ZOIDBERG_SMTP_H */