Unix Technical Forum

Sendmail and Samba question

This is a discussion on Sendmail and Samba question within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Hello newsgroup! I have two questions (which do not have anything to do with eachother), the first about Sendmail, ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 11:00 AM
Federico Gentile
 
Posts: n/a
Default Sendmail and Samba question

Hello newsgroup!

I have two questions (which do not have anything to do with eachother),
the first about Sendmail, and the second about Samba.

[Sendmail Part]

At first, I might want to say that I've only emerged Sendmail to be
enable receiving e-mail notifications for comments people submit to my
weblog or photo gallery, and I don't really know much about it or its
configuration.
I've noticed, that when submitting a comment on my weblog, it takes a
relatively long time for the page to load (maybe around 30 seconds). I
managed to find out that it is sendmail which takes up all that time.
When I take a look at my /var/log/messages, I often see entries like:

"Jan 23 23:59:54 good-dog sendmail[18922]: My unqualified host name
(good-dog) unknown; sleeping for retry"
and:
"Jan 24 00:00:54 good-dog sendmail[18922]: unable to qualify my own
domain name (good-dog) -- using short name"

The mails are sent correctly:
"Jan 24 00:00:54 good-dog sendmail[18922]: k0NN0sud018922: from=root,
size=753, class=0, nrcpts=1,
msgid=<200601232300.k0NN0sud018922@good-dog>$" (truncated)
"Jan 24 00:00:54 good-dog sm-mta[18940]: k0NN0sGK018940:
from=<root@good-dog>, size=980, class=0, nrcpts=1,
msgid=<200601232300.k0NN0sud018922@$" (truncated)

but, as I've said, it takes way too much time. Of course I noticed the
problem may come from the fact that sendmail doesn't know its qualified
hostname, but I don't know how to set it up.
My ISP assigns me a dynamic hostname and IP address. Although the
connection is not dropped often (maybe 1 time in 3 weeks), it's still
randomly assigned. But I do have a dyndns redirect, if that helps.

[Samba Part]

Samba works really well for me, however, my /var/log/messages consists
nearly 80% of the following message:

"...
Jan 24 15:56:15 good-dog smbd[22766]: Unable to open new log file
/var/log/samba3/log.laptop: No such file or directory
Jan 24 15:57:15 good-dog smbd[22766]: [2006/01/24 15:57:15, 0]
lib/debug.c:reopen_logs(589)
Jan 24 15:57:15 good-dog smbd[22766]: Unable to open new log file
/var/log/samba3/log.laptop: No such file or directory
Jan 24 15:57:15 good-dog smbd[22766]: [2006/01/24 15:57:15, 0]
lib/debug.c:reopen_logs(589)
Jan 24 15:57:15 good-dog smbd[22766]: Unable to open new log file
/var/log/samba3/log.laptop: No such file or directory
Jan 24 15:58:15 good-dog smbd[22766]: [2006/01/24 15:58:15, 0]
lib/debug.c:reopen_logs(589)
...."

"Laptop" is the name of a Windows XP Home Edition computer. It seems
that the message is only written down in the messages file when "Laptop"
is on the network -- which is the case for most of the time!
Is there something I have to change in the settings? Or is it enough to
create that file? It is strange however because I never read anything
about having to create those logfiles. I just configured Samba through
Webmin and it works fine, except for this messages filling up the system
log.


Does anybody know how to resolve those problems?
Thank you all very much in advance for your help!

PS: emerge --info:

Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2,
2.6.15-gentoo-r1 i686)
================================================== ===============
System uname: 2.6.15-gentoo-r1 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.6.14
dev-lang/python: 2.3.5, 2.4.2
sys-apps/sandbox: 1.2.12
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils: 2.16.1
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://sunsite.informatik.rwth-aachen...b/Linux/gentoo
http://linux.rz.ruhr-uni-bochum.de/d...gentoo-mirror/
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.join.uni-muenster.de/pub/l...butions/gentoo
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo
http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://pandemonium.tiscali.de/pub/gentoo/
ftp://pandemonium.tiscali.de/pub/gentoo/
ftp://ftp.rz.tu-bs.de/pub/mirror/ftp...too-distfiles/
http://gentoo.intergenia.de"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 alsa apm arts avi berkdb bitmap-fonts bzip2 crypt eds emboss
encode expat foomaticdb fortran gd gdbm gif gpm gstreamer imap imlib
ipv6 jpeg libg++ libwww mad mhash mikmod mp3 mpeg mysql ncurses nls ogg
oggvorbis oss pam pcre pdflib perl png python quicktime readline samba
sdl spell ssl symlink tcpd tiff truetype truetype-fonts type1-fonts udev
vorbis xml2 xv zlib userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS,
PORTDIR_OVERLAY

