Postfix connection refused error

124 views
Skip to first unread message

Abhishek K

unread,
Sep 18, 2010, 2:38:45 AM9/18/10
to vg...@googlegroups.com
Hello All,

I have a postfix server problem. I get the following lines in the
mail.log when I do "telnet localhost 25". I have looked a lot but unable
to fix this issue:

Sep 18 11:57:41 server postfix/smtpd[3796]: initializing the server-side
TLS engine
Sep 18 11:57:41 server postfix/tlsmgr[3798]: open smtpd TLS cache
btree:/var/lib/postfix/smtpd_scache
Sep 18 11:57:41 server postfix/tlsmgr[3798]: tlsmgr_cache_run_event:
start TLS smtpd session cache cleanup
Sep 18 11:57:41 server postfix/smtpd[3796]: connect from
localhost[127.0.0.1]
Sep 18 11:58:08 server postfix/smtpd[3796]: A7F8024017:
client=localhost[127.0.0.1]
Sep 18 11:58:18 server postfix/cleanup[3800]: A7F8024017:
message-id=<201009180628...@mail.domain.in>
Sep 18 11:58:18 server postfix/qmgr[3794]: A7F8024017:
from=<abhi...@domain.in>, size=351, nrcpt=1 (queue active)
Sep 18 11:58:23 server postfix/smtp[3801]: connect to
mail.domain.in[122.165.69.244]:25: Connection refused
Sep 18 11:58:24 server postfix/smtp[3801]: A7F8024017:
to=<abhi...@gmail.com>, relay=none, delay=29, delays=24/0.14/5.1/0,
dsn=4.4.1, status=deferred (connect to mail.domain.in[122.165.x.x]:25:
Connection refused)
Sep 18 11:58:42 server postfix/smtpd[3796]: disconnect from
localhost[127.0.0.1]

My two files are here:

http://dl.dropbox.com/u/5644455/main.cf

http://dl.dropbox.com/u/5644455/master.cf

No matter what I do, it just fails with the above error all the time.
Any help in this matter is appreciated.

Thank you.

Abhi

�Almost everything you do will seem insignificant, but it is important that you do it�
-- Mahatma Gandhi

Alok Thaker

unread,
Sep 18, 2010, 3:42:50 AM9/18/10
to vg...@googlegroups.com
Hi,

You might be running one more service called sendmail, just stop the service and try it once again. Restart Postfix make sure you can't have 2 services listening on one machine on the same port.  I have not seen your main.cf but first try this one out and then I would go through your main.cf file.

Thanks,
Alok
Linux/Network/Security Consultant !
Inferno Solutions !
Go with the best !
www.inferno.co.in !
All Linux-Java-Web Solutions-Training under one Roof !
M:- 9925519798

“Almost everything you do will seem insignificant, but it is important that you do it”
-- Mahatma Gandhi

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG-un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

Abhishek K

unread,
Sep 18, 2010, 4:08:42 AM9/18/10
to vg...@googlegroups.com, Alok Thaker

Hi,
> You might be running one more service called sendmail, just stop the
> service and try it once again. Restart Postfix make sure you can't
> have 2 services listening on one machine on the same port. I have not
> seen your main.cf <http://main.cf> but first try this one out and then
> I would go through your main.cf <http://main.cf> file.
I tried to restart, and it restarted just like before without any
errors. I have not instalkled sendmail at all. Hope this output of
netstat helps:

abhishek@server:~$ netstat -a|grep smtp
tcp 0 0 *:ssmtp *:*
LISTEN
tcp 0 0 *:smtp *:*
LISTEN
unix 2 [ ACC ] STREAM LISTENING 16604 private/bsmtp
unix 2 [ ACC ] STREAM LISTENING 16548 private/smtp

I am not sure if this is what you are looking for. I tried to grep for
following:

"ps -aux|grep send"
"ps -aux|grep smtp"
"ps -ae |grep send"
"ps -ae |grep smtp"

