72 Mail Sometimes, like a rare fungus, Unix must be appreciated at just the right moment. For example, you can send mail to a mailing list. But not if someone else just happens to be running newaliases at the moment. You see, newaliases processes /usr/lib/aliases like so much horse meat bone, skin, and all. It will merrily ignore typos, choke on peril- ous whitespace, and do whatever it wants with comments except treat them as comments, and report practically no errors or warnings. How could it? That would require it to actually comprehend what it reads. I guess it would be too hard for the mailer to actually wait for this sausage to be completed before using it, but evidently Unix cannot afford to keep the old, usable version around while the new one is being created. You see, that would require, uh, actually, it would be trivial. Never mind, Unix just isn’t up to the task. As the alias list is pronounced dead on arrival, what should sendmail do? Obviously, treat it as gospel. If you send mail to an alias like ZIPPER-LOVERS which is at the end of the file, while it’s still gur- gitating on ACME-CATALOG-REQUEST, sendmail will happily tell you your addressee is unknown. And then, when it’s done, the new mail database has some new bugs, and the old version—the last known version that actually worked—is simply lost forever. And the person who made the changes is not warned of any bugs. And the person who sent mail to a valid address gets it bounced back. But only sometimes. STEP 4: Put the mail into the correct mailbox. Don’t you wish? Practically everybody who has been unfortunate enough to have their mes- sages piped through sendmail had a special message sent to the wrong reciepient. Usually these messages are very personal, and somehow uncan- ningly sent to the precise person for whom receipt will cause the maximum possible damage. On other occasions, sendmail simply gets confused and can’t figure out where to deliver mail. Other times, sendmail just silently throws the mail away. Few people can complain about this particular sendmail mannerism, because few people know that the mail has been lost. Because Unix lies in so many ways, and because sendmail is so fragile, it is virtually impossible to debug this system when it silently deletes mail:
Subject: Returned Mail: User Unknown 73 Date: Tue, 30 Apr 91 02:11:58 EDT From: Steve Strassmann straz@media-lab.mit.edu To: UNIX-HATERS Subject: Unix and parsing You know, some of you might be saying, hell, why does this straz guy send so much mail to UNIX-HATERS? How does he come up with new stuff every day, sometimes twice a day? Why is he so filled with bile? To all these questions there’s a simple answer: I use Unix. Like today, for example. A poor, innocent user asked me why she suddenly stopped getting e-mail in the last 48 hours. Unlike most users, with accounts on the main Media Lab machine, she gets and reads her mail on my workstation. Sure enough, when I sent her a message, it disappeared. No barf, no error, just gone. I round up the usual suspects, but after an hour between the man pages for sendmail and other lossage, I just give up. Hours later, solving another unrelated Unix problem, I try “ps -ef” to look at some processes. But mine aren’t owned by “straz,” the owner is this guy named “000000058.” Time to look in /etc/ passwd. Right there, on line 3 of the password file, is this new user, followed by (horrors!) a blank line. I said it. A blank line. Followed by all the other entries, in their proper order, plain to you or me, but not to Unix. Oh no, whoever was fetching my name on behalf of ps can’t read past a blank line, so it decided “straz” simply wasn’t there. You see Unix knows parsing like Dan Quayle knows quantum mechanics. But that means—you guessed it. Mailer looks in /etc/passwd before queuing up the mail. Her name was in /etc/passwd, all right, so there’s no need to bounce incoming mail with “unknown user” barf. But when it actually came down to putting the message someplace on the computer like /usr/mail/, it couldn’t read past the blank line to identify the owner, never mind that it already knew the owner because it accepted the damn mail in the first place. So what did it do? Handle it the Unix way: Throw the message away without telling anyone and hope it wasn’t important! So how did the extra blank line get there in the first place? I’m so glad you asked. This new user, who preceded the blank line, was added by a well-meaning colleague using ed 3 from a terminal with
Previous Page Next Page