niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Qmail
smtpd on two ports
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
Author Message
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 3:29 pm    Post subject: smtpd on two ports Reply with quote

I need to have qmail SMTPD listen on two ports, and from searching the
archives
I found out I can add run another SMTPD service by adding the following
to

/service/qmail-smtpd-priv/run

however, where in the run script do I specify the port #, and do I also
need
to run a another instance of /service/qmail-smtpd-priv//log/run?

Thanks for your help

Regards,
Michael
Back to top
Charles Cazabon
*nix forums Guru


Joined: 08 Jan 2005
Posts: 805

PostPosted: Tue Feb 01, 2005 3:42 pm    Post subject: Re: smtpd on two ports Reply with quote

Michael Di Martino <mdm@telx.com> wrote:
Quote:

I need to have qmail SMTPD listen on two ports, and from searching the
archives I found out I can add run another SMTPD service

Yes.

Quote:
however, where in the run script do I specify the port #

tcpserver takes the port as the second non-option argument, i.e. it's:

tcpserver [options] address port program ...

Quote:
and do I also need to run a another instance of
/service/qmail-smtpd-priv//log/run?

Yes. Each service, if you want logging, requires a separate logging
subservice. If you're logging through multilog, you'll need a new log output
directory as well.

Charles
--
---------------------------------------------------------------------------
Charles Cazabon <qmail@discworld.dyndns.org>
GPL'ed software available at: http://www.qcc.ca/~charlesc/software/
Read http://www.qcc.ca/~charlesc/writings/12-steps-to-qmail-list-bliss.html
---------------------------------------------------------------------------
Back to top
Kiril Todorov
*nix forums beginner


Joined: 01 Feb 2005
Posts: 18

PostPosted: Tue Feb 01, 2005 3:48 pm    Post subject: Re: smtpd on two ports Reply with quote

Michael Di Martino wrote:
Quote:
I need to have qmail SMTPD listen on two ports, and from searching the
archives
I found out I can add run another SMTPD service by adding the following
to

/service/qmail-smtpd-priv/run

however, where in the run script do I specify the port #,

You can consult djb's page for tcpserver about this:
http://cr.yp.to/ucspi-tcp/tcpserver.html


Quote:
need
to run a another instance of /service/qmail-smtpd-priv//log/run?

Yes.


--
'Can death be sleep, when life is but a dream' --John Keats

/* waiting... dreaming... wishing... */
Back to top
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 5:13 pm    Post subject: RE: smtpd on two ports Reply with quote

-----Original Message-----
From: Charles Cazabon [mailto:qmail@discworld.dyndns.org]
Sent: Tuesday, February 01, 2005 11:43 AM
To: qmail@list.cr.yp.to
Subject: Re: smtpd on two ports

Michael Di Martino <mdm@telx.com> wrote:
Quote:

I need to have qmail SMTPD listen on two ports, and from searching the

archives I found out I can add run another SMTPD service

Yes.

Quote:
however, where in the run script do I specify the port #

tcpserver takes the port as the second non-option argument, i.e. it's:

tcpserver [options] address port program ...

Quote:
and do I also need to run a another instance of
/service/qmail-smtpd-priv//log/run?

Yes. Each service, if you want logging, requires a separate logging
subservice. If you're logging through multilog, you'll need a new log
output directory as well.

Charles

------------------------------------------------------------------------
---


I have just finished reading DJB's tcpserver doc and I can not find the
switch for specifying the port#. Apparently I am missing something.
Which option specifies the port#?

/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
"$MAXSMTPD" \
Back to top
Charles Cazabon
*nix forums Guru


Joined: 08 Jan 2005
Posts: 805

PostPosted: Tue Feb 01, 2005 5:21 pm    Post subject: Re: smtpd on two ports Reply with quote

Michael Di Martino <mdm@telx.com> wrote:
Quote:
archives I found out I can add run another SMTPD service

Yes.

however, where in the run script do I specify the port #

tcpserver takes the port as the second non-option argument, i.e. it's:

tcpserver [options] address port program ...

I have just finished reading DJB's tcpserver doc and I can not find the
switch for specifying the port#.

It isn't a switch. It's the second non-option argument to tcpserver, just as
I said above. In the usage line above, replace "port" with the port number
you want it to listen on, just as you replace "program ..." with the program
you want tcpserver to run for each connection.