These above commands fail to pull up anything at all.

abhishek@server:~$ ps -aux |grep postfix
Warning: bad ps syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html
root 820 0.0 0.4 8772 824 ? Ss 09:59 0:00
/usr/sbin/saslauthd -a pam -O login -r -c -m
/var/spool/postfix/var/run/saslauthd -n 5
root 823 0.0 0.2 8772 436 ? S 09:59 0:00
/usr/sbin/saslauthd -a pam -O login -r -c -m
/var/spool/postfix/var/run/saslauthd -n 5
root 824 0.0 0.2 8772 432 ? S 09:59 0:00
/usr/sbin/saslauthd -a pam -O login -r -c -m
/var/spool/postfix/var/run/saslauthd -n 5
root 825 0.0 0.2 8772 432 ? S 09:59 0:00
/usr/sbin/saslauthd -a pam -O login -r -c -m
/var/spool/postfix/var/run/saslauthd -n 5
root 826 0.0 0.2 8772 432 ? S 09:59 0:00
/usr/sbin/saslauthd -a pam -O login -r -c -m
/var/spool/postfix/var/run/saslauthd -n 5
root 3690 0.0 0.9 5800 1788 ? Ss 11:53 0:01
/usr/lib/postfix/master
postfix 3794 0.0 1.0 5952 1888 ? S 11:57 0:00 *qmgr*
-l -t fifo -u
postfix 3798 0.0 1.3 6244 2616 ? S 11:57 0:00
*tlsmgr* -l -t unix -u -c
postfix 4859 0.0 0.9 5816 1696 ? S 13:28 0:00
*pickup* -l -t fifo -u -c
abhishek 5005 0.0 0.4 3320 768 pts/0 S+ 13:37 0:00 grep
--color=auto postfix

It seems smtp is not running.

Appreciate all the help on this.

Thanks,
Abhishek


>
> Thanks,
> Alok
> Linux/Network/Security Consultant !
> Inferno Solutions !
> Go with the best !

> www.inferno.co.in <http://www.inferno.co.in> !


> All Linux-Java-Web Solutions-Training under one Roof !
> M:- 9925519798
>
> On Sat, Sep 18, 2010 at 3:38 PM, Abhishek K <abhi...@gmail.com
> <mailto:abhi...@gmail.com>> wrote:
>
> Hello All,
>
> I have a postfix server problem. I get the following lines in the
> mail.log when I do "telnet localhost 25". I have looked a lot but
> unable
> to fix this issue:
>
> Sep 18 11:57:41 server postfix/smtpd[3796]: initializing the
> server-side
> TLS engine
> Sep 18 11:57:41 server postfix/tlsmgr[3798]: open smtpd TLS cache
> btree:/var/lib/postfix/smtpd_scache
> Sep 18 11:57:41 server postfix/tlsmgr[3798]: tlsmgr_cache_run_event:
> start TLS smtpd session cache cleanup
> Sep 18 11:57:41 server postfix/smtpd[3796]: connect from
> localhost[127.0.0.1]
> Sep 18 11:58:08 server postfix/smtpd[3796]: A7F8024017:
> client=localhost[127.0.0.1]
> Sep 18 11:58:18 server postfix/cleanup[3800]: A7F8024017:
> message-id=<201009180628...@mail.domain.in

> <mailto:201009180628...@mail.domain.in>>


> Sep 18 11:58:18 server postfix/qmgr[3794]: A7F8024017:

> from=<abhi...@domain.in <mailto:abhi...@domain.in>>, size=351,


> nrcpt=1 (queue active)
> Sep 18 11:58:23 server postfix/smtp[3801]: connect to

> mail.domain.in <http://mail.domain.in>[122.165.69.244]:25:


> Connection refused
> Sep 18 11:58:24 server postfix/smtp[3801]: A7F8024017:

