This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Outbound mail fails immediately when remote end error code is the temporary error code "451 4.7.1 Please try again later"

I have to come back to this older thread of mine https://community.sophos.com/utm-firewall/f/mail-protection-smtp-pop3-antispam-and-antivirus/120948/outbound-mails-fail-with-greylisting---no-second-attempt because the problem is biting me again (or rather: still).

Situation summary (cf. above link): Outbound mail to a certain external domain fails without retry. They use greylisting (and so do we, but that is not the point here) and they reply with "451 4.7.1 Please try again later". As per RFC3463, both a 4xx basic status code and a 4.x.x extended status code indicate temproary failures and should thus make my UTM retry (even though section 3.8 of that RFC suggests that x.7.1 makes sense only in a permanent 5xx error)

Meanwhile, I found that exim had this behaviour (no retry when seeing a "451 4.7.1") already in 2013: https://lists.exim.org/lurker/message/20130305.141251.4c429c98.de.html or https://www.mail-archive.com/exim-users@exim.org/msg43004.html -- where there apparently was no solution
and in  2007 https://lists.exim.org/lurker/message/20070529.165025.0b32c5de.ja.html -- where the successful solution was to upgrade exim to version 4.67 (but we are already at 4.82)

I also wanted to try (as suggested by Balfson in the referenced tread)

    /var/mdw/scripts/smtp stop
    dropdb -U postgres smtp
    createdb -U postgres smtp
    /var/mdw/scripts/smtp start

However, even though the first line succeeds

    ::Stopping SMTP Proxy
    [ ok ]

I cannot run the second line

    dropdb: database removal failed: ERROR:  database "smtp" is being accessed by other users
    DETAIL:  There are 7 other sessions using the database

The number 7 (supposedly caused by mails in progress?) does not go down if I try later. After several retries over more than a minute, I started smtp again. Another attempt half an hour later resulted in the same "7 other sessions", so I assume that this "7" is systematic.



This thread was automatically locked due to age.
Parents
  • Is this just a single domain doing this to you?  If so, then maybe it's a misconfiguration on their part.

    To re-initialize all PostgreSQL databases (deletes all graphs and data, but does not affect the logs):

    # /etc/init.d/postgresql92 rebuild

    Any better luck with that?

    Cheers - Bob
    PS Thanks for the response about the dropdb command.

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Reply
  • Is this just a single domain doing this to you?  If so, then maybe it's a misconfiguration on their part.

    To re-initialize all PostgreSQL databases (deletes all graphs and data, but does not affect the logs):

    # /etc/init.d/postgresql92 rebuild

    Any better luck with that?

    Cheers - Bob
    PS Thanks for the response about the dropdb command.

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Children
No Data