diff options
author | Dan Cross <cross@gajendra.net> | 2020-01-10 14:44:21 +0000 |
---|---|---|
committer | Dan Cross <cross@gajendra.net> | 2020-01-10 14:54:30 +0000 |
commit | fa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch) | |
tree | 81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/upas/smtp | |
parent | 77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff) | |
download | plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2 plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip |
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.
Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/upas/smtp')
-rw-r--r-- | src/cmd/upas/smtp/mxdial.c | 8 | ||||
-rw-r--r-- | src/cmd/upas/smtp/smtp.c | 14 | ||||
-rw-r--r-- | src/cmd/upas/smtp/smtpd.c | 8 | ||||
-rw-r--r-- | src/cmd/upas/smtp/smtpd.h | 2 | ||||
-rw-r--r-- | src/cmd/upas/smtp/spam.c | 8 |
5 files changed, 20 insertions, 20 deletions
diff --git a/src/cmd/upas/smtp/mxdial.c b/src/cmd/upas/smtp/mxdial.c index 56962dcd..f7a009af 100644 --- a/src/cmd/upas/smtp/mxdial.c +++ b/src/cmd/upas/smtp/mxdial.c @@ -171,7 +171,7 @@ mxlookup(DS *ds, char *domain) { int i, n, nmx; Ndbtuple *t, *tmx, *tpref, *tip; - + strcpy(domain, ds->host); ds->netdir = "/net"; nmx = 0; @@ -184,7 +184,7 @@ mxlookup(DS *ds, char *domain) nmx++; break; } - } + } } ndbfree(t); } @@ -216,14 +216,14 @@ mxlookup(DS *ds, char *domain) strncpy(mx[i].ip, tip->val, sizeof(mx[i].ip)-1); ndbfree(t); continue; - + no: /* remove mx[i] and go around again */ nmx--; mx[i] = mx[nmx]; i--; } - return nmx; + return nmx; } static int diff --git a/src/cmd/upas/smtp/smtp.c b/src/cmd/upas/smtp/smtp.c index 92873723..88d7f7a4 100644 --- a/src/cmd/upas/smtp/smtp.c +++ b/src/cmd/upas/smtp/smtp.c @@ -60,7 +60,7 @@ void usage(void) { fprint(2, "usage: smtp [-adips] [-uuser] [-hhost] [.domain] net!host[!service] sender rcpt-list\n"); - threadexitsall(Giveup); + threadexitsall(Giveup); } int @@ -656,7 +656,7 @@ data(String *from, Biobuf *b) nbytes += Bprint(&bout, "Message-ID: <%s@%s>\r\n", id, hostdomain); if(debug) Bprint(&berr, "Message-ID: <%s@%s>\r\n", id, hostdomain); - } + } if(originator==0){ nbytes += Bprint(&bout, "From: %s\r\n", s_to_c(fromline)); @@ -687,7 +687,7 @@ data(String *from, Biobuf *b) /* * send body */ - + putcrnl(uneaten, buf+n - uneaten); nbytes += buf+n - uneaten; if(eof == 0){ @@ -1109,14 +1109,14 @@ dBputc(int x) return Bputc(&bout, x); } -char* +char* expand_addr(char *addr) { static char buf[256]; char *p, *q, *name, *sys; Ndbtuple *t; Ndb *db; - + p = strchr(addr, '!'); if(p){ q = strchr(p+1, '!'); @@ -1131,7 +1131,7 @@ expand_addr(char *addr) name++; if(q) *q = 0; - + sys = sysname(); db = ndbopen(0); t = ndbipinfo(db, "sys", sys, &name, 1); @@ -1141,7 +1141,7 @@ expand_addr(char *addr) *q = '!'; return addr; } - + *(name-1) = 0; if(q) *q = '!'; diff --git a/src/cmd/upas/smtp/smtpd.c b/src/cmd/upas/smtp/smtpd.c index e59dbddd..df722c10 100644 --- a/src/cmd/upas/smtp/smtpd.c +++ b/src/cmd/upas/smtp/smtpd.c @@ -304,7 +304,7 @@ hello(String *himp, int extended) if (extended) { if(tlscert != nil) reply("250-STARTTLS\r\n"); - if (passwordinclear) + if (passwordinclear) reply("250 AUTH CRAM-MD5 PLAIN LOGIN\r\n"); else reply("250 AUTH CRAM-MD5\r\n"); @@ -1101,7 +1101,7 @@ sendermxcheck(void) * Could add an option with the remote IP address * to allow validatesender to implement SPF eventually. */ - execl(validate, "validatesender", + execl(validate, "validatesender", "-n", nci->root, senddom, user, nil); threadexitsall("exec validatesender: %r"); default: @@ -1165,7 +1165,7 @@ data(void) reply("450 %s\r\n", errx); for(l=rcvers.first; l; l=l->next) syslog(0, "smtpd", "[%s/%s] %s -> %s sendercheck: %s", - him, nci->rsys, s_to_c(senders.first->p), + him, nci->rsys, s_to_c(senders.first->p), s_to_c(l->p), errx); rejectcount++; return; @@ -1214,7 +1214,7 @@ data(void) code = 554; } else { syslog(0, "smtpd", "++[%s/%s] %s %s %s%s%sreturned %#q %s", him, nci->rsys, - s_to_c(senders.first->p), s_to_c(cmd), + s_to_c(senders.first->p), s_to_c(cmd), piperror ? "error during pipemsg: " : "", piperror ? piperror : "", piperror ? "; " : "", diff --git a/src/cmd/upas/smtp/smtpd.h b/src/cmd/upas/smtp/smtpd.h index bb982a2f..9f8cdffa 100644 --- a/src/cmd/upas/smtp/smtpd.h +++ b/src/cmd/upas/smtp/smtpd.h @@ -11,7 +11,7 @@ enum { MAXREJECTS = 100 }; - + typedef struct Link Link; typedef struct List List; diff --git a/src/cmd/upas/smtp/spam.c b/src/cmd/upas/smtp/spam.c index 723e341d..2422dfe9 100644 --- a/src/cmd/upas/smtp/spam.c +++ b/src/cmd/upas/smtp/spam.c @@ -26,7 +26,7 @@ static Keyword options[] = { "norelay", NORELAY, "verifysenderdom", DNSVERIFY, "saveblockedmsg", SAVEBLOCK, - "defaultdomain", DOMNAME, + "defaultdomain", DOMNAME, "ournets", OURNETS, "ourdomains", OURDOMS, 0, NONE @@ -84,7 +84,7 @@ getaction(char *s, char *type) return ACCEPT; for(k = actions; k->name != 0; k++){ - snprint(buf, sizeof buf, "%s/mail/ratify/%s/%s/%s", + snprint(buf, sizeof buf, "%s/mail/ratify/%s/%s/%s", get9root(), k->name, type, s); if(access(buf,0) >= 0) return k->code; @@ -435,7 +435,7 @@ cidrcheck(char *cp) if((v4peerip&m) == a) return 1; cp += strlen(cp)+1; - } + } return 0; } @@ -508,7 +508,7 @@ recipok(char *user) int pid; Waitmsg *w; static int beenhere; - + if(!beenhere){ beenhere++; validator = unsharp(validator); |