LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-07-2003, 05:08 PM   #1
Madrinator
Member
 
Registered: May 2003
Location: Guadalajara, Mexico
Distribution: Mandrake
Posts: 46

Rep: Reputation: 15
Can't start qmail-smtpd


Que tal amigos

I'm trying to set up an e-mail server with qmail but I have some trouble.
I followed the steps in the book "Life with qmail", I downloaded and installed ucspi-tcp and daemontools and I created all the mentioned scripts but I can't start qmail-smtpd, all the other daemons work.

This is my /var/qmail/supervise/qmail-smtpd/run script:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo "QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in"
echo "/var/qmail/supervise/qmail-smtpd/run"
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb
-c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1

Do you see something wrong?

Watching the log file of qmail-smtpd I found this:

@400000003eddff3436aba4c4 tcpserver: fatal: unable to figure out port number for -u

All the lines are like this, differing only in the date field.

Does anybody know what this means and how can I solve it?
If I am going to use POP3 and IMAP accounts is smtpd necessary?
I don't know much about Linux or e-mail servers, please help me!

Thanks in advance! (English)
Muchas gracias de antemano! (Spanish)
 
Old 06-08-2003, 08:08 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,359
Blog Entries: 55

Rep: Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546
@400000003eddff3436aba4c4 tcpserver: fatal: unable to figure out port number for -u
Tcpserver is missing an argument, so it's thinking "-u" will supply it with a port number.

If you start it as "sh -x /var/qmail/supervise/qmail-smtpd/run" and look for the tcpserver line, you should see all the variables expanded tcpserver is started with.

Then check the tcpserver manual and for each argument check if it gives you the right value or values.
 
Old 10-01-2003, 04:06 PM   #3
Madrinator
Member
 
Registered: May 2003
Location: Guadalajara, Mexico
Distribution: Mandrake
Posts: 46

Original Poster
Rep: Reputation: 15
Hi again

I installed Mandrake 9 yesterday and installed qmail again but I can't get qmail-smtpd running again.

Now this is the problem:

[root@madrinator qmail-smtpd]# sh -x run
++ id -u qmaild
+ QMAILDUID=503
++ id -g qmaild
+ NOFILESGID=502
++ cat /var/qmail/control/concurrencyincoming
+ MAXSMTPD=20
++ head -1 /var/qmail/control/me
+ LOCAL=madrinator.machaca.org
+ '[' -z 503 -o -z 502 -o -z 20 -o -z madrinator.machaca.org ']'
+ '[' '!' -f /var/qmail/control/rcpthosts ']'
+ exec /usr/local/bin/softlimit -m 2000000 /usr/local/bin/tcpserver -v -R -l madrinator.machaca.org -x /etc/tcp.smtp.cdb -c 20 -u 503 -g 502 0 smtp /var/qmail/bin/qmail-smtpd
tcpserver: fatal: unable to bind: address already used

What's this addres the last line refers to?

Thank you one more time!!
 
Old 10-01-2003, 04:17 PM   #4
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
tried postfix ?
 
Old 10-02-2003, 12:30 AM   #5
Madrinator
Member
 
Registered: May 2003
Location: Guadalajara, Mexico
Distribution: Mandrake
Posts: 46

Original Poster
Rep: Reputation: 15
Forget it, I solved the problem.

It was postfix that was runnig. I stopped it and qmail-smtpd runs again.

Strange thing, I didn't check Mail & News packages during installation.

Anyway, what configuration file tells Linux what services must run at startup?
I stopped postfix from the Mandrake Control Center, but I'd like to know what file is responsible for loading/unloading services to do it manually.

Thanks!!
 
Old 01-05-2006, 03:49 PM   #6
phathuynh27
LQ Newbie
 
Registered: Jan 2006
Posts: 6

Rep: Reputation: 0
qmail-smtpd run file issue

Hi everyone,

My run file is:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo "QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in"
echo "/var/qmail/supervise/qmail-smtpd/run"
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb
-c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1


when I execute that with "sh run", I got Line 20 unexpected end of file.

Please help.

Thanks,
 
Old 01-06-2006, 11:06 AM   #7
phathuynh27
LQ Newbie
 
Registered: Jan 2006
Posts: 6

Rep: Reputation: 0
thanx for those viewing. I solved the issue know. My bad for creating script in Windows.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with /var/qmail/supervise/qmail-smtpd/run coolamit78 Linux - Networking 4 02-02-2012 10:50 AM
Open Webmail / Mailfront / smtpfront-qmail / qmail-smtpd Apollo77 Linux - Software 2 01-20-2009 03:33 AM
editing qmail-smtpd.c to my needs rabbate Linux - Software 0 02-15-2004 03:31 AM
Configuring qmail-smtpd tveiga Linux - Software 1 01-16-2004 03:17 PM
qmail help: where is the run script for qmail-smtpd? IceNineJon Linux - Software 2 12-03-2002 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration