Our backup mail server (which I have just re-configured) tries to contact the primary mail server, and fails. My log shows repeatedly "connection refused": May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: makeconnection (mail.greenspot.fi. [83.143.217.182]) failed: Connection refused by mail.greenspot.fi. May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: to=<myuser at mydomain.com>, delay=00:38:16, xdelay=00:00:00, mailer=esmtp, pri=10021795, relay=mail.greenspot.fi. [83.143.217.182], dsn=4.0.0, stat=Deferred: Connection refused by mail.greenspot.fi. But yet I can successfully telnet that host: # telnet mail.greenspot.fi 25 Trying 83.143.217.182... Connected to mail.greenspot.fi (83.143.217.182). Escape character is '^]'. 220 mail.greenspot.fi ESMTP Sendmail; Tue, 15 May 2012 22:34:22 +0300 Also, the mailer-daemon *can* send automatic warning messages to mail.greenspot.fi just fine. So, the error probably is in my sendmail configuration. The error appeared as I today reconfigured the backup mail server to use a "dual sendmail" setup with amavis and greylisting. How could I proceed? - Jussi
Am 15.05.2012 21:44, schrieb Jussi Hirvi:> Our backup mail server (which I have just re-configured) tries to > contact the primary mail server, and fails. My log shows repeatedly > "connection refused": > > May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: makeconnection > (mail.greenspot.fi. [83.143.217.182]) failed: Connection refused by > mail.greenspot.fi. > May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: > to=<myuser at mydomain.com>, delay=00:38:16, xdelay=00:00:00, mailer=esmtp, > pri=10021795, relay=mail.greenspot.fi. [83.143.217.182], dsn=4.0.0, > stat=Deferred: Connection refused by mail.greenspot.fi. > > But yet I can successfully telnet that host: > > # telnet mail.greenspot.fi 25 > Trying 83.143.217.182... > Connected to mail.greenspot.fi (83.143.217.182). > Escape character is '^]'. > 220 mail.greenspot.fi ESMTP Sendmail; Tue, 15 May 2012 22:34:22 +0300It is technically impossible that the telnet to target port 25 succeeds from the same system on which the Sendmail gets a connection refused, unless Sendmail is configured to use a non-standard target port.> Also, the mailer-daemon *can* send automatic warning messages to > mail.greenspot.fi just fine. > > So, the error probably is in my sendmail configuration. > > The error appeared as I today reconfigured the backup mail server to use > a "dual sendmail" setup with amavis and greylisting. How could I proceed?Deeply inspect your sendmail.mc files. Provide them here if you like to get assistance.> - JussiAlexander
Some more info. Below is a more complete telnet session from backup mail server (mx2.greenspot.fi) to primary mail server (mail.greenspot.fi). It only proves that sending mail works fine from command-line. But my sendmail setup cannot do the same. I wrote that MAILER-DAEMON can get mail through. I am not actually sure about that. (One warning message did come through, but maybe it was because something I changed in the config - not sure anymore.) Here's the successful telnet session: [root at mx2 ~]# telnet mail.greenspot.fi 25 Trying 83.143.217.182... Connected to mail.greenspot.fi (83.143.217.182). Escape character is '^]'. 220 mail.greenspot.fi ESMTP Sendmail; Tue, 15 May 2012 23:17:59 +0300 HELO mx2.greenspot.fi 250 mail.greenspot.fi Hello mx2.greenspot.fi [83.143.217.179], pleased to meet you MAIL FROM: me1 at domain.com 250 2.1.0 me1 at domain.com... Sender ok RCPT TO: me2 at domain.com 250 2.1.5 me2 at domain.com... Recipient ok DATA 354 Enter mail, end with "." on a line by itself Testing testing . 250 2.0.0 q4FKHxf7012785 Message accepted for delivery QUIT 221 2.0.0 mail.greenspot.fi closing connection Connection closed by foreign host. - Jussi