> to=<abhi...@gmail.com <mailto:abhi...@gmail.com>>, relay=none,


> delay=29, delays=24/0.14/5.1/0,
> dsn=4.4.1, status=deferred (connect to mail.domain.in

> <http://mail.domain.in>[122.165.x.x]:25:


> Connection refused)
> Sep 18 11:58:42 server postfix/smtpd[3796]: disconnect from
> localhost[127.0.0.1]
>
> My two files are here:
>
> http://dl.dropbox.com/u/5644455/main.cf
>
> http://dl.dropbox.com/u/5644455/master.cf
>
> No matter what I do, it just fails with the above error all the time.
> Any help in this matter is appreciated.
>
> Thank you.
>
> Abhi
>

> �Almost everything you do will seem insignificant, but it is
> important that you do it�


> -- Mahatma Gandhi
>
> --
> Please read http://www.catb.org/~esr/faqs/smart-questions.html

> <http://www.catb.org/%7Eesr/faqs/smart-questions.html> before posting.


> You received this message because you are subscribed to the
> "Vibrant GNU/Linux User Group".
> To stop receiving emails from this group, mail to
> VGLUG-un...@googlegroups.com

> <mailto:VGLUG-un...@googlegroups.com>


> To post to this group, send email to VG...@googlegroups.com

> <mailto:VG...@googlegroups.com>


> For more options, visit this group at
> http://groups.google.com/group/VGLUG
>
>

> <http://www.catb.org/%7Eesr/faqs/smart-questions.html> before posting.


> You received this message because you are subscribed to the "Vibrant
> GNU/Linux User Group".
> To stop receiving emails from this group, mail to
> VGLUG-un...@googlegroups.com
> To post to this group, send email to VG...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/VGLUG

--

Abhishek Kharvadi
Sr. Network Engineer (TAC)
Alcatel-Lucent
http://kharvadi.blogspot.com <http://kharvadi.blogspot.com/>
Follow me on Twitter

�Almost everything you do will seem insignificant, but it is important that you do it�
-- Mahatma Gandhi

Abhishek K

unread,
Sep 19, 2010, 4:12:04 AM9/19/10
to vg...@googlegroups.com
Hi,

Can anybody help? Is this a DNS error? I have disabled DNS lookup, but
the issue is there. Internal email works fine without a hitch, from
anywhere. Its just the external domains which gives me connection
refused error message.

I have following in recipient list. Is this correct:-

*smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_non_fqdn_recipient
reject_unknown_recipient_domain reject_unauth_destination permit*

Any pointers is appreciated.

Regards,
Abhishek

Abhishek K

unread,
Sep 21, 2010, 1:22:21 AM9/21/10
to vg...@googlegroups.com
Nobody has pointers?

I have already checked online, and found reverse DNS to be the issue in
a lot of cases. My reverse dns does not pull up my mail server. Could
this be case? Does anyone know how to disable reverse dns lookup on
postfix mail server?

Thank you in advance for the help.

Regards,
Abhishek

Abhishek K

unread,
Sep 25, 2010, 10:05:38 AM9/25/10
to vg...@googlegroups.com
Hello All,

On Saturday 18 September 2010 01:12 PM, Alok Thaker wrote:
> Hi,
>
> You might be running one more service called sendmail, just stop the
> service and try it once again. Restart Postfix make sure you can't
> have 2 services listening on one machine on the same port. I have not

> seen your main.cf <http://main.cf> but first try this one out and then
> I would go through your main.cf <http://main.cf> file.
>
I finally resolved the issue. It seemed to be with the relayhost
information. I had specified my own mail server as the relayhost.

// I just hit myself on the head.

Anyway, thank you all for helping out :) I am a happy guy now

Regards,
Abhishek

> Thanks,
> Alok
> Linux/Network/Security Consultant !
> Inferno Solutions !
> Go with the best !

> www.inferno.co.in <http://www.inferno.co.in> !


