Sharing Media from a Central Server with Samba Notes 4

Posted by Joshua Schmidlkofer 06/10/2011 at 17h04

Just a quick blub on my Ashbyte.com page about the setup. Nothing special.

Samba Media Mounts

Postfix, SASL, SMTHAUTH, TLS and Relay

Posted by Joshua Schmidlkofer 01/10/2011 at 17h09

Relaying with Postfix, SASL, Authentication and TLS

Create All The Files!

/etc/postfix/sasl/saslpass

mail.myserver.com relayuser:my password with spaces

/etc/postfix/tls_policy

[mail.myserver.com]:587 encrypt protocols=TLSv1 ciphers=high
[mail.myserver.com]:msa encrypt protocols=TLSv1 ciphers=high
[mail.myserver.com]:submission encrypt protocols=TLSv1 ciphers=high

Set File Permissions on SASL password file

chown root:root /etc/postfix/sasl/saslpass
chmod 600 /etc/postfix/sasl/saslpass

Hash All The Files!

postmap /etc/postfix/sasl/saslpass
postmap /etc/postfix/tls_policy

Configure All The Postfix!

## Since I am using TLS, I will allow plain text and LOGIN (which are disabled by default
postconf -e "smtp_sasl_security_options = "

## Enable SASL for outgoing SMTP traffic.
postconf -e  "smtp_sasl_auth_enable = yes"

### Add the SASL password map
postconf -e " smtp_sasl_password_maps = hash:/etc/postfix/sasl/saslpass"

### Set the TLS Policy map so that my mail server uses TLS w/ the appropriate policies.
postconf -e " smtp_tls_policy_maps = hash:/etc/postfix/tls_policy"

### Add the relayhost as my upstream mail server, note the format, it's important.
postconf -e "relayhost = [mail.myserver.com]:587"

Brief Explanation

I needed to relay from my in-house Linux box, which runs Postfix (on Ubuntu, incidentally), through my colo-hosted mail server. This recipe will work for Comcast, Verizon, Frontier, and Gmail. Those are the only places I have tested it. All of those mailservers have a Submission port (587) which accepts TLS.

This should work for just about any setup.

Props

There are tons of howto's. I own much to Bens Bits, Patrick Koetter, Postfix Documentation, and of course, Google.

Extreme Neworks, VMware and NetApp Configuration Notes (w/ VLANs)

Posted by Joshua Schmidlkofer 21/09/2010 at 15h21

In which Joshua discusses his new-found love of Extreme Networks Switches.

Amazingly 1337 Gmail Searches

Posted by Joshua Schmidlkofer 04/08/2010 at 08h31

In which Joshua makes a post elucidating his findings regarding advanced Gmail Searches, which despite availability of said information, was nonetheless challenging to locate.

The Unexpected Gift of Incompatibility

Posted by Joshua Schmidlkofer 08/09/2009 at 10h05

Lesser Apps

Applications are like work habits or practices or anything else in life. The ones you have seem like the best when you find them. I have discovered - over and over - that my own desire for excellence is easily pleased but never satisfied. The darker side of this ambition leads to perfectionism, and the absence of it leads worthlessness. In both extremes you'll find identical results: mediocrity, insignificance and long-term failure.

Evolution

I have been using MenuMeters for quite some time and I enjoyed it. Although the software answered questions and needs since it's install, it has never advanced. In fact, according to the FAQ, nothing new has happened since January 2006. I have been displeased with the lack of new features, or improved utility, or any sort of ongoing growth in the software. However, the fact that it worked and I didn't have to answer the problem put it into the "works-even-if-it's-not-ideal" category.

Change

Snow Leopard brought out incompatibility, and with that it was time for change. I uninstalled MenuMeters prior to installing SNeopard, and therefore had no side effects. However, my O.C.D. need to bury my menu bar in seas of icons and text would not rest. Deliverance in the means on an email from a friend arrived this morning.

Answer

