summaryrefslogtreecommitdiff
path: root/src/qmail-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmail-remote.c')
-rw-r--r--src/qmail-remote.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/src/qmail-remote.c b/src/qmail-remote.c
index 1227b81..c086d14 100644
--- a/src/qmail-remote.c
+++ b/src/qmail-remote.c
@@ -121,7 +121,7 @@ void out(char *s)
if (buffer_puts(&bs, s) == -1) _exit(0);
}
-void zero()
+static void zero()
{
if (buffer_put(&bs, "\0", 1) == -1) _exit(0);
}
@@ -147,7 +147,7 @@ void outsafe(stralloc *sa)
}
}
-void temp_noip()
+static void temp_noip()
{
out("ZInvalid ipaddr in control/domainips (#4.3.0)\n");
zerodie();
@@ -159,13 +159,13 @@ void temp_nomem()
zerodie();
}
-void temp_oserr()
+static void temp_oserr()
{
out("ZSystem resources temporarily unavailable. (#4.3.0)\n");
zerodie();
}
-void temp_osip()
+static void temp_osip()
{
out("ZCan't bind to local ip address: ");
outsafe(&sendip);
@@ -173,7 +173,7 @@ void temp_osip()
zerodie();
}
-void temp_noconn()
+static void temp_noconn()
{
out("ZSorry, I wasn't able to establish an SMTP connection: ");
outsafe(&canonhost);
@@ -181,7 +181,7 @@ void temp_noconn()
zerodie();
}
-void temp_qmtpnoc()
+static void temp_qmtpnoc()
{
out("ZSorry, I wasn't able to establish an QMTP connection: ");
outsafe(&canonhost);
@@ -189,13 +189,13 @@ void temp_qmtpnoc()
zerodie();
}
-void temp_read()
+static void temp_read()
{
out("ZUnable to read message. (#4.3.0)\n");
zerodie();
}
-void temp_dnscanon()
+static void temp_dnscanon()
{
out("ZCNAME lookup failed temporarily for: ");
outsafe(&canonhost);
@@ -203,7 +203,7 @@ void temp_dnscanon()
zerodie();
}
-void temp_dns()
+static void temp_dns()
{
out("ZSorry, I couldn't find any host named: ");
outsafe(&host);
@@ -211,7 +211,7 @@ void temp_dns()
zerodie();
}
-void temp_nomx()
+static void temp_nomx()
{
out("ZSorry, I couldn't find a mail exchanger or IP address for: ");
outsafe(&host);
@@ -219,37 +219,37 @@ void temp_nomx()
zerodie();
}
-void temp_chdir()
+static void temp_chdir()
{
out("ZUnable to switch to home directory. (#4.3.0)\n");
zerodie();
}
-void temp_control()
+static void temp_control()
{
out("ZUnable to read control files. (#4.3.0)\n");
zerodie();
}
-void perm_partialline()
+static void perm_partialline()
{
out("DSMTP cannot transfer messages with partial final lines. (#5.6.2)\n");
zerodie();
}
-void temp_proto()
+static void temp_proto()
{
out("ZRecipient did not talk proper QMTP (#4.3.0)\n");
zerodie();
}
-void perm_usage()
+static void perm_usage()
{
out("Dqmail-remote was invoked improperly. (#5.3.5)\n");
zerodie();
}
-void perm_dns()
+static void perm_dns()
{
out("DSorry, I couldn't find any host named: ");
outsafe(&host);
@@ -257,7 +257,7 @@ void perm_dns()
zerodie();
}
-void perm_nomx()
+static void perm_nomx()
{
out("DSorry, I couldn't find a mail exchanger or IP address for: ");
outsafe(&host);
@@ -265,19 +265,19 @@ void perm_nomx()
zerodie();
}
-void perm_ambigmx()
+static void perm_ambigmx()
{
out("DSorry. Although I'm listed as a best-preference MX or A for that host,\n"
"it isn't in my control/locals file, so I don't treat it as local. (#5.4.6)\n");
zerodie();
}
-void err_authprot()
+static void err_authprot()
{
out("KNo supported AUTH method found, continuing without authentication.\n");
}
-void outhost()
+static void outhost()
{
char ipaddr[IPFMT];
int len;
@@ -291,7 +291,7 @@ void outhost()
int flagcritical = 0;
-void dropped()
+static void dropped()
{
out("ZConnected to ");
outhost();
@@ -305,7 +305,7 @@ long timeoutconnect = 60;
int smtpfd;
long timeout = 1200;
-ssize_t saferead(int fd, char *buf, int len)
+static ssize_t saferead(int fd, char *buf, int len)
{
int r;
if (ssl) {
@@ -318,7 +318,7 @@ ssize_t saferead(int fd, char *buf, int len)
return r;
}
-ssize_t safewrite(int fd, char *buf, int len)
+static ssize_t safewrite(int fd, char *buf, int len)
{
int r;
if (ssl) {
@@ -341,7 +341,7 @@ buffer bf = BUFFER_INIT(saferead, -1, frombuf, sizeof(frombuf));
static stralloc smtptext = {0};
static stralloc header = {0};
-void get(char *ch)
+static void get(char *ch)
{
buffer_get(&bf, ch, 1);
if (*ch != '\r')
@@ -349,7 +349,7 @@ void get(char *ch)
if (!stralloc_append(&smtptext, ch)) temp_nomem();
}
-unsigned long smtpcode()
+static unsigned long smtpcode()
{
unsigned char ch;
unsigned long code;
@@ -375,7 +375,7 @@ unsigned long smtpcode()
return code;
}
-void outsmtptext()
+static void outsmtptext()
{
int i;
if (smtptext.s)
@@ -388,7 +388,7 @@ void outsmtptext()
}
}
-void quit(char *prepend, char *append)
+static void quit(char *prepend, char *append)
{
buffer_putsflush(&bo, "QUIT\r\n");
/* waiting for remote side is just too ridiculous */
@@ -400,7 +400,7 @@ void quit(char *prepend, char *append)
zerodie();
}
-void blast()
+static void blast()
{
int r;
char ch;
@@ -443,7 +443,7 @@ stralloc tlsdestinations = {0};
struct constmap maptlsdestinations;
unsigned long verifydepth = VERIFYDEPTH;
-void tls_init()
+static void tls_init()
{
ctx = ssl_client();
ssl_errstr();
@@ -483,7 +483,7 @@ void tls_init()
if (tls_timeoutconn(timeout, smtpfd, smtpfd, ssl) <= 0) temp_tlserr();
}
-int starttls_peer()
+static int starttls_peer()
{
int i = 0;
@@ -494,7 +494,7 @@ int starttls_peer()
return 0;
}
-void tls_peercheck()
+static void tls_peercheck()
{
X509 *cert;
STACK_OF(X509) * certs;
@@ -573,7 +573,7 @@ int utf8string(unsigned char *ch, int len)
return 0;
}
-int utf8received()
+static int utf8received()
{
int r;
int i;
@@ -616,7 +616,7 @@ int utf8received()
unsigned long code;
int flagsize = 0;
-int smtp_size()
+static int smtp_size()
{
int i;
if (smtptext.len > 10) {
@@ -627,7 +627,7 @@ int smtp_size()
return 0;
}
-void smtp_greeting()
+static void smtp_greeting()
{
buffer_puts(&bo, "EHLO ");
buffer_put(&bo, helohost.s, helohost.len);
@@ -648,7 +648,7 @@ void smtp_greeting()
flagsize = smtp_size();
}
-void smtp_starttls()
+static void smtp_starttls()
{
buffer_puts(&bo, "STARTTLS\r\n");
buffer_flush(&bo);
@@ -663,7 +663,7 @@ void smtp_starttls()
}
}
-void mailfrom()
+static void mailfrom()
{
buffer_puts(&bo, "MAIL FROM:<");
buffer_put(&bo, sender.s, sender.len);
@@ -692,7 +692,7 @@ stralloc xuser = {0};
static const char hextab[] = "0123456789abcdef";
-int xtext(stralloc *sa, char *s, int len)
+static int xtext(stralloc *sa, char *s, int len)
{
int i;
unsigned char c;
@@ -713,7 +713,7 @@ int xtext(stralloc *sa, char *s, int len)
return sa->len;
}
-void mailfrom_xtext()
+static void mailfrom_xtext()
{
if (!xtext(&xuser, user.s, user.len)) temp_nomem();
buffer_puts(&bo, "MAIL FROM:<");
@@ -729,7 +729,7 @@ void mailfrom_xtext()
buffer_flush(&bo);
}
-int mailfrom_plain()
+static int mailfrom_plain()
{
buffer_puts(&bo, "AUTH PLAIN\r\n");
buffer_flush(&bo);
@@ -755,7 +755,7 @@ int mailfrom_plain()
return 0;
}
-int mailfrom_login()
+static int mailfrom_login()
{
buffer_puts(&bo, "AUTH LOGIN\r\n");
buffer_flush(&bo);
@@ -785,7 +785,7 @@ int mailfrom_login()
return 0;
}
-int mailfrom_cram()
+static int mailfrom_cram()
{
int j;
unsigned char digest[16];
@@ -831,7 +831,7 @@ int mailfrom_cram()
return 0;
}
-void smtp_auth()
+static void smtp_auth()
{
int i;
@@ -851,7 +851,7 @@ void smtp_auth()
/* this file is too long ------------------------------------------- GO ON */
-void smtp()
+static void smtp()
{
int flagbother;
int i;
@@ -962,7 +962,7 @@ void smtp()
int qmtpsend = 0;
-void qmtp()
+static void qmtp()
{
unsigned long len;
char *x;
@@ -1076,7 +1076,7 @@ void qmtp()
/* host has to be canonical [A/AAAA record], box has to be quoted */
-void addrmangle(stralloc *saout, char *address, int *flagalias, int flagcname)
+static void addrmangle(stralloc *saout, char *address, int *flagalias, int flagcname)
{
int at;
int r = 0;
@@ -1110,7 +1110,7 @@ void addrmangle(stralloc *saout, char *address, int *flagalias, int flagcname)
if (!stralloc_cat(saout, &canonhost)) temp_nomem();
}
-void getcontrols()
+static void getcontrols()
{
if (control_init() == -1) temp_control();
if (control_readint(&timeout, "control/timeoutremote") == -1) temp_control();