Charles
--
---------------------------------------------------------------------------
Charles Cazabon <qmail@discworld.dyndns.org>
GPL'ed software available at: http://www.qcc.ca/~charlesc/software/
Read http://www.qcc.ca/~charlesc/writings/12-steps-to-qmail-list-bliss.html
---------------------------------------------------------------------------
Back to top
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 6:20 pm    Post subject: RE: smtpd on two ports Reply with quote

-----Original Message-----
From: Charles Cazabon [mailto:qmail@discworld.dyndns.org]
Sent: Tuesday, February 01, 2005 1:22 PM
To: qmail@list.cr.yp.to
Subject: Re: smtpd on two ports

Michael Di Martino <mdm@telx.com> wrote:
Quote:
archives I found out I can add run another SMTPD service

Yes.

however, where in the run script do I specify the port #

tcpserver takes the port as the second non-option argument, i.e.
it's:

tcpserver [options] address port program ...

I have just finished reading DJB's tcpserver doc and I can not find
the switch for specifying the port#.

It isn't a switch. It's the second non-option argument to tcpserver,
just as I said above. In the usage line above, replace "port" with the
port number you want it to listen on, just as you replace "program ..."
with the program you want tcpserver to run for each connection.

Charles
--
------------------------------------------------------------------------
---
Charles Cazabon
<qmail@discworld.dyndns.org>
GPL'ed software available at:
http://www.qcc.ca/~charlesc/software/
Read
http://www.qcc.ca/~charlesc/writings/12-steps-to-qmail-list-bliss.html
------------------------------------------------------------------------
---
Back to top
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 7:00 pm    Post subject: RE: smtpd on two ports Reply with quote

-----Original Message-----
From: Charles Cazabon [mailto:qmail@discworld.dyndns.org]
Sent: Tuesday, February 01, 2005 1:22 PM
To: qmail@list.cr.yp.to
Subject: Re: smtpd on two ports

Michael Di Martino <mdm@telx.com> wrote:
Quote:
archives I found out I can add run another SMTPD service

Yes.

however, where in the run script do I specify the port #

tcpserver takes the port as the second non-option argument, i.e.
it's:

tcpserver [options] address port program ...

I have just finished reading DJB's tcpserver doc and I can not find
the switch for specifying the port#.

It isn't a switch. It's the second non-option argument to tcpserver,
just as I said above. In the usage line above, replace "port" with the
port number you want it to listen on, just as you replace "program ..."
with the program you want tcpserver to run for each connection.

Charles
--
------------------------------------------------------------------------
---
Charles Cazabon
<qmail@discworld.dyndns.org>
GPL'ed software available at:
http://www.qcc.ca/~charlesc/software/
Read
http://www.qcc.ca/~charlesc/writings/12-steps-to-qmail-list-bliss.html
------------------------------------------------------------------------
---

I am sorry to bother the list with something so trivial, however, I just
cannot figure out where to place the port number.

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

I am assuming it goes after the /usr/local/bin/tcpserver -v -R -l
"$LOCAL" "2525"

However when I restart qmail smtpd it fails to start.
Could you be more specific?

Thanks in advance.
Back to top
Jason Frisvold
*nix forums beginner


Joined: 27 Jan 2005
Posts: 44

PostPosted: Tue Feb 01, 2005 7:15 pm    Post subject: Re: smtpd on two ports Reply with quote

On Tue, 1 Feb 2005 15:00:56 -0500, Michael Di Martino <mdm@telx.com> wrote:
Quote:
I am sorry to bother the list with something so trivial, however, I just
cannot figure out where to place the port number.

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
^^^^


The word smtp in the above entry is actually the port. tcpserver
looks in /etc/services for the port value of smtp and replaces it
behind the scenes.

SO.. if you put 2525 in place of smtp, you can use smtp on port 2525.

Quote:
/var/qmail/bin/qmail-smtpd 2>&1

I am assuming it goes after the /usr/local/bin/tcpserver -v -R -l
"$LOCAL" "2525"

However when I restart qmail smtpd it fails to start.
Could you be more specific?

Is that specific enough?

Quote:
Thanks in advance.

NP :)

--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
Back to top
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 7:57 pm    Post subject: RE: smtpd on two ports Reply with quote

