127.0.0.1[127.0.0.1]:10024: Connection refused

Discussion in 'Installation/Configuration' started by devkev, Sep 21, 2009.

  1. devkev

    devkev New Member

    Sorry to make another post about email problems. I've read some of the others, but I can't seem to figure it out.

    I keep getting this in the log files:

    delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

    Here is my main.cf
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname

    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    readme_directory = /usr/share/doc/postfix

    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname = xxxxxxxxx.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = xxxxxxx.com, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_tls_security_level = may
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = maildrop
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    content_filter =
    receive_override_options = no_address_mappings
    html_directory = /usr/share/doc/postfix/html


    Thanks in advance for any help.
     
  2. bajodel

    bajodel Member

    post also [ /etc/postfix/master.cf ] ..


    Bye..

    bajodel.
     
  3. devkev

    devkev New Member

    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    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}


    amavis unix - - - - 2 smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes

    127.0.0.1:10025 inet 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 smtpd_bind_address=127.0.0.1
     
  4. bajodel

    bajodel Member

    This command should be enough..
    # postconf -e 'content_filter = amavis:[127.0.0.1]:10024'

    Reload/Restart postfix ..
    # postfix reload

    And check if amavis is running..
    # netstat -tap | grep amavis
    (you should see a LISTEN port..)

    If this do not fix you problem, you may want to consider to reconfigure all services on IPSConfig3 passing trough the setup/update procedure.
    I don't remember if there is already a script for this .. which can be called directly (in the mean time .. i can check).


    Bye..

    bajodel.
     
    Last edited: Sep 21, 2009
  5. devkev

    devkev New Member

    Thanks! I think that fixed one of my problems. I'm no longer getting the Connection refused error. But now I'm getting this on one of my domains:

    Sep 21 12:38:56 ubuntu postfix/local[24451]: C6B4B70F0C0: to=<[email protected]>, relay=local, delay=0.03, delays=0.01/0/0/0.02, dsn=5.1.1, status=bounced (unknown user: "nancy")

    This user is set up in ISPConfig on that domain. I've checked all the settings and I deleted and recreated it. But still no luck.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Are there any other error messages in the mail log e.g. when you restart postfix? And which Linux distribution do you use?
     
  7. 007007

    007007 New Member

    Hello,

    sorry to bump old topic

    I have the same problem recently, full of error and emails not received/sent are listed in mailqueue

    http://imageshack.us/m/836/8288/postfix.png

    any idea please?

    i have ispconfig last version + debian5

    thank you
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please start amavisd.
     
  9. thibotus01

    thibotus01 Member

    Have the same issue:

    Dec 19 15:23:56 sd postfix/smtp[179]: BFE3738054E: to=<[email protected]>, relay=none, delay=0.14, delays=0.13/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

    postfix and amavisd-new are started.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Restart amavisd and if it does not start, check the mail.log file for the reason.
     
  11. thibotus01

    thibotus01 Member

    It was a permission issue in clamav.

    I did this earlier:
    In /etc/clamav/clamd.conf
    AllowSupplementaryGroups false -> true

    But then I didn't restart it...
    So:
    service clamav-daemon restart
    Solved the issue.
     
  12. tester321

    tester321 Member

    I know this is an old thread, but for me the solution was:

    sudo chown amavis:amavis /var/lib/amavis/tmp

    amavis crashes on restart because the tmp directory is not writable.

    Hopefully this helps someone else.
     
    Last edited: Nov 19, 2016
    ustoopia and Rajnish Khare like this.
  13. 30uke

    30uke Active Member HowtoForge Supporter

    This happened to me (after a reboot of the server) too. I just had to issue "postfix reload" and mail started to work again.
     

Share This Page