Postfix - status=deferred; Connection timed out

Discussion in 'Server Operation' started by qwertybrg, Dec 28, 2007.

  1. qwertybrg

    qwertybrg New Member


    I followed this (Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 7.10)) tutorial for an email server. I did stept by step, with no errors. The only changes I have made are regarding ip's and domains.

    The server works fine, I can receive email, I also can send emails but only for the users of my domains. If i try to sent a message to [email protected] i get this error status=deferred (delivery temporarily suspended: connect to[]: Connection timed out).

    The server is behind a router, and i have forwarded port 25 and 110, 143 to the server. Also to mention that I have tested another email server which works fine on the same connection, so the provider didn't block port 25.

    i'll give you the main.conf of teh server and some lines from the log:


    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 = 1h

    # 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:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

    myhostname =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =, localhost, localhost.localdomain
    relayhost = localhost

    mynetworks =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    transport_maps = proxy:mysql:/etc/postfix/
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "Mailbox full"
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recip$
    content_filter = amavis:[]:10024
    receive_override_options = no_address_mappings​


    Dec 28 10:42:50 mail postfix/qmgr[7909]: D63C213FC15F: from=<[email protected]>, size=3156, nrcpt=1 (queue active)
    Dec 28 10:43:20 mail postfix/smtp[8107]: connect to[]: Connection timed out (port 25)
    Dec 28 10:43:50 mail postfix/smtp[8107]: connect to[]: Connection timed out (port 25)
    Dec 28 10:44:20 mail postfix/smtp[8107]: connect to[]: Connection timed out (port 25)
    Dec 28 10:44:50 mail postfix/smtp[8107]: connect to[]: Connection timed out (port 25)
    Dec 28 10:45:20 mail postfix/smtp[8107]: connect to[]: Connection timed out (port 25)
    Dec 28 10:45:20 mail postfix/smtp[8107]: D63C213FC15F: to=<[email protected]>, relay=none, delay=3179, delays=3029/0.02/150/0, dsn=4.4.1, status=deferred (connect to[]: Connection timed out)​

    Thanks in advance and Happy New Year to all of you
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If your internet connection has a dynamic IP address, then it will be blocked by most email providers like google or hotmail. You should consider to relay your emails trogh the smtp server of your internet provider instead.
  3. qwertybrg

    qwertybrg New Member

    thanks for the quick answer.

    I have a static IP.

    Maybe this can help. I found this error in the postfix queue list from postqueue -p

    3101 Fri Dec 28 15:52:02 [email protected]
    (Host or domain name not found. Name service error for name=localhost type=A: Host not found)

    I have a similar error for each mail that i tried to sent. :mad:

    Please advise......

    Thank you in advance
    Last edited: Dec 28, 2007
  4. falko

    falko Super Moderator ISPConfig Developer

    Please check if your server is blacklisted:

    What's in /etc/hosts?
  5. qwertybrg

    qwertybrg New Member

    Here is my /etc/hosts

    The server is behind a DSL router, in which i have set as a "virtual server" the address of the actual server.

    Thank you
  6. falko

    falko Super Moderator ISPConfig Developer

    Please try this:
    Code: localhost.localdomain localhost mail [COLOR="Red"][/COLOR]
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
  7. chris71p

    chris71p New Member

    PostFix behind router

    Hi All
    I have same problem as You "running PostFix Mail Server behind router "
    I can receive mail from outside but I can`t send them out I read lot of forums and lot web sides I did not found solution for this problem
    but I know for sure this is because of router
    If I connect server directly to DSL modem everything is working perfectly :)
    but not if is behind router even I open port 25 to mail server :mad:
    do anybody know haw to set up PostFix do deal with this, or any other suggestion? :confused:
    Thanks Chris.
  8. chris71p

    chris71p New Member

    Not really when I connect server without router directly to DSL modem then is not problem to send mails to yahoo, hotmail or any other even My IP is dynamic
    Thanx Chris.
    Last edited: Feb 3, 2009
  9. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your mail log?
  10. chris71p

    chris71p New Member

    Hi and Thanx for reply.
    mail.log looks like this:

    Feb 4 14:26:48 mydomain postfix/smtp[9067]: A00374948AE: to=<[email protected]>,[]:25, delay=77227, delays=77226/0.01/0.45/0, dsn=4.0.0, status=deferred (host[] refused to talk to me: 553 Mail from not allowed - [80])
    Feb 4 15:36:48 mydomain postfix/qmgr[6893]: A00374948AE: from=<[email protected]>, size=572, nrcpt=1 (queue active)
    Feb 4 15:36:48 mydomain postfix/smtp[13066]: A00374948AE: host[] refused to talk to me: 553 Mail from not allowed - [80]
    Feb 4 15:36:50 mydomain postfix/smtp[13066]: A00374948AE: to=<[email protected]>,[]:25, delay=81429, delays=81427/0.01/0.73/0.82, dsn=4.0.0, status=deferred (host[] said: 451 Message temporarily deferred - [] (in reply to end of DATA command))
    Feb 4 16:46:48 mydomain postfix/qmgr[6893]: A00374948AE: from=<[email protected]>, size=572, nrcpt=1 (queue active)
    Feb 4 16:46:55 mydomain postfix/smtp[17472]: A00374948AE: to=<[email protected]>,[]:25, delay=85634, delays=85627/0.01/0.47/6.8, dsn=2.0.0, status=sent (250 ok dirdel)
    Feb 4 16:46:55 mydomain postfix/qmgr[6893]: A00374948AE: removed

    there was two mails send both of them was kept in Mail Queue, today they gon
    but did not reach destination.
    Thank You
    Last edited: Feb 4, 2009
  11. falko

    falko Super Moderator ISPConfig Developer

    Can you check if your IP is blacklisted?
  12. Debianer

    Debianer New Member

    Postfix issue: Relay access denied and problem with sending mails

    I've just installed postfix and popa3d - debian packages.

    1. When I try to send an e-mail from Gmail account to me:
    I'm getting error:
    Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.1 <[email protected]>: Relay access denied (state 14).
    2. When I try to send an e-mail from Postfix to Gmail it normally, go out, but I am not getting this e-mail on my Gmail account.

    My is:
    myorigin = /etc/mailname #
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    append_dot_mydomain = no
    readme_directory = no
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    myhostname = my computer static ISP hostname
    mydomain =
    mydestination = $myhostname
    mynetworks =
    inet_interfaces = all
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    disable_dns_lookups = yes
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    What should I do?
  13. falko

    falko Super Moderator ISPConfig Developer

    Please open a new thread.

Share This Page