Koozali.org: home of the SME Server

MX backup on sme7.3 with ISP smtp as external mailserver won't deliver mail

Offline sqlerror

  • ***
  • 50
  • +0/-0
I have the MX backup contrib on a sme7.3 with my ISP's smtp as external mailserver (port 25 blocked).

Clients on LAN have their e-mail clients set to use the sme server as outgoing mailserver.
Sme is configured to use the ISP's mailserver to deliver outgoing mails.
Works flawlessly.

One domain for wich this sme server handles mail as secondary mailserver, went offline for a couple of hours. The mail for that domain was delivered to the sme and put into the qmail external queue for later delivery.

But resending the mails from the external queue once the beackupped domain's mailserver becomes available again, fails.
This configuration prevents delivery of any mail to backuped mail domains, as messages from the remote qmail queue are apperently send over port 25 directly. Regardless of the settings in de the server manager email panel, the mail is send over port 25 directly when delivered from the remote queue to the backupped domain when it's available to recieve the queued mail.

Clients on the lan can send and recieve normally, even to addresses on the backuped domain.  Only the qmail resend command is disregarding the external mailserver setting as tries to send over port 25 directly with no success:

@4000000048e29cb63aabd814 delivery 2694: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/


Can this be fixed by telling qmail-resend to use the settings for the external mailserver from my isp to deliver mail to the outside?

Cheers,

Sqlerror
« Last Edit: October 03, 2008, 09:17:10 PM by sqlerror »

Offline sqlerror

  • ***
  • 50
  • +0/-0
Found an reason for not sendeing the remote queue in /var/qmail/control/smtproutes:
Still searching for answer how to get around this...

The backupped domain was listed in this control file.
Template /etc/e-smith/templates/var/qmail/control/smtproutes/30mxbackup states that domains for mxbackup are not to be using smart host.
Code: [Select]
{
    # vim: ft=perl ts=4 sw=4 et:
    $OUT = "";

    # ------------------------------------------------
    # if mxbackup is enabled, we have to check if
    # there a 'smart host'. If yes, the smart host
    # should not be used for all 'MX-Backuped' domains.
    # ------------------------------------------------

    if ( ( $mxbackup{ status } || "disabled" ) eq "enabled" )
    {

        #--------------------------------------------------
        # Now check for SMTP smart host
        #--------------------------------------------------

        if (
            $SMTPSmartHost
            &&
            ($SMTPSmartHost ne 'off')
            &&
            ($SMTPSmartHost !~ /^\s*$/)
        )
        {
                my %MXValues = split /,/, ( $mxbackup{ name } || "" ) ;
                foreach my $data ( sort { ( join ( "\.", reverse( split /\./, $a) ) )
                                      cmp
                                      ( join( "\.", reverse( split /\./, $b ) ) ) }
                               keys %MXValues ) {
                    $OUT .= "$data:\n" ;
                    $OUT .= ".$data:\n" if ( $MXValues{ $data } ) ;
            }
        }
    }
    chomp ($OUT);
}




Wonder why this must be the case. Wonder why  if mxbackup is enabled, we have to check if there a 'smart host'. If yes, the smart host should not be used for all 'MX-Backuped' domains.

Sqlerror
« Last Edit: October 03, 2008, 10:24:06 PM by sqlerror »