tarballed
September 3rd, 2003, 11:28
Morning everyone.

I logged into today and was checking the logs on my server and noticed an entry in my OpenBSD maillog:

[code:1:4153bef5e9]ep 2 16:27:43 blowfish sendmail[8648]: gethostbyaddr(192.168.1.231) failed: 1
Sep 2 16:27:43 blowfish sendmail[8648]: NOQUEUE: SYSERR(jwilliams): can not chdir(/var/spool/mqueue/): Permission denied
Sep 2 16:27:52 blowfish sendmail[28513]: gethostbyaddr(192.168.1.231) failed: 1
Sep 3 01:30:01 blowfish sendmail[12731]: gethostbyaddr(192.168.1.231) failed: 1
Sep 3 01:30:27 blowfish sendmail[5925]: h838URXr005925: from=root, size=2516, class=0, nrcpts=1, msgid=<200309030830.h838URXr005925@blowfish.courte
symortgage.com>, relay=root@localhost[/code:1:4153bef5e9]

What strikes this as odd to me is the fact it is using sendmail. Sendmail is not running on this machine, postfix is.

Any idea what is going on? Im googling as I type. :)

Tarballed

bsdjunkie
September 3rd, 2003, 11:32
OpenBSD runs sendmail internally by default. So unless you disabled it, that could be why your seeing this.

tarballed
September 3rd, 2003, 12:38
Ahh...yes, I disable it actually...

That would explain the errors...

That was what caught me off guard. I was like "Wait a minute. I disabled sendmail."

Thanks bsdjunkie.

Tarballed

elmore
September 3rd, 2003, 12:41
Make sure to remove the crontab entry as well!

tarballed
September 3rd, 2003, 12:42
Make sure to remove the crontab entry as well!

Done. Well, I just commented out the entry in crontab. :)

tarballed
September 9th, 2003, 14:58
So unless you disabled it, that could be why your seeing this.

I saw a few more entries in my logs when I arrived back today. What is weird is, I was pretty sure I disabled sendmail...