--
Federico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 11:00 AM
J.O. Aho
 
Posts: n/a
Default Re: Sendmail (Was: Sendmail and Samba question)

Federico Gentile wrote:

> At first, I might want to say that I've only emerged Sendmail to be
> enable receiving e-mail notifications for comments people submit to my
> weblog or photo gallery, and I don't really know much about it or its
> configuration.
> I've noticed, that when submitting a comment on my weblog, it takes a
> relatively long time for the page to load (maybe around 30 seconds). I
> managed to find out that it is sendmail which takes up all that time.
> When I take a look at my /var/log/messages, I often see entries like:
>
> "Jan 23 23:59:54 good-dog sendmail[18922]: My unqualified host name
> (good-dog) unknown; sleeping for retry"
> and:
> "Jan 24 00:00:54 good-dog sendmail[18922]: unable to qualify my own
> domain name (good-dog) -- using short name"
>
> The mails are sent correctly:
> "Jan 24 00:00:54 good-dog sendmail[18922]: k0NN0sud018922: from=root,
> size=753, class=0, nrcpts=1,
> msgid=<200601232300.k0NN0sud018922@good-dog>$" (truncated)
> "Jan 24 00:00:54 good-dog sm-mta[18940]: k0NN0sGK018940:
> from=<root@good-dog>, size=980, class=0, nrcpts=1,
> msgid=<200601232300.k0NN0sud018922@$" (truncated)


This seems to be with your hostname setup, I guess you only configured your
/etc/conf.d/hostname, but this won't make it possible to lookup your
hostname<->ip-number relation, you will need to add your hostname to your
/etc/hosts (note one line per ip-number), you can tie the name to 127.0.0.1 or
to the ip-number you have (or both).



As I don't use smb, I won't give you a reply on that more than come back when
you have nfs.



//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 11:01 AM
Federico Gentile
 
Posts: n/a
Default Re: Sendmail (Was: Sendmail and Samba question)

Hello,

J.O. Aho wrote:
[...]
> This seems to be with your hostname setup, I guess you only configured your
> /etc/conf.d/hostname, but this won't make it possible to lookup your
> hostname<->ip-number relation, you will need to add your hostname to your
> /etc/hosts (note one line per ip-number), you can tie the name to 127.0.0.1 or
> to the ip-number you have (or both).


My /etc/conf.d/hostname looks like this:


# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="localhost"



My /etc/hosts looks like this:


# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04
20:12:25 azarah Exp $
#

127.0.0.1 good-dog
10.0.0.141 good-dog no0dle.kicks-ass.org noodle.kicks-ass.org
federico.dyndns.info

# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


I thought I'd have it configured correctly, but was never sure. I want
the server to be on the local network as "good-dog", and from outside
accessible as "no0dle.kicks-ass.org" (which of course works, which
doesn't mean there's no misconfiguration).
10.0.0.141 is the IP address of the server on my private network.
What can I do to correct it?

> As I don't use smb, I won't give you a reply on that more than come back when
> you have nfs.


I am using NFS for my Linux <-> Linux networking. But I still have to
use Samba for (easy & comfortable) Windows <-> Linux file transfers.

again, thank you for your support.

--
Federico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 11:01 AM
J.O. Aho
 
Posts: n/a
Default Re: Sendmail (Was: Sendmail and Samba question)

Federico Gentile wrote:
> Hello,
>
> J.O. Aho wrote:
> [...]
>> This seems to be with your hostname setup, I guess you only configured
>> your
>> /etc/conf.d/hostname, but this won't make it possible to lookup your
>> hostname<->ip-number relation, you will need to add your hostname to your
>> /etc/hosts (note one line per ip-number), you can tie the name to
>> 127.0.0.1 or
>> to the ip-number you have (or both).

>
> My /etc/conf.d/hostname looks like this:
>
>
> # /etc/conf.d/hostname
>
> # Set to the hostname of this machine
> HOSTNAME="localhost"
>


This is what you call your machine locally, and you don't have any ip-number
for localhost (see your /etc/hosts), which makes sendmail first look for your
/etc/hosts and can't translate the name to an ip-number, then asks DNS and
this will fail too, which results in this wait. I think you should set this to
good-dog. If you have HOSTNAME set to localhost on all your computers, you
will have troubles to know on which computer you work if you telnet/ssh to
several machines from one, use unique names for each machine and you can keep
the separated from each other.


