This is a little long, but it is well worth the read for newbies, and some
of you 'old timers' may think back upon this and chuckle... if not, the
answer to the problem without the how "i gots theres", is at the bottom of
this email.





Original problem: new loads of Mandrake Linux (6 then 6.1) had worse effects
for mailing on my system.

I tried to stay away from Sendmail because I've not found ANYTHING readable
on sendmail that doesn't take a good stiff drink or two to help me muddle
through.

So .. Mandrake.... Postfix simple config file, well commented...

Mandrake installed like a dream... until friends started telling me that
half their emails were not getting answered.

I then started testing... Mind you the best way to test your mail is to
directly telnet into port 25 of your server, so that you KNOW what is
happening at that stage


(newbies, telnet generally refers to a way to get a 'console' or terminal
screen that allows you to log into your linux box.  Telnet communicates
normally on port 23.  SMTP Mail goes across on port 25, and is english for
the most part, so if you tell your telnet program to connect you with port
25 instead of port 23, you can talk and hear back from your SMTP services)


Looking for help I posted to several areas, and one email to Wietse, the
super brain that created the program in the first place.  It took a while to
get a response, maybe after him sifting through it was my one word subject
that caught his attention: Help!


I received an email from Wietse, he probably laughed knowing that I wasn't
sure where to start.

He told me to look for a mail log in the log folder or something similar.

I found where the log files were, found an error, but still could not fix
it.  A crucial piece was missing.


Here's a clip from the log file:
 (Oct 23 20:35:42 treborg2 <- removed this from beginning of lines below)

 postfix/local[3004]: fatal: open database /etc/aliases.db: Invalid argument
 postfix/qmgr[2998]: warning: mail_scan_any: got EOF; expected: string
 postfix/master[461]: warning: process /usr/lib/postfix/local pid 3004 exit
status 1
 postfix/master[461]: warning: /usr/lib/postfix/local: bad command
startup -- throttling
 postfix/qmgr[2998]: warning: private/local: malformed response


>From this I could see it did not like the alias database.


prior to this, I had this error:
 postfix/local[692]: fatal: open database /etc/postfix/aliases.db: No such
file or directory




And I'm sure we ALL hate those "No Such" my a** messages, because as soon as
we get them we confirm that the files are there and even do the tricks like
in this case, copied the file from "aliases" to "aliases.db"  and upon
searching our computers we find other files already named aliases.db so like
you'd do I copied those files there.

Thais where the light started shining today.. not much mind you, more like a
D cell battery attempting to light a 120watt bulb.

I had already tried several times to change in the Main.cf file to tell it
where the database was sitting, to whether it had hash or dbm or db in front
of the name and so on...

NO luck.


This is what I took from the main.cf to show you the uses of the word
aliases:

[ grep aliases /etc/postfix/main.cf ]

#alias_maps = dbm:/etc/aliases
alias_maps = hash:/etc/postfix/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
# are built with "newaliases" or "sendmail -bi".  This is a separate
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
alias_database = hash:/etc/postfix/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases


** AND mind you that section that says "# are built with newaliases..."
meaning the command newaliases



Now that I knew where to look for the error messages, I purposely changed
the place where I said the file was to see how the error changed, and I
started looking at that error message.

and then I had another error... I tried wiping the system and installing
RH6.1 (I'm sorry, it WAS a moment of weakness, I could get it free via
download, and I had liked their 5.1 version so please forgive me).

Of course redhat is still sticking with Sendmail.

I thought I'd try it.. hey.. I was able to at least receive mail again...
but my major need for a mail system at the office is NOT so that I can have
it do my office mail.

I need that box because at my house, resources are limited, so instead of
paying $5 bucks a head for email addresses, I've got extra computers and
parts out the ying-yang, so a cheap pc, cheap os, relatively free mail.

Oh think were're not cheap... 5 computer users all running through a home
network using a 56k modem on a 24/7 dialup account through Earthlink.. THATS
CHEAP!

oh yeah...back to the story...