Is there another way to completely disable sendmail on my *BSD box so I do not see these anymore? I shut off sendmail in cron, and removed it in /usr/sbin (followed lawmonkey's spam how-to) so what am I missing?

Thanks..

Tarballed

elmore
September 9th, 2003, 17:00
did you run /usr/local/sbin/postfix-enable after you installed? Look at your mailer.conf file in /etc.

tarballed
September 9th, 2003, 17:04
did you run /usr/local/sbin/postfix-enable after you installed? Look at your mailer.conf file in /etc.

Hmm...I didn't actually, or I dont recall...but the output of my mailer.conf suggests I did not:

[code:1:871f9f3666]sendmail /usr/libexec/sendmail/sendmail
send-mail /usr/libexec/sendmail/sendmail
mailq /usr/libexec/sendmail/sendmail
newaliases /usr/libexec/sendmail/sendmail
hoststat /usr/libexec/sendmail/sendmail
purgestat /usr/libexec/sendmail/sendmai[/code:1:871f9f3666]

So just tun /usr/local/sbin/postfix-enable

Interesting...

Tarballed

tarballed
September 10th, 2003, 13:10
Elmore,

I think what im missing is I did not do what you suggested: run postfix-enable.

Just a few quesitons:

First, what exactly does that do? I cant seem to locate what it does exactly in the man pages.

Second: I dont seem to have that command where you specified. I checked /usr/sbin as well but I dont have postfix-enable...

I keep getting those sendmail messages in my logs and want to get rid of them...

Any suggestions?

Tarballed

|MiNi0n|
September 10th, 2003, 14:19
Did you build postfix from the ports? postfix-enable should be there. Try:

find / -name postfix-enable -print

tarballed
September 10th, 2003, 14:26
Hi Minion,

Actually, installed it from source...

I also tried that exact same command with no luck...did not find it.

Did I forget something?

Tarballed

|MiNi0n|
September 10th, 2003, 14:46
Nope. If you installed from source then there is no postfix-enable, that's part of OpenBSD's port.

It's not really an issue. All you need to do is figure out where your sendmail compatible postfix commands are located (likely /usr/local/sbin) and change the paths in /etc/mailer.conf

tarballed
September 10th, 2003, 16:13
Just a quick bit of info: When I searched where the files were specified in mailer.conf, most, if not all were in /usr/bin/<command>

All were there except sendmail and send-mail

Just edit the others to go to /usr/bin ?

Tarballed

elmore
September 10th, 2003, 16:22
Don't know why you installed from source as the OpenBSD port includes OpenBSD specific patches, sets up postfix in a chroot by default, adds the postfix-enable and postfix-disable commands which are handy, as you're finding out. But here's the section of the INSTALL file that's included with the source code of the latest postfix revision. This is what you need!

From Section 6 of the INSTALL file


6 - Installing the software after successful compilation
================================================== ======

This text describes how to install Postfix from source code. See
the PACKAGE_README file if you are building a package for distribution
to other systems.

IMPORTANT: if you are REPLACING an existing sendmail installation
with Postfix, you may need to keep the old sendmail program running
for some time in order to flush the mail queue. As superuser,
execute the following commands (your sendmail, newaliases and mailq
programs may be in a different place):

# mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
# mv /usr/bin/newaliases /usr/bin/newaliases.OFF
# mv /usr/bin/mailq /usr/bin/mailq.OFF
# chmod 755 /usr/sbin/sendmail.OFF /usr/bin/newaliases.OFF \
/usr/bin/mailq.OFF


From section 9 of the INSTALL file



9 - Turning off sendmail forever
================================

Prior to installing Postfix you should save the existing sendmail
program files as described in section 6.

Be sure to keep the old sendmail running for at least a couple
days to flush any unsent mail. To do so, stop the sendmail daemon
and restart it as:

# /usr/sbin/sendmail.OFF -q

After you have visited the "Mandatory configuration file edits"
section below, you can start the Postfix system with

# postfix start

But the good old sendmail way works just as well:

# sendmail -bd -qwhatever

and watch the syslog file for any complaints from the mail system.

% egrep '(reject|warning|error|fatal|panic):' /some/log/file

Typical logfile names are: /var/log/maillog or /var/log/syslog.
See /etc/syslog.conf for actual logfile names.



Straight from Weitse himself.

Postfix installs replacement sendmail binaries the are *postfix* Unless you did the above sendmail is not running!

I hate to bitch but, in the future you might want to use the port, it's there for a reason! ;)

you can start postfix by running sendmail -bd -qm 30 or whatever and it will run postfix in the sendmail wrapper. Thus accepting sendmail commands and producing sendmail output.


Oh I got more, just got to thinking:

Your error is a result of improper DNS. those error are caused by the /etc/daily script which runs nightly in you systems crontab. Fixing DNS will result in the correction of the error you are seeing. Furthermore, etc/daily calls the mail command which is linked to the sendmail wrapper on your computer as defined in your /etc/mailer.conf.

Thus why you are seeing the error you seeing.




You'd of avoided all of this by using the ports!

Please , Please , Pretty Please, if a port is available use it! Ports are more than a nice little conveinence, they save time and headache and provide the easiest way for everyone to troubleshoot. I could've had this information to you a week ago when you posted this if you had of indeed installed from the ports or at least informed me that you had installed via the source.

elmore
September 10th, 2003, 17:19
One more thing: With the above being said, you should be all worked out now. ;)

Sorry I just wanted to get this working and was a little miffed when I found out today that you had installed via source instead of from the ports.

Just needed to rant a little. I'm much better now. ;)

tarballed
September 10th, 2003, 17:26
Sorry I just wanted to get this working and was a little miffed when I found out today that you had installed via source instead of from the ports.

No problem. I learned a very good lesson today.

When you can install via ports, do it...no questions asked. :)

Seems like my life has been turned upside down lately and im missing very simple things...I guess this is part of my growing pains. Guess we all go through it....

Now, i get to play with Domino 6 and Lotus notes...oh joy...

Tarballed