Some options for logging attachment information in an Exim environment
Suppose, not entirely hypothetically, that you use Exim as yourmailer and you would like to log information about the attachmentsyour users get sent . There are anumber of different ways in Exim that you can do this, each withtheir own drawbacks and advantages. As a simplifying measure, let'sassume that you want to do this during the SMTP conversation sothat you can potentially reject messages with undesirable attachments(say ZIP files with Windows executables in them).
The first decision to make is whether you will
How Exim's ${run ...} string expansion operator does quoting
Exim has a complicated string expansion system with various expansion operations. One of these is ${run} , whichruns a command to get its output (or just its exit status if youonly care about that). The documentation for ${run} says, in part:
- ${run{
}{ }{ }} - The commandand its arguments are first expanded as one string. Thestring is split apart into individual arguments by
Some notes on UID and GID remapping in the Illumos/OmniOS NFS server
As part of looking into this whole issue ,I recently wound up reading the current manpages for the OmniOS NFSserver and thus discovered that it can remap UIDs and GIDs forclients via the
uidmap=andgidmap=NFS share options. Serverside NFS ID remapping is not as neat or scalable as client sideremapping, but it does solve my particular problem , so I've now played around with ita bit and have some notes.The feature itself is an Illumos one and is about two years oldnow ,
It turns out that viruses do try to conceal their ZIP files
One of the interesting things that happens when you start to loginformation about what types of files your users get in email is that you get to discover certain sortsof questionable things that people actually do ('people' in a loosesense). Here's one interesting MIME part, extracted from our logs:
attachment application/octet-stream; MIME file ext: .jpeg; zip exts: .js
The 'attachment' bit is the Content-Disposition and the nominalMIME type comes from the Content-
Keeping around an index to the disk bays on our iSCSI backends
Today, for the first time in a year or perhaps more, we had a diskfailure in one of our iSCSI backends (or at least we detected it today).As part of discovering that I was out of practice at dealing withthis , Iwound up having to hunt around to find our documentation on howiSCSI disk identifiers mapped to drive bays in our 16-bay Supermicrocases. This made me realize that probably we should do better atthis.
The gold standard would be to label the actual
A feature I wish the Linux NFS client had: remapping UIDs and GIDs
My office workstation is a completely standalone machine, deliberatelynot dependent on, say, our NFS fileserver infrastructure . As a sysadmin's primary machine, there areobvious motivations for this and it's not something I'm ever goingto change, but at the same time it does have its drawbacks and it'dbe nice to sometimes NFS mount my fileserver home directory on myworkstation.
Unfortunately there is a little but important obstacle. For peculiarhistorical reasons, the UID and GID of my local workstation account
An irritating little bug in the latest GNU Emacs Python autoindent code
I really like having smart autoindent in my editor when writingcode, Python code included. When it works, autoindent does exactlywhat I would do by hand, does it easier, and in the process showsme errors in my code (if the autoindent is 'wrong', it is a signalthat something earlier is off). But the flipside of this is thatwhen autoindent goes wrong it can be a screaming irritation, as Iflip from working with my editor to actively fighting it.
Unfortunately the latest official
cal's unfortunate problem with argument handling
Every so often I want to see a calendar just to know things like whatday of the week a future date will be (or vice versa). As an old Unixperson, my tool for this is
cal. Cal is generally a useful program,but it has one unfortunate usage quirk that arguably shows a generalissue with Unix style argument handling.By default,
caljust shows you the current month. Suppose thatyou are usingcalat the end of June, and you decide that youwant to see
How backwards compatibility causes us pain with our IMAP servers
One of the drawbacks of operating a general purpose Unix environmentfor decades is that backwards compatibility can wind up causing youto get trapped in troublesome situations. In particular, the weightof backwards compatibility has wound up requiring us to configureour IMAP server environment in a way that causes various problems.
Unix IMAP servers generally have a setting for where the variousIMAP mailboxes and folders are stored on disk. Back when we first set up UW-IMAP at least two decades ago,we wound up with a situation where UW-
Some advantages of using argparse to handle arguments as well as options
I started using Python long enough ago that there was only the getopt module ,which was okay because that's what I was used to from C and otherUnix languages (shell, Perl, etc), and then evolved for a bit through optparse ; Ionly started using argparse relativelyrecently. As a result of all of this background, I'm used to thinkingof 'argument handling' as only processing command line switches andtheir arguments for you, and giving you back basically a list ofthe remaining
Menu