+ Responder ao Tópico



  1. #1

    Padrão Postfix envia emails internos e externos mas não recebe

    O postfix não está recebendo email externos (ele recebe emails internos), ele só está enviando.

    Alguém tem uma solução?

  2. #2

    Padrão Re: Postfix envia emails internos e externos mas não recebe

    No /etc/postfix/main.cf qual o valor que colocou para "relayhost" ?

  3. #3

    Padrão Re: Postfix envia emails internos e externos mas não recebe

    Checou o seu DNS? ele esta respondendo para teu MX?

  4. #4

    Question Re: Postfix envia emails internos e externos mas não recebe

    Estou com esse mesmo problema, alguém poderia me ajudar?

    O DNS é o seguinte:

    $ttl 38400
    erp.hecate.com.br. IN SOA erp.hecate.com.br. efujimoto.hecate.com.br. (
    1350674246
    10800
    3600
    604800
    38400 )
    erp.hecate.com.br. IN A 200.98.137.132
    erp.hecate.com.br. IN MX 10 erp.hecate.com.br
    erp.hecate.com.br. IN TXT "v=spf1 include:erp.hecate.com.br?all"
    erp.hecate.com.br. IN NS ns1.curtocircuito.net.br.
    erp.hecate.com.br. IN NS ns01.hecate.com.br.
    o comando postconf -n retorna:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    html_directory = no
    inet_interfaces = all
    mail_spool_directory = /var/spool/mail
    mailbox_delivery_lock = fcntl, dotlock
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    message_size_limit = 15728640
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
    mydomain = ttt.hecate.com.br
    myhostname = ttt.hecate.com.br
    mynetworks = 0.0.0.0/0
    mynetworks_style = host
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    relay_domains = $mydestination
    relayhost = cloud-smtp.whservidor.com
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtp_sasl_auth_enable = no
    smtp_sasl_security_options =
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated, reject
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = smtpd
    smtpd_sasl_security_options = noanonymous
    smtpd_sender_login_maps = pgsql:/etc/postfix/access.cf
    smtpd_sender_restrictions = reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauthenticated_sender_login_mismatch, reject_sender_login_mismatch
    transport_maps = pgsql:/etc/postfix/transport.cf
    unknown_local_recipient_reject_code = 550
    virtual_alias_maps = pgsql:/etc/postfix/virtual.cf
    virtual_gid_maps = static:5001
    virtual_mailbox_base = /var/spool/virtual_mailboxes
    virtual_mailbox_domains = pgsql:/etc/postfix/transport.cf
    virtual_mailbox_limit = 51200000
    virtual_mailbox_lock = fcntl
    virtual_mailbox_maps = pgsql:/etc/postfix/mailboxes.cf
    virtual_minimum_uid = 5000
    virtual_uid_maps = static:5001
    e meu master.cf

    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - n - - smtpd
    submission inet n - n - - smtpd -v
    # -o smtpd_enforce_tls=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps inet n - n - - smtpd
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #628 inet n - n - - qmqpd
    pickup fifo n - n 60 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - n 300 1 oqmgr
    tlsmgr unix - - n 1000? 1 tlsmgr
    rewrite unix - - n - - trivial-rewrite
    bounce unix - - n - 0 bounce
    defer unix - - n - 0 bounce
    trace unix - - n - 0 bounce
    verify unix - - n - 1 verify
    flush unix n - n 1000? 0 flush
    proxymap unix - - n - - proxymap
    smtp unix - - n - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - n - - smtp
    -o fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - n - - showq
    error unix - - n - - error
    discard unix - - n - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - n - - lmtp
    anvil unix - - n - 1 anvil
    scache unix - - n - 1 scache
    #
    # ====================================================================
    # 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/local/bin/maildrop -d ${recipient}
    #
    # The Cyrus deliver program has changed incompatibly, multiple times.
    #
    old-cyrus unix - n n - - pipe
    flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    cyrus unix - n n - - pipe
    user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # 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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    dovecot unix - n n - - pipe
    flags=DRhu user=virtual:virtual argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -n -m ${extension}
    Não consegui encontrar nada nos logs que possam me indicar. No iptables as portas de destino 25, 465 e 587 estão liberadas para TCP.

    Alguém pode me dar pelo menos um "norte" de como buscar a solução? Ele envia perfeitamente, se loga no postgresql para buscar os usuários e configurações de acordo com as informações no main.cf (não dá nenhum erro e funciona perfeitamente para envios)

    Procurei bastante e não consigo encontrar nenhuma solução. Alguém pode me dar uma força nisso aí?

  5. #5

    Padrão Re: Postfix envia emails internos e externos mas não recebe

    Pessoal, finalmente recebi a mensagem de erro do gmail, mas não consigo entender o porquê desse erro, vou deixar as partes mais importantes em negrito.


    Delivery to the following recipient failed permanently:

    [email protected]

    Technical details of permanent failure:
    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]>: Recipient address rejected: Access denied (state 13).

    ----- Original message -----

    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=gmail.com; s=20120113;
    h=mime-version:frommessage-id:subject:to:content-type;
    bh=yNMWa/Csartuf67mCaU37ZSnqVj9t5FGtr9wu89q0dA=;
    b=qB9y2dcal+rvtDWj547rw+ivAcdImbeXomPGYkAqHxxxFpWlpAM91jUlQMqXlw4WfW
    QzyZUf6LcjE1oXBKCaYi3GcAc9yGoHM4BlMA48sSq+BiVZpEVS8ifIiSbP/VV4vSc2Dt
    PdFUbB+e/uXqcnjt8kpSZIw+J2Bst3p0quQ7YI1HWw/eNTSXiRUPprDUbSQOIh3DreGx
    ttreoIQWRlmzJ9Kr+cCPhkj+K3VYe33CoWuhF6DlscG+r7Hync0Q+Rq9XuwJf1jCRWTb
    e6gAI1xcofWF+8YeqTBFFuddVKtlpy+7c05/ggGSQmKkfaWJk+Qsg9a82s7hzqL4sKv+
    P2hg==
    Received: by 10.52.27.106 with SMTP id s10mr2967032vdg.12.1353629713779; Thu,
    22 Nov 2012 16:15:13 -0800 (PST)
    MIME-Version: 1.0
    Received: by 10.58.202.35 with HTTP; Thu, 22 Nov 2012 16:14:33 -0800 (PST)
    From: Everton Fujimoto <[email protected]>
    Date: Thu, 22 Nov 2012 22:14:33 -0200
    Message-ID: <CAGThSzpj4RenkUtjLstPVA4pN4AMVDzkzg7PmP=tXAPS=Ld3HQ@mail.gmail.com>
    Subject: teste
    To: efujimoto <[email protected]>
    Content-Type: multipart/alternative; boundary=20cf307cfe6e3f4abc04cf1e7ab9
    Por que os dois IPs que "receberam" não são nenhum dos meus IPs, sendo que tem os registros no dns corretamente?

  6. #6

    Padrão Re: Postfix envia emails internos e externos mas não recebe

    outra coisa, procurando no log, encontrei linhas assim:

    Nov 23 07:41:55 erp postfix/smtpd[3482]: NOQUEUE: reject: RCPT from mail-vb0-f50.google.com[209.85.212.50]: 554 5.7.1 <[email protected]>: Recipient address rejected: Access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vb0-f50.google.com>
    Alguém tem ideia de porque só recebi a mensagem para "recusar" mais de 10 horas depois do envio? E porque está recusando? Qualquer ideia já ajuda!

  7. #7

    Padrão Re: Postfix envia emails internos e externos mas não recebe

    resolvido.

    o problema era:

    smtpd_recipient_restrictions = permit_sasl_authenticated, reject
    que mudei para:

    smtpd_recipient_restrictions = permit_sasl_authenticated, reject_invalid_hostname, check_relay_domains