The interesting folks over at iSlayer have a variety of useful tools, though this is my first experience with them. I downloaded and installed iStat Menus. It's a beautiful thing. I don't know if it leaks memory, I don't know if it farks with SpotLight, I don't even know if it's going to crash when I sleep my Mac. What I do know is this.

  • It has all the graphs, measures and charts which I required.
  • It finally works with temperature. (Something which MenuMeters hadn't since Leopard.)
  • It shows definite signs of a tool which is moving and not stagnate.
  • It is free.
  • It's better in every way - so far.

I can always put up a post about the horrors of pogrom and ghettos if it turns out to be an evil socialist application. (e.g. if Safari needs 500M so do I). However, the first blush indicates that i should have looked over there sooner!

Muchas Gracias Señor Piñera for your recommendations.

Snow Leopard Special

Posted by Joshua Schmidlkofer 02/09/2009 at 09h25

I have to say something

The most annoying feature to geek-users of Safari is the practice of uncompressing downloaded .gz files. I find the whole auto-unzip generally useful. It's a problem whenever I do things like downloading the latest pfSense. I need the original compressed tarball. It has a checksum which must match for clean upgrades. As we all know, Safari helpfully uncompresses it an leaves the tarball - a waste - for me.

Today I forgot the special right-click-Download-file step and ended up with more .tar files. There was a new behavior though. The original .gz files were in the Trash! That was good thinking. Not sure if this is a Safari change or a Sneopard change, but regardless. I like it.

Hurray for the last bastion of un-themeable GUIs and retarded iPhone Application Rejection policies. They got one thing correct.

Additional Note

I recovered roughly 14GB of disk space on my MacBookPro when I installed Sneopard. impressive. 14 gb. I just keep wondering: What the hell did it remove? I have not seen or heard of anyone else recovering so much. The best other than me was 12GB, so far. That is doing it right as well.

OpenVZ and Fedora Core

Posted by Joshua Schmidlkofer 30/07/2008 at 08h44

OpenVZ can have various heinous problems with udev. Most often, you cannot enter the VZ from the admin, and you cannot connnect via SSH.

beast / # vzenter 51
enter into VE 51 failed
Unable to open pty: No such file or directory

In Fedora you can make a simple change to /etc/udev/makedev.d/50-udev.nodes

--- 50-udev.nodes~      2008-01-10 16:00:08.000000000 +0000
+++ 50-udev.nodes       2008-07-30 15:44:07.223092644 +0000
@@ -1,4 +1,5 @@
 # These device have to be created manually
+ptmx
 tty1
 tty2
 tty3

e.g. Simply just add 'ptmx' to the file someplace. This is fairly simple and seems to work very well.

flac to mp3

Posted by Joshua Schmidlkofer 30/05/2008 at 20h41

I love flac files, and I always rip my CDs in EAC - straight to FLAC. The problem is that a couple months ago I was transfering some of my older music to my MacBook and I discovered something awful. The horror known as iTunes doesn't grok Flac. I failed to find a single plugin.

First, I sought to convert my FLACs to ALEs - because it's rad. But I gave up. I finally discovered someone already having written what I wanted - in python - w00t.

flac2mp is an awesome little script. He got it from "ogg 2mp3", and I like it.

OpenVZ vs. Scalix

Posted by Joshua Schmidlkofer 20/03/2008 at 22h55

We win again. I wanted to run Scalix for a client, inside of a VE/CT/whatever, and I tried using Fedora Core 7 to do so. I was unable to make the installer work and didn't see much in the way of help from Scalix. Here is a link to the Bugzilla page. (Login Required) Here are the important bits. Aside from discouragement I didn't get anything from Florian... Nothing except responses that was. No one else seems to give a damn if I even exist.

Whatever. The point is that with some minor extra-effort, Scalix does indeed work inside of an OpenVZ container on Linux. My host OS is gentoo, running 2.6.18-028stab053.

The Scalix package is pretty great, just up the Java memory once you have it running. The instances (two) on a system shared by two different companies work great. We migrated to Scalix from Kolab. Outlook users (all two) are happy. Thunderbird users didn't see too much of a change.

Yay for us.

inotify

Posted by Joshua Schmidlkofer 03/03/2008 at 12h54

We were messing w/ Postfix and Cyrus IMAPD today. Our prime goal was making a sensical approach to authenticating against a PostgreSQL-based directory. LDAP (OpenLDAP and FDS) based tools sucks for most people. Using native-box-auth is actually quite messy. The mail data cannot be easily associated with the users. You end up with data spread everywhere.

Our basic tenants are:

  • Simple Database Schema - there is no need for a highly relational approach for something so simple.
  • Embedded procedures where possible.
  • Simple front-end.

My esteemed colleague John implemented our thoughts. He ended up with a few PGSQL functions, a couple views and a very straight-forward process.

The actual setup for IMAPD and Postfix is nearly as simple. He will be documenting it at his site later. For now, we wanted to verify the actual behaviour of postfix and imapd during SASL auth in realtime. We turned to inotify. I install pyinotify, and used thier Quick Start script. This ended up leaving me a simple script which monitored the directories which I wanted.

This will not show you files which failed to open. But it does good enough.

import os
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent

wm = WatchManager()

mask = EventsCodes.INDELETE | EventsCodes.INACCESS | EventsCodes.INOPEN | EventsCodes.INCREATE # watched events

class PTmp(ProcessEvent):

def process_IN_CREATE(self, event):
    print "Create: %s" %  os.path.join(event.path, event.name)

def process_IN_DELETE(self, event):
    print "Remove: %s" %  os.path.join(event.path, event.name)

def process_IN_ACCESS(self, event):
    print "Access: %s" % os.path.join(event.path, event.name)

def process_IN_OPEN(self,event):
    print "Open: %s" % os.path.join(event.path, event.name)

notifier = Notifier(wm, PTmp()) wdd = wm.addwatch('/etc', mask, rec=True) wdd = wm.addwatch('/usr/lib/sasl2', mask, rec=True)

while True: # loop forever

try:
    # process the queue of events as explained above
    notifier.process_events()
    if notifier.check_events():
        # read notified events and enqeue them
        notifier.read_events()
    # you can do some tasks here...
except KeyboardInterrupt:
    # destroy the inotify's instance on this interrupt (stop monitoring)
    notifier.stop()
    break