After creating additional instance of smtpd with the following

/var/qmail/supervise/qmail-smtpd-log/run
and linking it to service

I got the following error after restarting qmail.

2005-02-01 15:40:20.593480500 tcpserver: fatal: unable to bind: address
already used.

Is their anything else that needs to be done to have qmail-smtpd listen
on two ports?


-----Original Message-----
From: Jason Frisvold [mailto:xenophage0@gmail.com]
Sent: Tuesday, February 01, 2005 3:15 PM
To: Michael Di Martino
Cc: qmail@list.cr.yp.to
Subject: Re: smtpd on two ports

On Tue, 1 Feb 2005 15:00:56 -0500, Michael Di Martino <mdm@telx.com>
wrote:
Quote:
I am sorry to bother the list with something so trivial, however, I
just cannot figure out where to place the port number.

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

^^^^

The word smtp in the above entry is actually the port. tcpserver looks
in /etc/services for the port value of smtp and replaces it behind the
scenes.

SO.. if you put 2525 in place of smtp, you can use smtp on port 2525.

Quote:
/var/qmail/bin/qmail-smtpd 2>&1

I am assuming it goes after the /usr/local/bin/tcpserver -v -R -l
"$LOCAL" "2525"

However when I restart qmail smtpd it fails to start.
Could you be more specific?

Is that specific enough?

Quote:
Thanks in advance.

NP :)

--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
Back to top
Jason Frisvold
*nix forums beginner


Joined: 27 Jan 2005
Posts: 44

PostPosted: Tue Feb 01, 2005 8:06 pm    Post subject: Re: smtpd on two ports Reply with quote

On Tue, 1 Feb 2005 15:57:08 -0500, Michael Di Martino <mdm@telx.com> wrote:
Quote:

After creating additional instance of smtpd with the following

/var/qmail/supervise/qmail-smtpd-log/run
and linking it to service

I got the following error after restarting qmail.

2005-02-01 15:40:20.593480500 tcpserver: fatal: unable to bind: address
already used.

Sounds like whatever port you specified is already in use by something
else. Try this :

netstat -anp --inet | grep <portnum>

That should tell you what process has that port open.

Quote:
Is their anything else that needs to be done to have qmail-smtpd listen
on two ports?


--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
Back to top
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 8:30 pm    Post subject: RE: smtpd on two ports Reply with quote

-----Original Message-----
From: Jason Frisvold [mailto:xenophage0@gmail.com]
Sent: Tuesday, February 01, 2005 4:06 PM
To: Michael Di Martino
Cc: qmail@list.cr.yp.to
Subject: Re: smtpd on two ports

On Tue, 1 Feb 2005 15:57:08 -0500, Michael Di Martino <mdm@telx.com>
wrote:
Quote:

After creating additional instance of smtpd with the following

/var/qmail/supervise/qmail-smtpd-log/run
and linking it to service

I got the following error after restarting qmail.

2005-02-01 15:40:20.593480500 tcpserver: fatal: unable to bind:
address already used.

Sounds like whatever port you specified is already in use by something
else. Try this :

netstat -anp --inet | grep <portnum>

That should tell you what process has that port open.

Quote:
Is their anything else that needs to be done to have qmail-smtpd
listen on two ports?


--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
------------------------------------------------------------------------
------------

Ok now I have created another instance of qmail-smtpd
doing the following
\var\qmail\supervise\qmail-smtpd-priv-run
and linking it to supervise using the follow parameters

exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.96.cdb -c
"$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp
/var/qmail/bin/qmail-smtpd 2>&1

However when I run
netstat -anp --inet | grep 96
it shows no services listening. Am I missing something?
Back to top
Jason Frisvold
*nix forums beginner


Joined: 27 Jan 2005
Posts: 44

PostPosted: Tue Feb 01, 2005 9:51 pm    Post subject: Re: smtpd on two ports Reply with quote

On Tue, 1 Feb 2005 16:30:54 -0500, Michael Di Martino <mdm@telx.com> wrote:
Quote:
Ok now I have created another instance of qmail-smtpd
doing the following
\var\qmail\supervise\qmail-smtpd-priv-run
and linking it to supervise using the follow parameters

exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.96.cdb -c
"$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp
^^^^


