On this page I would like to share some Unix related tips I came along, often related to Mac OS X. Hopefully this page will grow to some serious info someday.
Fighiting Spam with Postfix:
There are many ways to fight the ever growing number of spam-mails, and this is just one of them.
Having your own domain allows me to use as many eMail adresses as I like, so usually every website gets a different address from me. Usually they all go to a certain account until I find out one of them gets spammed to. When an address gets "compromised" it can be blocked.
As soon as I get my weblog running I will expand on the subject, right now some links will have to do:
- Basic Postfix UBE controls
- I found this explaination at Security Sage somewhat clearer. Don't forget to do a postmap /etc/postfix/access_recipients to generate the .db file
- check_relay_domains must be the last rule in smtpd_recipient_restriontions. Here is why.
Perl Tips:
If you are behind a firewall, CPAN will probably need passive ftp. A general hint how to set this is here. On MacOSX, use `cd /Library/Perl/Net; sudo libnetcfg` to change the setting. Depending on where your Perl Library is, use the path /System/Library/Perl/Net instead.
zsh, colors, and the MacOS Terminal:
To use colors in your zsh promt check this Z Shell fan page. A prompt I find useful is:
RPS1=$'%{\e[0;34m%}%B%~%b%{\e[0m%}'
This prints the current directory on the right side of the terminal in bold and light blue.
A nice script to show all the colors is available here
WebDav:
I am running a WebDAV server on a Debian Apache 1.32. It is actually not that hard, the best starting point is the installation page at WebDAV.org.
One interesting point is setting your WebDAV up to publish iCal calendars. There is one important detail here: Get mod_auth_digest, because iCal will choke on mod_digest, and you surely don't want basic authentification. A neat trick is listed on under the complex configuration section, i.e. how to prevent dynamic pages to be processed. This will be necessary if you - like me - plan to maintain your site through DAV. I will put a more detailed tutorial on WebDAV here sometimes.
VIM and XCode:
One of the things I like best about
Apple's XCode is the fact that I don't have to use the IDE to edit code. I use
vim. Here are a few tweaks I found useful:
First, I wrote a little compiler plugin, which is to be put into
$VIM/vim62/compiler/ and can be downloaded
here. It's actually not much of a plugin, the only change is setting int
makeprg to
pbxbuild -activebuildstyle. The errorformat is gcc, so no need to make any changes there.
setlocal makeprg=xcodebuild\ -activebuildstyle
The other changes go into .vimrc (updated Sep 17 2003):
: autocmd BufEnter *.h,*.strings :set ft=objc
" To override the c filetype for h files
: autocmd FileType objc compiler pbx | set include=^#\s*import | set formatoptions=croql cindent comments=sr:/*,mb:*,ex:*/,://
" The compiler directive and the include setting are the important bits here.
" See :help compiler and :help include for more info. The formatoptions are up
" to your personal taste.
I have some experience with Apache, vim, perl, Mac OS X and some other stuff, and I am generally happy to give advice on these things.
Return to vonBelow·Com