> My /etc/hosts looks like this:
>
>
> # /etc/hosts: This file describes a number of hostname-to-address
> # mappings for the TCP/IP subsystem. It is mostly
> # used at boot time, when no name servers are running.
> # On small systems, this file can be used instead of a
> # "named" name server. Just add the names, addresses
> # and any aliases to this file...
> # $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04
> 20:12:25 azarah Exp $
> #
>
> 127.0.0.1 good-dog


This line isn't okey, you are missing both localhost and
localhost.localdomain, without those two entries you will break some
applications functionality. Removing those seems to be a quite common mistake.

If you don't run your own DNS, you should add the other computers
ip-number/ip-name to your /etc/hosts, this is why this file was created in the
dawn of arpanet.

10.0.0.141 good-dog no0dle.kicks-ass.org noodle.kicks-ass.org
federico.dyndns.info
10.0.0.142 bad-dog
10.0.0.143 winblowz


> I thought I'd have it configured correctly, but was never sure. I want
> the server to be on the local network as "good-dog", and from outside
> accessible as "no0dle.kicks-ass.org" (which of course works, which
> doesn't mean there's no misconfiguration).
> 10.0.0.141 is the IP address of the server on my private network.
> What can I do to correct it?


Nothing on your /etc/conf.d/hostname or /etc/hosts has anything to do what
your machine is called externally, only what you call it locally (10.0.0.141).

If you want to associate IP's externally, you need to use DNS (bind), but this
is something in your ISPs power and not yours and you don't have a public IP
which would be required.


>> As I don't use smb, I won't give you a reply on that more than come
>> back when you have nfs.

> I am using NFS for my Linux <-> Linux networking. But I still have to
> use Samba for (easy & comfortable) Windows <-> Linux file transfers.


Microsoft has released their nfs stuff as freeware, but may be hard to find on
their homepage. More "help" than that I can't be as I don't use Microsoft.



//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 11:01 AM
Federico Gentile
 
Posts: n/a
Default Re: Sendmail (Was: Sendmail and Samba question)

J.O. Aho wrote:
[bigSnip]

Thank you for your help! I'll try this tomorrow and write if it works!

> Microsoft has released their nfs stuff as freeware, but may be hard to find on
> their homepage. More "help" than that I can't be as I don't use Microsoft.


True, but as far as I know, only for Windows XP Professional, but we are
running the Home Edition. It's called something like "Services for
Unix", I tried to install it 2 months ago, but the installer didn't want
to continue because of the Professional Edition limitation.


--
Federico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 11:01 AM
Arthur Hagen
 
Posts: n/a
Default Re: Sendmail (Was: Sendmail and Samba question)

J.O. Aho <user@example.net> wrote:
> Federico Gentile wrote:
>>
>> 127.0.0.1 good-dog

>
> This line isn't okey, you are missing both localhost and
> localhost.localdomain, without those two entries you will break some
> applications functionality. Removing those seems to be a quite common
> mistake.


You don't need "localhost.localdomain", but you DO need "localhost".

Any app that tries to resolve "localhost" instead of "localhost."
through DNS is broken, but even so, it will still work as long as you
don't also use a malicious DNS or NIS server that's authoritative for
"localdomain" and points "localhost.localdomain" somewhere else.

>>> As I don't use smb, I won't give you a reply on that more than come
>>> back when you have nfs.

>> I am using NFS for my Linux <-> Linux networking. But I still have to
>> use Samba for (easy & comfortable) Windows <-> Linux file transfers.

>
> Microsoft has released their nfs stuff as freeware, but may be hard
> to find on their homepage. More "help" than that I can't be as I
> don't use Microsoft.


PCNFS is not NFS. It's a variant of a really old version of NFS, and
requires specific extensions on the NFS server side. Not an option,
really. However, you can use ssh or ftp too.

Regards,
--
*Art

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 11:01 AM
Federico Gentile
 
Posts: n/a
Default Re: Sendmail (Was: Sendmail and Samba question)

Hi,

Federico Gentile wrote:
[...]
> True, but as far as I know, only for Windows XP Professional, but we are
> running the Home Edition. It's called something like "Services for
> Unix", I tried to install it 2 months ago, but the installer didn't want
> to continue because of the Professional Edition limitation.


Did what you wrote, rebooted, and in fact the sendmail problem is now
resolved.

PS: Still very happy if by chance someone knows something about my Samba
issue

Thanks,

--
Federico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:34 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com