Sendmail config? I get "connection refused"

Sendmail config? I get "connection refused"

Post by byy.. » Tue, 17 Dec 2002 11:07:24



The [problem is as title -- the machine rejects the sendmail
connection, which I thought I had running on port 21.

My /etc/sysconfig/ipchains looks like this:

# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
#       firewall; such entries will *not* be listed here.
:input ACCEPT
:forward ACCEPT
:output ACCEPT
-A input -s 0/0 -d 0/0 25 -p tcp -y -j ACCEPT
-A input -s 0/0 -d 0/0 80 -p tcp -y -j ACCEPT
-A input -s 0/0 -d 0/0 21 -p tcp -y -j ACCEPT
-A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT
-A input -s 0/0 -d 0/0 23 -p tcp -y -j ACCEPT
-A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth0 -j ACCEPT
-A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth1 -j ACCEPT
-A input -s 0/0 -d 0/0 -i lo -j ACCEPT
-A input -s 0/0 -d 0/0 -i eth1 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 0:1023 -y -j REJECT
-A input -p tcp -s 0/0 -d 0/0 2049 -y -j REJECT
-A input -p udp -s 0/0 -d 0/0 0:1023 -j REJECT
-A input -p udp -s 0/0 -d 0/0 2049 -j REJECT
-A input -p tcp -s 0/0 -d 0/0 6000:6009 -y -j REJECT
-A input -p tcp -s 0/0 -d 0/0 7100 -y -j REJECT
-P forward DENY
-A forward -s 192.168.0.0/16 -d 0/0 -j MASQ

what might be wrogn?

 
 
 

Sendmail config? I get "connection refused"

Post by Wayne Polloc » Wed, 18 Dec 2002 04:00:35


Default sendmail configuraiton for many distributions today
(such as Red Hat) will not listen to incoming email except
from the localhost.  I don't think the problem is the firewall
you have shown: rule 5 accepts the initial smtp connection and
no other rules reject subsequent packets to this port, and the
default policy is accept.

Do a "ps -ef" and see if sendmail is running and listing for
localhost only.  If so, you must rebuild your sendmail.cf
file (usually in /etc).  Edit the sendmail.mc file (usually
in /etc/mail) and change

        DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
to
        dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

(or you can change the address to 0.0.0.0 or 255.255.255.255,
I forget which to user for this file.)  Then:

        cd /etc/mail
        m4 sendmail.mc >sendmail.cf
        wc -l sendmail.cf  # should be 100-2000 lines
        cd ..
        mv sendmail.cf sendmail.cf.ORIG
        mv mail/sendmail.cf .
        ls -l sendmail.cf*  # verify permissions/ownership
        /etc/init.d/sendmail restart
        tail /var/log/messages #look for problems
        ps -ef |grep [s]endmail

Hope this helps!

-Wayne


> The [problem is as title -- the machine rejects the sendmail
> connection, which I thought I had running on port 21.

> My /etc/sysconfig/ipchains looks like this:

> # Firewall configuration written by lokkit
> # Manual customization of this file is not recommended.
> # Note: ifup-post will punch the current nameservers through the
> #       firewall; such entries will *not* be listed here.
> :input ACCEPT
> :forward ACCEPT
> :output ACCEPT
> -A input -s 0/0 -d 0/0 25 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 80 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 21 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 23 -p tcp -y -j ACCEPT
> -A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth0 -j ACCEPT
> -A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth1 -j ACCEPT
> -A input -s 0/0 -d 0/0 -i lo -j ACCEPT
> -A input -s 0/0 -d 0/0 -i eth1 -j ACCEPT
> -A input -p tcp -s 0/0 -d 0/0 0:1023 -y -j REJECT
> -A input -p tcp -s 0/0 -d 0/0 2049 -y -j REJECT
> -A input -p udp -s 0/0 -d 0/0 0:1023 -j REJECT
> -A input -p udp -s 0/0 -d 0/0 2049 -j REJECT
> -A input -p tcp -s 0/0 -d 0/0 6000:6009 -y -j REJECT
> -A input -p tcp -s 0/0 -d 0/0 7100 -y -j REJECT
> -P forward DENY
> -A forward -s 192.168.0.0/16 -d 0/0 -j MASQ

> what might be wrogn?


 
 
 

Sendmail config? I get "connection refused"

Post by Paul Lutu » Wed, 18 Dec 2002 05:26:56



> The [problem is as title -- the machine rejects the sendmail
> connection, which I thought I had running on port 21.

Port 21 for sendmail? Look in /etc/services:

ftp             21/udp          fsp fspd

Quote:> what might be wrogn?

What is wrong is that you may have chosen the wrong port for sendmail.

Please explain how the machine "rejects" the sendmail connection. Include
any error messages or log entries (without posting the entire log).

--
Paul Lutus
http://www.arachnoid.com

 
 
 

Sendmail config? I get "connection refused"

Post by Andrzej Fili » Wed, 18 Dec 2002 07:15:19



> The [problem is as title -- the machine rejects the sendmail
> connection, which I thought I had running on port 21.

Of course you wanted to write 25

Quote:> My /etc/sysconfig/ipchains looks like this:

> # Firewall configuration written by lokkit
> # Manual customization of this file is not recommended.
> # Note: ifup-post will punch the current nameservers through the
> #       firewall; such entries will *not* be listed here.
> :input ACCEPT
> :forward ACCEPT
> :output ACCEPT
> -A input -s 0/0 -d 0/0 25 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 80 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 21 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT
> -A input -s 0/0 -d 0/0 23 -p tcp -y -j ACCEPT
> -A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth0 -j ACCEPT
> -A input -s 0/0 67:68 -d 0/0 67:68 -p udp -i eth1 -j ACCEPT
> -A input -s 0/0 -d 0/0 -i lo -j ACCEPT
> -A input -s 0/0 -d 0/0 -i eth1 -j ACCEPT
> -A input -p tcp -s 0/0 -d 0/0 0:1023 -y -j REJECT
> -A input -p tcp -s 0/0 -d 0/0 2049 -y -j REJECT
> -A input -p udp -s 0/0 -d 0/0 0:1023 -j REJECT
> -A input -p udp -s 0/0 -d 0/0 2049 -j REJECT
> -A input -p tcp -s 0/0 -d 0/0 6000:6009 -y -j REJECT
> -A input -p tcp -s 0/0 -d 0/0 7100 -y -j REJECT
> -P forward DENY
> -A forward -s 192.168.0.0/16 -d 0/0 -j MASQ

> what might be wrogn?

* Sendmail daemon may be not running
fuser -uv 25/tcp
* You may be using Red Hat (ifup-post will punch) - two possible
problems
http://www.sendmail.org/faq/section5.html#5.3.1.3
5.3.1.3 -- Why can't I receive mail with Red Hat 7.1 and later?

--
Andrzej [pl>en: Andrew] Adam Filip http://www.polbox.com/a/anfi/
*Random epigram* :
What a strange game.  The only winning move is not to play.
        -- WOP, "War Games"

 
 
 

1. Getting Sendmail to Read "Reply-To" and "Subject" from file

I have a cgi program which takes "cgi form" input and writes it to a
file. Then I mail the file to a user for processing.  In Solaris,
sendmail "sees" the Reply-To: and Subject: lines in the file and applies
them to the header. In AIX, the Reply-To: and Subject: are just added to
the message and not seen as part of the header?

The idea is to take incoming data from a particular e-mail address, write
it to a file, then mail the file to another user with the original e-mail
address now as the Reply-To: address.

Can anyone help with this??

2. hard disk corruption on P100 with linux 2.0.34

3. ipportfw on 2.0.x gets "connection refused"?

4. MS Exchange and Linux

5. GETSERVBYNAME()????????????????????"""""""""""""

6. Groups

7. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

8. SCO 3.2.4.2, ignores audit event mask

9. Type "(", ")" and "{", "}" in X...

10. Netscape 4.5 "connection refused" on Solaris 7 sparc

11. on Hint on why "...connection was refused..."?

12. nfs, Redhat 6.2, "mount: RPC: Unable to receive; errno = Connection refuse"

13. Xlib: connection to ":0.0" refused by server