> All Linux-Java-Web Solutions-Training under one Roof !
> M:- 9925519798
>
> On Sat, Sep 18, 2010 at 3:38 PM, Abhishek K <abhi...@gmail.com
> <mailto:abhi...@gmail.com>> wrote:
>
> Hello All,
>
> I have a postfix server problem. I get the following lines in the
> mail.log when I do "telnet localhost 25". I have looked a lot but
> unable
> to fix this issue:
>
> Sep 18 11:57:41 server postfix/smtpd[3796]: initializing the
> server-side
> TLS engine
> Sep 18 11:57:41 server postfix/tlsmgr[3798]: open smtpd TLS cache
> btree:/var/lib/postfix/smtpd_scache
> Sep 18 11:57:41 server postfix/tlsmgr[3798]: tlsmgr_cache_run_event:
> start TLS smtpd session cache cleanup
> Sep 18 11:57:41 server postfix/smtpd[3796]: connect from
> localhost[127.0.0.1]
> Sep 18 11:58:08 server postfix/smtpd[3796]: A7F8024017:
> client=localhost[127.0.0.1]
> Sep 18 11:58:18 server postfix/cleanup[3800]: A7F8024017:
> message-id=<201009180628...@mail.domain.in

> <mailto:201009180628...@mail.domain.in>>


> Sep 18 11:58:18 server postfix/qmgr[3794]: A7F8024017:

> from=<abhi...@domain.in <mailto:abhi...@domain.in>>, size=351,


> nrcpt=1 (queue active)
> Sep 18 11:58:23 server postfix/smtp[3801]: connect to

> mail.domain.in <http://mail.domain.in>[122.165.69.244]:25:


> Connection refused
> Sep 18 11:58:24 server postfix/smtp[3801]: A7F8024017:

> to=<abhi...@gmail.com <mailto:abhi...@gmail.com>>, relay=none,


> delay=29, delays=24/0.14/5.1/0,
> dsn=4.4.1, status=deferred (connect to mail.domain.in

> <http://mail.domain.in>[122.165.x.x]:25:


> Connection refused)
> Sep 18 11:58:42 server postfix/smtpd[3796]: disconnect from
> localhost[127.0.0.1]
>
> My two files are here:
>
> http://dl.dropbox.com/u/5644455/main.cf
>
> http://dl.dropbox.com/u/5644455/master.cf
>
> No matter what I do, it just fails with the above error all the time.
> Any help in this matter is appreciated.
>
> Thank you.
>
> Abhi
>

> �Almost everything you do will seem insignificant, but it is
> important that you do it�


> -- Mahatma Gandhi
>
> --
> Please read http://www.catb.org/~esr/faqs/smart-questions.html

> <http://www.catb.org/%7Eesr/faqs/smart-questions.html> before posting.


> You received this message because you are subscribed to the
> "Vibrant GNU/Linux User Group".
> To stop receiving emails from this group, mail to
> VGLUG-un...@googlegroups.com

> <mailto:VGLUG-un...@googlegroups.com>


> To post to this group, send email to VG...@googlegroups.com

> <mailto:VG...@googlegroups.com>


> For more options, visit this group at
> http://groups.google.com/group/VGLUG
>
>

> <http://www.catb.org/%7Eesr/faqs/smart-questions.html> before posting.


> You received this message because you are subscribed to the "Vibrant
> GNU/Linux User Group".
> To stop receiving emails from this group, mail to
> VGLUG-un...@googlegroups.com
> To post to this group, send email to VG...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/VGLUG

--

Abhishek Kharvadi
Sr. Network Engineer (TAC)
Alcatel-Lucent
http://kharvadi.blogspot.com <http://kharvadi.blogspot.com/>
Follow me on Twitter

�Almost everything you do will seem insignificant, but it is important that you do it�
-- Mahatma Gandhi

Reply all
Reply to author
Forward
0 new messages