You still have smtp listed.. OH.. heh.. not /etc/tcp.96.cdb ..
after the NOFILESGID is a 0, then the word smtp .. replace *THAT*
word with 96.. so you have this :

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 96 /var/qmail/bin/qmail-smtpd 2>&1

If you want to use a different tcpserver database for this new port,
then you can build that and put it's name in place of tcp.smtp.cdb

(note, the above command will probably wrap in email)

Quote:

However when I run
netstat -anp --inet | grep 96
it shows no services listening. Am I missing something?





--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
Back to top
Michael Di Martino
*nix forums addict


Joined: 09 Jan 2005
Posts: 69

PostPosted: Tue Feb 01, 2005 11:55 pm    Post subject: RE: smtpd on two ports Reply with quote

-----Original Message-----
From: Jason Frisvold [mailto:xenophage0@gmail.com]
Sent: Tuesday, February 01, 2005 5:51 PM
To: Michael Di Martino
Cc: qmail@list.cr.yp.to
Subject: Re: smtpd on two ports

On Tue, 1 Feb 2005 16:30:54 -0500, Michael Di Martino <mdm@telx.com>
wrote:
Quote:
Ok now I have created another instance of qmail-smtpd
doing the following
\var\qmail\supervise\qmail-smtpd-priv-run
and linking it to supervise using the follow parameters

exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.96.cdb -c
"$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp

^^^^

You still have smtp listed.. OH.. heh.. not /etc/tcp.96.cdb ..
after the NOFILESGID is a 0, then the word smtp .. replace *THAT*
word with 96.. so you have this :

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 96 /var/qmail/bin/qmail-smtpd
2>&1

If you want to use a different tcpserver database for this new port,
then you can build that and put it's name in place of tcp.smtp.cdb

(note, the above command will probably wrap in email)

Quote:

However when I run
netstat -anp --inet | grep 96
it shows no services listening. Am I missing something?





--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com

Ok I have it correct config now, however, there is still no service
running port 96

This is what I have configured so far
/var/qmail/supervise/qmail-smtpd/run (on port 25)
and
/var/qmail/supervise/qmail-smtpd-priv/run (on port 96)
linked to /service

here is my /var/qmail/supervise/qmail-smtpd-priv/run

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 96 /var/qmail/bin/qmail-smtpd
2>&1

netstat -anp --inet | grep 96
returns nothing?

What else could be missing?
Back to top
Jason Frisvold
*nix forums beginner


Joined: 27 Jan 2005
Posts: 44

PostPosted: Wed Feb 02, 2005 2:07 am    Post subject: Re: smtpd on two ports Reply with quote

On Tue, 1 Feb 2005 19:55:37 -0500, Michael Di Martino <mdm@telx.com> wrote:
Quote:
Ok I have it correct config now, however, there is still no service
running port 96

This is what I have configured so far
/var/qmail/supervise/qmail-smtpd/run (on port 25)
and
/var/qmail/supervise/qmail-smtpd-priv/run (on port 96)
linked to /service

here is my /var/qmail/supervise/qmail-smtpd-priv/run

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 96 /var/qmail/bin/qmail-smtpd
2>&1

netstat -anp --inet | grep 96
returns nothing?

Do you have logging running for this private qmail instance? Are
there any errors in there?

Quote:
What else could be missing?




--
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
The time now is Sat Jan 10, 2009 4:54 am | All times are GMT
navigation Forum index » Apps » Qmail
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Proposal: Allow dict_tcp server to disconnect without cau... Xin LI Postfix 6 Thu Jul 20, 2006 5:21 pm
No new posts getting write permission over nfs exported ports directory Dr. R. E. Hawkins FreeBSD 10 Mon Jul 17, 2006 9:49 pm
No new posts When ports are at war Lars Eighner FreeBSD 8 Mon Jul 17, 2006 11:29 am
No new posts cairo 1.0.4 build failing on newly installed box/ports tree rloef@interfold.com FreeBSD 9 Fri Jul 14, 2006 12:56 am
No new posts postfix/smtpd[15347]: lost connection after DATA Justin Piszcz Postfix 8 Tue Jul 11, 2006 9:57 am

Free Verizon Ringtones | Codigo da vinci | Bankruptcy | Loans | Magazine Subscriptions
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2158s ][ Queries: 16 (0.0459s) ][ GZIP on - Debug on ]