Commit Graph

72 Commits

Author SHA1 Message Date
Russ Cox
b3a20a96eb libthread: add threadmaybackground
Programs that want to background themselves now need
to define threadmaybackground returning 1.
This avoids a confusing (to people and debuggers)
extra parent process for all the threaded programs
that will never want to background themselves.
2020-12-30 00:12:14 -05:00
Dan Cross
fa325e9b42 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>
2020-01-10 14:54:30 +00:00
telephil
9389de63d7 upas/nfs: fix null date when message is sent to plumber (#263)
When fetching, messages are sent to plumber as soon as the ENVELOPE part is read.
    The date field of the message is sent when the INTERNALDATE part is read and
    there is no guarantee that this will be read before the ENVELOPE.
    This bug can be observed when using faces(1) which will retrieve messages with
    a null date and then always display a 'Jan 1' date instead of the correct one.
    The fix is to simply send the message to plumber after having read all parts,
    thus ensuring the message is complete.
2019-09-19 13:10:09 -04:00
Zach Scott
de43b1629d upas/smtp: fix TLS connections (#163)
Both `upas/nfs` and `upas/smtp` call the currently broken `tlsClient()`
from libsec. This commit copies a fix from upas/nfs into upas/smtp.

In `imapdial()`, upas/nfs replaces a process call for tlsClient with
`stunnel3` when not on Plan 9. upas/smtp calls tlsClient directly
as a function, so imapdial was copied into mxdial.c as `smtpdial()`,
and tlsClient+dial replaced with a call to smtpdial.
2018-11-14 00:24:07 -05:00
Charles Collicutt
db27122d39 upas/nfs: correctly quote IMAP LOGIN arguments
According to RFC 3501 the arguments to the LOGIN command should be
quoted strings (or length prefixed string literals). Without quoting,
authentication to some IMAP servers (e.g. Dovecot) will fail.
2018-10-05 18:15:28 +02:00
David du Colombier
a6a3528868 upas/nfs: fix warnings
decode.c:146:8: warning: variable ‘argv’ set but not used
fs.c:953:47: warning: variable ‘reset’ set but not used
imap.c:348:6: warning: variable ‘prefix’ set but not used

Updates #114.
2017-10-13 10:16:20 +02:00
Gleydson Soares
71de840f05 upas/nfs: search for stunnele3 in $PATH
Do not hardcode stunnel directory path, just make sure that is installed
in user '$PATH'. it is required for 'mailfs -t' TLS support, so printout
an error string if it was not found.

Tested with latest stunnel version 5.17 on OpenBSD and macosx.

% mailfs -t imap.gmail.com ; echo $?
0

Change-Id: Icbd507c7efa81ef2aa7aed37bec5f639b37526cb
Reviewed-on: https://plan9port-review.googlesource.com/1280
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-06-29 02:25:42 +00:00
David du Colombier
32c6e78c6c upas: fix nil pointer dereference
R=rsc
https://codereview.appspot.com/92650043
2014-06-05 18:46:28 +02:00
Russ Cox
c99867c9e0 upas/common: rename aux to auxx
TBR=rsc
https://codereview.appspot.com/107760043
2014-06-03 14:30:52 -04:00
David du Colombier
bae34df843 upas: fix warnings
smtp.c:232: warning: comparison with string literal results in unspecified behavior
smtp.c:244: warning: comparison with string literal results in unspecified behavior
marshal.c:1179: warning: variable ‘err’ set but not used

LGTM=rsc
R=rsc
https://codereview.appspot.com/93290043
2014-05-15 06:28:54 +02:00
Akshat Kumar
6541f1798b mailfs: support for UTF-8 searches
UTF-8 searches with the SEARCH command must
be conducted in two steps: the first sends
the SEARCH command with the length of the
UTF-8 encoded string and the second sends
the literal search term. The searches need
to not be quoted.

R=rsc, david.ducolombier, rsc, 0intro
CC=plan9port.codebot
https://codereview.appspot.com/13244043
2013-09-06 16:09:29 -04:00
David du Colombier
0c9524b721 mailfs: add -u user argument
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5435052
2011-11-28 09:21:01 -05:00
David du Colombier
2fc68b6d8e mailfs: small fixes and plan 9 support
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5429044
2011-11-22 14:09:52 -05:00
David du Colombier
38bcdc42b5 upas: fix segfault when host not found
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5370105
2011-11-21 08:40:17 -05:00
Richard Miller
4a8214b1ec upas/smtp: fixes for authenticated connections
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4967049
2011-08-31 07:40:10 -04:00
Fazlul Shahriar
dcdc3af143 mailfs: try to use the right version of stunnel
R=rsc
http://codereview.appspot.com/4876044
2011-08-16 15:50:48 -04:00
David du Colombier
7fb06adf54 upas/smtp: remove reference to /net in mxdial
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4535108
2011-06-02 09:31:59 -04:00
Russ Cox
18ee9a80f1 mailfs: try tlsclient program before stunnel
R=rsc
http://codereview.appspot.com/1169043
2010-05-11 08:25:08 -07:00
Russ Cox
478054e0a7 mailfs: plumb messages correctly even if body comes before header 2008-12-06 18:54:02 -08:00
Russ Cox
c5f884244d mailfs: correct use of tcs for large inputs 2008-07-14 17:38:46 -04:00
Russ Cox
2127ed4b02 upas: add misc to mkfile 2008-07-10 11:09:07 -04:00
Russ Cox
b2bf14149a nedmail: add -S parameter for alternate mail service 2008-07-10 11:08:53 -04:00
Russ Cox
518f0a1d31 upas/fs: accomodate new post9pservice 2008-05-10 13:43:14 -04:00
Russ Cox
24726c810b mailfs: add -m option 2008-05-10 13:43:01 -04:00
Russ Cox
865e8b0fb3 mailfs: handle windows-1251 correctly
now my cyrillic spam displays right!
2008-05-06 14:25:26 -04:00
Russ Cox
83ab7d8896 merge 2007-11-27 15:39:06 -05:00
Russ Cox
e0e75ef7f4 upas/smtp: remove intermediate files 2007-11-27 15:38:29 -05:00
Russ Cox
e84044be84 mailfs: add -r flag to specify mail root (Richard Bilson) 2007-11-05 10:55:26 -05:00
Russ Cox
f1ea0d2916 mailfs: handle NIL body 2007-11-05 10:52:30 -05:00
Russ Cox
6b0a42ed04 mailfs: fix handling of FLAGS response (Robert Vollmert) 2007-08-22 11:21:52 -04:00
rsc
eb44dca240 mailfs: fix subject formatting 2007-06-25 02:42:09 +00:00
rsc
e12bc7cd5b silence 2007-06-23 06:35:51 +00:00
rsc
de7b2cd774 refresh on i, y commands 2007-06-23 06:30:41 +00:00
rsc
bb70a84b1f bug fixes:
list message 1.
give correct contents for raw, rawheader, rawbody.
provide filename and charset in mime attachments.
only rename mailboxes named mbox* not mbox*.
2007-06-23 06:12:50 +00:00
rsc
73ac88baa7 remove debugging print 2007-06-18 14:44:03 +00:00
rsc
827018c4ec clean temporary files 2006-07-23 14:43:55 +00:00
rsc
141d600972 use file names for attachments 2006-06-30 04:53:51 +00:00
rsc
603d6d896f fix comments 2006-05-24 15:02:53 +00:00
rsc
25c823399b better spam (Lou Kamenov) 2006-05-21 18:40:33 +00:00
rsc
82f56ecee2 useless warning 2006-05-21 18:40:23 +00:00
rsc
1b827fbc0c better locking 2006-05-21 18:40:15 +00:00
rsc
20bd3ca2e2 new 2006-04-09 00:24:28 +00:00
rsc
cbeb0b26e4 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
rsc
3d038c325b utf in subject 2006-03-31 17:51:10 +00:00
rsc
17157e4aa8 update lucida 2006-03-20 02:25:59 +00:00
rsc
b99162de12 + is not a valid tag (Lou Kamenov) 2006-03-03 17:49:38 +00:00
rsc
fe02cd5957 cleanup 2006-03-03 14:11:50 +00:00
rsc
c772232802 cannot say isnumber 2006-02-28 20:12:18 +00:00
rsc
d4baecd94d various fixes 2006-02-26 15:20:28 +00:00
rsc
e269d00c9e oops 2006-02-25 21:14:32 +00:00