Can an email go 500 miles in 2025?

https://news.ycombinator.com/rss Hits: 11
Summary

Once upon a time, there was a university president who couldn’t send an email more than 500 miles, and the wise sysadmin said that’s not possible, so the president said come to my office, and lo and behold, the emails stopped before going 500 miles. Has technology improved? Can we send an email farther than 500 miles in 2025?There’s a lot to the story that’s obviously made up, but if we fix the details so that it can happen, we can reproduce it.connectWe need some code to do a nonblocking connect that will timeout quickly. This is mostly copied from the examples in getaddrinfo for lookups and connect, and connect for the nonblocking check, adapted slightly to have a very short timeout and report errors.The poll timeout is 3ms, as specified by the lore. I think this is nonsense, why would an invalid or incomplete sendmail configuration default to three milliseconds? But that’s the time you get backing a lightspeed delay out of 500 miles. We’ll see if it matters.code#include <sys/types.h> #include <sys/socket.h> #include <sys/select.h> #include <poll.h> #include <netdb.h> #include <err.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <stdio.h> int connect_wait(int s) { struct pollfd pfd[1]; int error = 0; socklen_t len = sizeof(error); pfd[0].fd = s; pfd[0].events = POLLOUT; error = poll(pfd, 1, 3); if (error == -1) return -1; if (error == 0) { errno = ETIMEDOUT; return -1; } if (getsockopt(s, SOL_SOCKET, SO_ERROR, &error, &len) == -1) return -1; if (error != 0) { errno = error; return -1; } return 0; } int main(int argc, char **argv) { struct addrinfo hints, *res, *res0; int error; int save_errno; int s; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo(argv[1] ?: "www.openbsd.org", "www", &hints, &res0); if (error) errx(1, "%s", gai_strerror(error)); s = -1; for (res = res0; res; res = res->ai_next) { s = socket(res->ai_family, res->ai_socktype | SOCK_NONBLOCK, res->ai_protocol);...

First seen: 2025-07-08 14:30

Last seen: 2025-07-09 00:32