SO I installed RH6.1, sendmail worked, but I could not relay.  I've looked
for help on that one since last night.  That's right, I've been at the
office now for nearly 40 hours.  I've had three 2 hour naps on the cold (but
carpeted) floor, and all the while trying to find help, reading, working on
an NT server, some office things, but mostly this ONE LITTLE MAIL PROBLEM!!


Long series of events snipped to minimum..

Redhat's 6.1 Linux.... Don't bother...
RH is becoming more like microsoft every day.

three icons on the KDE desktop for Redhat local html files or web links. NO
Netscape icon (and no I haven't figured out how to crate a link on the
desktop that mirrors the icon for netscape yet), RedHat's "Premier" support
looking like people will get something, when all they get is a single click
to update their software packages...

if you're running Mandrake 6.1 now with the default KDE, then you know
there's an UPDATE link right there on the desktop that goes to a hundred or
so mirror sites for you to get updates without the wait... a few more clicks
than RH's, but I didn't have to pay a DIME!

and then there is the way RH mangled the KDE portion of the install, some of
the menus didn't have the correct icons, instead having a dot bullet, then
the fact that instead of treating each desktop as it's own entity, it puts
links on the "start menu" to the RedHat menus, the Gnome menus and so on.

So... I was NOT pleased with redhat, but my time is just as valuable as
anyone's, so I wanted to find other ways around my dislike of sendmail.. I
found a config utility... its got promise, but not yet, so I won't mention
its name here.. compiling problems his config script wasn't looking for QT
1.3 or newer, it had to be QT 1.3...So I had to LN to make it..

I had tried some other things, the install for this guy's SendMail Config
program (KDE based) said I needed to put some path and environment
statements into my .bash_profile.

His install file even had it broken down for two common configs so all I had
to do was cut and paste.

After that I couldn't access any of the man files.


So I wiped again, decided since I liked Mandrake's KDE install. Liked how it
would get updates better, I would again try Mandrake.

Same email problems..

This time I tried in vain to search though a custom install on anything that
said "Sendmail" and tried to remove them, but damned it I could not find the
actual package that installs Sendmail (which is also installed in some form
by Postfix)

Same email woes, no mail in, no mail out unless relayed through, which
postfix does SO effortlessly, and user to user logged into the box directly
was not working.

Back to the error messages.... I was about to give up, and uninstall postfix
and attempt to get sendmail, when some dim-whited light started going off
again.

I hadn't caused the corruption in the first place, this reinstall proves it
wasn't me.

Let me look at those log files again... let me look through the main.cf file
..

suddenly I put two plus two together and found myself searching the hard
drive for the file newaliases...

Because of his, I found some other files.. one in particular, postalias.

After wiping and reinstalling, my man pages worked so I started looking into
this thing called 'postalias'


And that's when the light bulb nearly exploded my brethren...

Postalias is used to configure the 'newaliases' command.

Newalias will NOT take a file argument.

It simply wakes up, does it's job on a single file and goes back to the bit
bucket asleep.

Post alias allows you to tell newalias where the config file is that will
tell new alias where the alias files are (bet you thought it was going to
tell newalias that directly -- wrong!)

Postalias, simply put, sets up the newalias command to know WHERE to put the
alias file, AND in what kind of database format, DBM, HASH, BTree, AND
lastly the name of the file you want to have the aliases in.

With this information in hand, I started my rounds, and at this time..

long after you've all probably stopped reading...

found the answer to the problem.

Amen somebody....



Thanks for those that posted, your suggestions, while not right, were still
logical things to try, and I'm sure that if you had that code snippet from
the mail log, you'd have gotten it anyway...


But Thanks still the same!!





Consolidated answers:

1) check for a log file.  Look in '/var/log'
2) if you see an error there, don't ignore it, don't obsess on it either,
but try to figure out the error
3) in this case, it was showing that TWO things were wrong, first that the
file it was using was NOT the file that "newaliases" uses, and two that the
aliases.db file in /etc is NOT compatible with postfix when Mandrake was
installed.
4) there should be an entry made to refer people to postalias as a file to
set up aliases for your mail server.
5) don't sleep on a cold floor, carpet or not, sleep in your car or better
in your bed, or better still in someone else's bed.



:o)




R.'Trebor' Groves
Network Technician, HarvardNet

Reply via email to