return to I Love My Journal
A Little Closer to Center...
Musings about Life, Linux, and Latter-day Saints.
Pages
About Me
Links


Tags
PERSONAL 520
SPIRITUAL 416
LDS 312
BOOK OF MORMON 237
SCRIPTURES 154
STUDIO-JOURNEY 129
RELIGION 112
LINUX 79
COMPUTERS 65
LIFE 60
GENERAL CONFERENCE 46
GENTOO 39
MISCELLANEOUS 37
MUSIC 37
PROGRAMMING 33
CARS 29
FAMILY 23
MICROSOFT 23
AUDIO 21
I LOVE MY JOURNAL 18
FUN 15
CHILDREN 12
CURRENT EVENTS 10
NATURE'S WAY 10
VIDEO 9
DRM 9
CONEXM 7
BABBLINGS 7
PROVO CITY CENTER TEMPLE 6
FRIENDS 6
HEROD THE FINK 5
COMPUTER HARDWARE 5
GAMES 5
DRUMS 4
HAND OF GOD 3
AUDIO HARDWARE 3
STUDIO 3
KDENLIVE 3
ADVERSITY 3
GENERAL INSANITY 3
THANKS4GIVING 2
CATS 2
CHURCH NOTES 1
FOREVERGREEN 1
POLITICS 1
POETRY 1
YOUTH CONFERENCE 1
GOSPEL 1
PARENTING 1
MY JOURNAL 1
EVERYDAY THOUGHTS 1


RSS Feed

RSS FeedSubscribe!
Mon - May 07, 2007 : 04:55 am
no mood
   rated 0 times
>>next>>
<<previous<<
RPM Insanity - Postfix + Courier + MySQL
Okay... I don't have a lot of time to write, but for goodness sake, if I didn't - I'd be doing myself a great dis-service.

I just spent the past 6 hours trying to follow a simple tutorial to get MySQL authentication against Postfix + Courier so I could setup an emergency email server our company desperately needed since Friday.

I woke up this morning at midnight to get to work. I didn't want to break the sabbath, so I was just hoping the configuration / installation would be at least semi-easy. This wasn't too much of a stretch, since I've been the admin of various gentoo servers over the past few years. Well, I was half-way right.

If I would have been using gentoo, the installation and configuration would have been done about 4 hours ago. Let me back up.

Saturday night, three admins here spent the night / morning getting a server ready for configuration. One of the two admins here is a SuSE whiz and since our CTO here is insanely anti-gentoo (only heaven knows for whatever reason), he was going to take over the main server configuration and I was to provide backup support where ever it was needed. Totally cool. I don't mind being the backup since configuring an RPM-based Linux distro is FAR, FAR, FAR away from what I ever will want to do ever again.

Well... Saturday night went fine, but....

Sunday, I went home and took a couple of naps to prepare for this morning's duties. After my nap, I called my manager to see the status, and he informed me that Scott (the SuSE whiz) was at the hospital with his wife, having their 2nd baby (a little boy!). Wow! Congratulations, Scott! That's awesome!

So, since my manager (one of the three techs) is an MS-SQL DBA, and doesn't know very much about Linux at all, that put me in the hot-seat to get an email server running by this morning (3 hours from now it has to be working 100%).

"Cool", I thought. I'll just go in, and get it set up. No biggie.

1 hour after I arrived here, I had MySQL tables all set up, courier-authlib installed and configured, as well as postfix. I started it all up and tried to send my first email to the box.

I sent the message and almost immediately, I got a message saying "Screw you."

So... I started debugging logs and whatnot, and quickly found out that Scott had got a little ways into the email configuration sometime Sunday morning, and had tried to configure the email with aliases. I was trying to do it with virtual hosts / MySQL. The alias table was overriding the whole MySQL config, so I deleted the alias config parameter, tried to sent / receive email again with exactly the same resulting message.

Now, for the next 5 hours (until about 10 minutes ago), I was banging my head on every conceivable problem, going through multiple tutorials and scouring every log I could find. Nothing was making sense, until I read in a tutorial somewhere "Make sure the MySQL modules are loaded in Postfix."

ah-hah!

So, I loaded YaST2, typed in "postfix-mysql" in the search bar, and..... nothing came up. So... I searched for it online, and found it using pbone.net. I downloaded the file, wondered what chaos I was going to create by inserting it using RPM (because I have no idea how to integrate the RPM into the yast repository), but I didn't care. So I ran #rpm -Uvh postfix-mysql, said a little prayer, and tried to send a message.

Success! The message was sent!

I tried to get the message I had just successfully sent to myself. "Screw you." came up almost immediately. gah....

Another hour went by before I figured out how to enable intense debugging in the courier-authlib module. I restarted the service, and debugging output told me that it couldn't find libauthmysql.so. That's a problem. I immediately knew it must be because I didn't have yet another RPM to install. So, I found it (of course, it's not in YaST), downloaded it, installed it, restarted the courier service and tried to get test messages.

Bingo.

Moral of the story is this:

Why in the world would anyone want to go through the havoc of having multiple RPMS needed to do a job, but not knowing which ones, and not having a system smart enough to say "Hey, you might wanna go grab postfix-mysql.rpm, and courier-authmysql.rpm, because you're gonna need em'."? Why, why, why!??!

With gentoo, it would be overly obvious due to the simple USE flags set up to tell me exactly what options are installed into the packages with which I am working. I would have known the problem within seconds by simply running

#emerge -pv postfix courier-authlib

The USE flags would tell me exactly what the problem was.

Now, I'm sure some of you are thinking "Yeah, but man... it takes FOREVER to compile using gentoo!" My reply is: "Yeah... and I was in an RPM abyss of not knowing what options are compiled in, and what packages are needed due to the inability to compile my own options for 5 FREAKING HOURS!" Compiling postfix and courier-authlib would have taken about 20 minutes.

gentoo++