amavisd-release wildcard port error

Discussion in 'Installation/Configuration' started by dmgeurts, Oct 30, 2016.

  1. dmgeurts

    dmgeurts Member

    [ISPConfig 3.1.1 - Ubuntu 16.04]
    So far have been unable to find much related to the following error:
    Code:
    Oct 30 22:38:13 server amavis[4290]: (rel-1fTBTXpDDH7m) (!)connect to 127.0.0.1:* failed, attempt #1: Wildcarded port, but client's port not known: 127.0.0.1:* at /usr/sbin/amavisd-new line 8073, <GEN156> line 17.
    
    root@server:/etc/postfix# amavisd-release n/spam-nfqHE1cgqAE3.gz
    connecting to a UNIX socket /var/lib/amavis/amavisd.sock
    > request=release
    > mail_id=nfqHE1cgqAE3
    > quar_type=Z
    > mail_file=n/spam-nfqHE1cgqAE3.gz
    waiting for response
    < setreply=451 4.5.0 From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:127.0.0.1:*): id=rel-ODAzxaQwS273
    451 4.5.0 From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:127.0.0.1:*): id=rel-ODAzxaQwS273
    [/I]
    As a result I can't release valid quarantined emails. All email handling works fine, just not this.
    My master.cf:
    [I]smtp      inet  n       -       y       -       1       postscreen
    smtpd     pass  -       -       y       -       -       smtpd
    dnsblog   unix  -       -       y       -       0       dnsblog
    tlsproxy  unix  -       -       y       -       0       tlsproxy
    submission inet n       -       y       -       -       smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    smtps     inet  n       -       y       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    pickup    unix  n       -       y       60      1       pickup
    cleanup   unix  n       -       y       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    tlsmgr    unix  -       -       y       1000?   1       tlsmgr
    rewrite   unix  -       -       y       -       -       trivial-rewrite
    bounce    unix  -       -       y       -       0       bounce
    defer     unix  -       -       y       -       0       bounce
    trace     unix  -       -       y       -       0       bounce
    verify    unix  -       -       y       -       1       verify
    flush     unix  n       -       y       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       y       -       -       smtp
    relay     unix  -       -       y       -       -       smtp
    showq     unix  n       -       y       -       -       showq
    error     unix  -       -       y       -       -       error
    retry     unix  -       -       y       -       -       error
    discard   unix  -       -       y       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       y       -       -       lmtp
    anvil     unix  -       -       y       -       1       anvil
    scache    unix  -       -       y       -       1       scache
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    127.0.0.1:10025 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
            -o disable_dns_lookups=yes
    
    127.0.0.1:10027 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
                -o milter_default_action=accept
            -o milter_macro_daemon_name=ORIGINATING
            -o disable_dns_lookups=yes
    
    policy-spf  unix  -       n       n       -       -       spawn
         user=nobody argv=/usr/bin/policyd-spf
     
    Last edited: Nov 13, 2016
  2. dmgeurts

    dmgeurts Member

    Some debugging details when trying to release quarantined email. Any suggestions welcome:

    Code:
    Nov 13 17:35:32 server amavis[23078]: TempDir::prepare_dir: created directory /var/lib/amavis/tmp/amavis-20161113T173532-23078-HCDeF889
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) preprocess_policy_query: opening mail '/var/lib/amavis/virusmails/7/spam-7xvoL
    _laec-f.gz'
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) Request: release 7xvoL_laec-f /var/lib/amavis/tmp/amavis-20161113T173532-23078-HCDeF889:  ->
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) msg_from_quarantine: releasing 7xvoL_laec-f
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) Quarantined message release (miscategorized): 7xvoL_laec-f <[email protected]> -> <[email protected]>
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header encoded (all-ASCII): Resent-From: "Content-filter at server.example.com" <[email protected]>
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header: Resent-From: "Content-filter at server.example.com"\n\t<[email protected]>\n
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header encoded (all-ASCII): Resent-To: <[email protected]>
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header: Resent-To: <[email protected]>\n
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header encoded (all-ASCII): Resent-Date: Sun, 13 Nov 2016 17:35:32 +0100 (CET)
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header: Resent-Date: Sun, 13 Nov 2016 17:35:32 +0100 (CET)\n
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header encoded (all-ASCII): Resent-Message-ID: <[email protected]>
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header: Resent-Message-ID: <[email protected]>\n
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header encoded (all-ASCII): Received: from unknown\n by localhost (amavisd-new, unix socket)\n id b0Y2Amk3l4uf\n for <[email protected]>;\n Sun, 13 Nov 2016 17:35:32 +0100 (CET)
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) header: Received: from unknown by localhost (amavisd-new, unix socket) id b0Y2Amk3l4uf\n\tfor <[email protected]>; Sun, 13 Nov 2016 17:35:32 +0100 (CET)\n
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) dkim: candidate originators: mail_from:<[email protected]>
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) query_keys: cached [email protected]
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) lookup_hash([email protected]) matches keys: "."=>HASH(0x2526648)
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) lookup [dkim_signature_options_bysender], 1 matches for "[email protected]", results: "."=>{ttl=>"1814400",c=>"relaxed/simple"}
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) dkim: signature options for [email protected](mail_from): d=server.example.com; c=relaxed/simple; ttl=1814400; a=rsa-sha256
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) dkim: not signing, empty signing domain, From:
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) about to connect to smtp:127.0.0.1:*, b0Y2Amk3l4uf(7xvoL_laec-f) FWD from <[email protected]> -> <[email protected]>
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) get_deadline fwd_init - deadline in 480.0 s, set to 480.000 s
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) smtp session: setting up a new session
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) establish_or_refresh, state: down
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) (!)connect to 127.0.0.1:* failed, attempt #1: Wildcarded port, but client's port not known: 127.0.0.1:* at /usr/sbin/amavisd-new line 8073, <GEN93> line 17.
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) mail_via_smtp: session failed: All attempts (1) failed connecting to smtp:127.0.0.1:*
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) get_deadline fwd-end-chkpnt - deadline in 480.0 s, set to 288.000 s
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) prolong_timer fwd-end-chkpnt: timer 288, was 0, deadline in 480.0 s
    Nov 13 17:35:32 server amavis[23078]: (rel-b0Y2Amk3l4uf) (!)b0Y2Amk3l4uf(7xvoL_laec-f) FWD from <[email protected]> -> <[email protected]>,  451 4.5.0 From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:127.0.0.1:*): id=rel-b0Y2Amk3l4uf
    
     
  3. dmgeurts

    dmgeurts Member

    Finally found the fix:
    When releasing emails doesn't work right out of the box, change the port '*' to '10025', in /etc/amavis/conf.d/50-user. Reconfiguring ISPConfig will likely revert this change:
    vi /etc/amavis/conf.d/50-user
    Code:
    [...]
    # :* = send to incoming Port + 1
    $forward_method = 'smtp:127.0.0.1:*';
    #$notify_method = 'smtp:127.0.0.1:*';
    $notify_method = 'smtp:127.0.0.1:10025';
    [...]
     
    DantePasquale likes this.

Share This Page