Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions include/email.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ struct addr {
typedef enum { GPG_SIG=0x01, GPG_ENC=0x02 } GpgCallType;


/* Globally defined vars */
dhash table;
char *conf_file;
/* Globally defined vars (defined in email.c) */
extern dhash table;
extern char *conf_file;

struct mailer_options {
bool verbose;
Expand All @@ -78,7 +78,9 @@ struct mailer_options {
dlist to;
dlist cc;
dlist bcc;
} Mopts;
};

extern struct mailer_options Mopts;

void usage(void);

Expand Down
5 changes: 5 additions & 0 deletions src/email.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#include "error.h"
#include "mimeutils.h"

/* Global variables declared in email.h */
dhash table;
char *conf_file;
struct mailer_options Mopts;

static void
defaultDestr(void *ptr)
{
Expand Down
7 changes: 6 additions & 1 deletion src/processmail.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ processRemote(const char *smtp_serv, int smtp_port, dstrbuf *msg)
#endif
if (use_tls && strcasecmp(use_tls, "true") == 0) {
if (smtpStartTls(sd) != ERROR) {
dnetUseTls(sd);
if (dnetUseTls(sd) == ERROR) {
fatal("Could not establish TLS connection: %s\n",
dnetGetErr(sd));
retval = ERROR;
goto end;
}
dnetVerifyCert(sd);
if (smtpInitAfterTLS(sd, nodename) == ERROR) {
printSmtpError();
Expand Down