Problem with Postfix

Discussion in 'Server Operation' started by omario, Nov 22, 2011.

  1. omario

    omario New Member

    hello. :)

    I have a problem I cannot solve.

    I uninstall exim on my server and i setup Postfix .

    Problem, I can send but I can't receive any email.

    main.conf :

    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix

    myhostname =
    mydomain =
    inet_interfaces =
    smtp_bind_adress =

    mydestination = $myhostname, localhost.$mydomain, localhost
    unknown_local_recipient_reject_code = 550
    mynetworks =,xxx.xx.xx.xx,...................
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 2
    debugger_command =
    xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    bounce_queue_lifetime = 0

    And Postconf :

    postconf -e 'smtpd_sasl_local_domain ='
    postconf -e 'smtpd_sasl_auth_enable = yes'
    postconf -e 'smtpd_sasl_security_options = noanonymous'
    postconf -e 'broken_sasl_auth_clients = yes'
    postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
    postconf -e 'inet_interfaces = all'

    postconf -e 'smtpd_tls_auth_only = no'
    postconf -e 'smtp_use_tls = yes'
    postconf -e 'smtpd_use_tls = yes'
    postconf -e 'smtp_tls_note_starttls_offer = yes'
    postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
    postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
    postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
    postconf -e 'smtpd_tls_loglevel = 1'
    postconf -e 'smtpd_tls_received_header = yes'
    postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
    postconf -e 'tls_random_source = dev:/dev/urandom'

    thank you in advance :p
  2. nbhadauria

    nbhadauria New Member

    are you sure that the problem is in configuration.

    if not please first go to and do following..

    1. MX Lookup
    2. SMTP Test

    also post logs of the time you try to receive a mail..
  3. White

    White Member

    I have the same issue and was going to open a thread myself,

    im running debian lenny and set up the mail over 12months ago now using

    i can send emails between sites on my server ie admin to admin and from the server into the world to people who sign up to my sites but NONE of those email addresses will recieve any emails from the outside world

    anyone know why?

    i have gone through the how to over and over and looked at many posts on here but im stumped.

    i tried toolbox and the mx and stmp are blank no records found
  4. nbhadauria

    nbhadauria New Member

    have checked that your mx records are configured and external people can connect you on that mx. ? can you post the error mail logs ?
  5. omario

    omario New Member

    im running Centos 5.7

    SMTP Test Result:


    220 ESMTP Postfix
    Reverse DNS FAILED! This is a problem.

    0 seconds - Good on Connection time
    Not an open relay.
    0.281 seconds - Good on Transaction time

    Session Transcript:
    250 [47 ms]
    MAIL FROM: <[email protected]>
    250 2.1.0 Ok [47 ms]
    RCPT TO: <[email protected]>
    554 5.7.1 <[email protected]>: Relay access denied [47 ms]
    221 2.0.0 Bye [47 ms]

    and this is the log of the time when i try to receive a mail..

    Nov 22 18:16:43 srv postfix/smtpd[31913]: connect from[xx.xx.xx.xx]
    Nov 22 18:16:43 srv postfix/smtpd[31913]: NOQUEUE: reject: RCPT from[xx.xx.xx.xx]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<>
    Nov 22 18:16:43 srv postfix/smtpd[31913]: disconnect from[]
  6. nbhadauria

    nbhadauria New Member

    You have to change system hostname, e.g., then change postfix setting 'myhostname =' to '' too.
    Last edited: Nov 23, 2011
  7. White

    White Member

    postfix is not making the connection to the mysql mail database its saying user unknown and rejecting the emails BUT it is making the connection to SEND emails from the mysql mail database.

Share This Page