Postfix - I can send emails but can't receive emails

Discussion in 'Installation/Configuration' started by shayster01, Jun 20, 2007.

  1. shayster01

    shayster01 New Member

    Okay I followed the Debian Etch Perfect Setup twice on two different machines. My website works and the domains appear to be working well. I am using ISPConfig. Neither machine can receive emails using Evolution but they both can send emails.

    Not sure what I am doing wrong. Attached is some informtation that may help:

    Email bounced back to sender:

    Hi. This is the qmail-send program at yahoo.com.
    I'm afraid I wasn't able to deliver your message to the following
    addresses.
    This is a permanent error; I've given up. Sorry it didn't work out.

    <[email protected]>:
    Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)

    --- Below this line is a copy of the message.

    Return-Path: <[email protected]>
    Received: (qmail 89203 invoked by uid 60001); 20 Jun 2007 19:34:55
    -0000
    DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
    s=s1024; d=yahoo.com;

    h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;

    b=15zWPWO9eGbt7+GjQMnt2C3ElJtRwUAVIJROFJsnB7oaXDDY2zmRNv09n3+nFGGJo8rgLb+ceR6rUa0giYornDm+09UnooKP4dlpBmiQSfitgudJpAwEgAZydfHluiBjdLtqJqpmpm97kyb1dB8aITdP1z6l0A3L4KmelYDx9Tc=;
    X-YMail-OSG:
    4Ab95kcVM1kKR.rS6ndSpynDkQJlyV7.3Gja1CXdj3lIQ9w8ZKURU755d0Gsqoho.pRZMKEdRpaXzGc7K.VLksR8nOYwaC0IGf466GhasPIU8hnAX6xe.N2oEjSVVA--
    Received: from [69.12.148.140] by web52304.mail.re2.yahoo.com via HTTP;
    Wed, 20 Jun 2007 12:34:55 PDT
    Date: Wed, 20 Jun 2007 12:34:55 -0700 (PDT)
    From: Shawn Shay <[email protected]>
    Subject: test
    To: [email protected]
    MIME-Version: 1.0
    Content-Type: text/plain; charset=iso-8859-1
    Content-Transfer-Encoding: 8bit
    Message-ID: <[email protected]>

    dsdsdss

    Here is the output from postconf -n

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = ns1.flodog.com,ns2.flodog.com,localhost.flodog.com,localhost.localdomain,localhost
    myhostname = ns2.flodog.com
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom

    Receiving Emial Setup in Evolution:

    Server Type: POP
    Server: localhost
    username: mike
    Use secure connection: No encryption
    Authentication Type: Password


    Thanks in Advance,
    Shawn
     
  2. Hans

    Hans Moderator ISPConfig Developer

    I would try this to solve your problem with receiving emails:

    Put a # in front of this line:
    mydestination = ns1.flodog.com,ns2.flodog.com,localhost.flodog.com ,localhost.localdomain,localhost

    Add this line:
    mydestination = /etc/postfix/local-host-names

    And make sure if you're using the Maildir format, that it's enabled within ISPConfig under Management > Server > Settings > Email.
     
  3. shayster01

    shayster01 New Member

    Hans,

    Thanks for the quick repsonse!!

    I did as you had mentioned but nothing changed. Evolution still gets hung up retrieving emails. The error message is "Error while Fetching Mail. Unable to connect to POP server localhost. Error sending password:Broken pipe."

    I did check and Maildir is checked.

    My ISPConfig parameters are:
    DNS Manager
    Domain
    SOA flodog.com
    IP address: 69.12.148.140
    Options
    nameserver ns1.flodog.com
    nameserver ns2.flodog.com
    Records
    A Record
    69.12.148.140 www
    69.12.148.140 ns2
    MX Record
    ns2.flodog.com
     
  4. shayster01

    shayster01 New Member

    Just looked at my mail.err file and it says "ns2 courierpop3login: authentication error: no such file or directory"

    Also noticed in ISPConfig that Bind is not working.
     
  5. Hans

    Hans Moderator ISPConfig Developer

    Please try to start bind with /etc/init.d/bind9 start

    What's the output of:

    hostname -f

    What's the output of:

    hostname

    What's within your mail log /var/log/mail.log or /var/log/mail.warn
     
  6. shayster01

    shayster01 New Member


    Starting Bind gives me this error "Starting domain name service...: bind failed!

    hostname -f output is ns2.flodog.com

    hostname output is ns2.flodog.com

    /mail.log output is ns2 courierpop3login: chdir Maildir: no such file or directory

    /mail.warn output is ns2 courierpop3login: error: no such file or directory and ns2 courierpop3login: authentication error: no such file or directory
     
  7. falko

    falko Super Moderator ISPConfig Developer

    I think one problem is that ns1.flodog.com doesn't exist:

    Code:
    mh1:~# dig ns1.flodog.com
    
    ; <<>> DiG 9.2.1 <<>> ns1.flodog.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 43045
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;ns1.flodog.com.                        IN      A
    
    ;; AUTHORITY SECTION:
    flodog.com.             10800   IN      SOA     ns1.flodog.com. root.localhost. 2007061903 28800 7200 604800 86400
    
    ;; Query time: 196 msec
    ;; SERVER: 213.191.92.84#53(213.191.92.84)
    ;; WHEN: Thu Jun 21 16:57:36 2007
    ;; MSG SIZE  rcvd: 82
    Is 69.12.148.140 your server's IP address?
     
  8. shayster01

    shayster01 New Member

    Okay I fixed Bind. Looks like I accidentally added the slave onto the main DNS server as well as the secondary DNS server. I removed it from the main DNS server and Bind now works.

    Still not receiving emails and the same messages above with the exception that bind now starts correctly.
     
  9. shayster01

    shayster01 New Member

    My IP address for my website, email and master DNS (ns2.flodog.com) is 69.12.148.140 and secondary dns is 69.12.148.141.

    By the way thanks again for all the help. I have been struggling with this for awhile and figured I would ask the experts.

    So should I now set up a master A record on dns1 since it's the slave?
     
  10. shayster01

    shayster01 New Member

    I think I got dns1 working now. I think it was the fact that the bind was all screwed up from having that slave entry in ISPConfig on both machines.

    I think the problem now lies with the error message "chdir Maildir failed" I am getting in the mail.log.
     
  11. shayster01

    shayster01 New Member

    Okay I searched around the web trying to find what that error message is and came across this test which I think may help:

    $telnet localhost 110
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    +OK Hello there.

    user [email protected]
    +OK Password required.

    pass XXXX
    -ERR Login failed.

    So it looks like the password is not matched up to my login. How do I change the password and will I have to manullay do it for each new account?
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Did you send an email to that account first? Maildir is created when the first email arrives. Maybe that solves the problem.
     
  13. shayster01

    shayster01 New Member

    I did after reading several other post but to no avail. I want to confirm my email settings:

    Receiving Email Setup in Evolution:

    Server Type: POP
    Server: localhost
    username: mike
    Use secure connection: No encryption
    Authentication Type: Password

    Any other ideas of test I can do?
     
  14. shayster01

    shayster01 New Member

    Here is what happends when I send an email to the address:

    Hi. This is the qmail-send program at
    smtpoutwbe03.prod.mesa1.secureserver.net.
    I'm afraid I wasn't able to deliver your message to the following
    addresses.
    This is a permanent error; I've given up. Sorry it didn't work out.

    <[email protected]>:
    69.12.148.140 does not like recipient.
    Remote host said: 554 5.7.1 <[email protected]>: Relay access denied
    Giving up on 69.12.148.140.

    --- Below this line is a copy of the message.

    Return-Path: <[email protected]>
    Received: (qmail 19756 invoked from network); 23 Jun 2007 16:04:21 -0000
    Received: from unknown (HELO gem-wbe22.prod.mesa1.secureserver.net)
    (64.202.189.206)
    by smtpoutwbe03.prod.mesa1.secureserver.net with SMTP; 23 Jun 2007
    16:04:21 -0000
    Received: (qmail 27600 invoked by uid 99); 23 Jun 2007 16:04:21 -0000
    Date: Sat, 23 Jun 2007 09:04:21 -0700
    From: [email protected]
    Subject: test
    To: [email protected]
    Message-ID:
    <[email protected]ail.secureserver.net>
    MIME-Version: 1.0
    Content-Type: TEXT/plain; CHARSET=US-ASCII
    User-Agent: Web-Based Email 4.9.48
    X-Originating-IP: 76.195.183.209
     
  15. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    postconf -n
    ?
    Is the system hosted behind a router? If so, did you forward port 25 from your router to the server?
     
  16. shayster01

    shayster01 New Member


    No I thought I would wait until I got it up and running before I put it behind a router/firewall.

    Here is the result from postconf -n

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = ns1.flodog.com,ns2.flodog.com,localhost.flodog.com,localhost.localdomain,localhost
    myhostname = ns2.flodog.com
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom

    I am going to create a new user, send that user an email, login to the new user and setup evolution to check the email.

    Is there a manaul way to check the mailbox to test if it's receiving but an Evolution issue?
     
  17. shayster01

    shayster01 New Member

    Still trying....

    I tried postqueue -p and got.
    Mail queue is empty

    I also tried this and noticed a few people trying to access my email:


    egrep '(reject|warning|error|fatal|panic):' /var/log/mail.log
    Jun 24 23:59:44 ns2 postfix/smtpd[3430]: NOQUEUE: reject: RCPT from 82.158.148.142.dyn.user.ono.com[82.158.148.142]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<pioneerinsurance.com>
    Jun 25 00:12:05 ns2 postfix/smtpd[3944]: NOQUEUE: reject: RCPT from 122-116-17-133.dynamic.hinet.net[122.116.17.133]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<69.12.148.140>
    Jun 25 00:52:19 ns2 postfix/smtpd[5469]: NOQUEUE: reject: RCPT from 122-116-17-133.dynamic.hinet.net[122.116.17.133]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<69.12.148.140>
    Jun 25 03:43:23 ns2 postfix/smtpd[11834]: NOQUEUE: reject: RCPT from S010600112f27254d.vs.shawcable.net[70.71.23.235]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<centerpartners.com>
    Jun 25 06:30:28 ns2 postfix/smtpd[18044]: NOQUEUE: reject: RCPT from 59-112-83-94.dynamic.hinet.net[59.112.83.94]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<69.12.148.140>
    Jun 25 08:35:47 ns2 postfix/smtpd[23208]: NOQUEUE: reject: RCPT from web52307.mail.re2.yahoo.com[206.190.48.150]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<web52307.mail.re2.yahoo.com>
    Jun 25 08:56:28 ns2 postfix/smtpd[24580]: warning: 202.83.166.170: hostname 202-83-166-170.reverse.ntc.net.pk verification failed: Name or service not known
    Jun 25 08:57:23 ns2 postfix/smtpd[24607]: NOQUEUE: reject: RCPT from unknown[190.65.113.218]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<jbp.com>

    The red text was one I sent and don't know whay it didn't go through.
     
  18. shayster01

    shayster01 New Member

    Resolution at last - I am idiot!

    Falko,

    Thanks for all your help but my problem was I didn't follow the directions. I will explain my issues instead of fellow inpatient people skim the instructions. The amazing thing is I did it with two servers!!

    If you do not want to use ISPConfig, configure Postfix to deliver emails to a user's Maildir*:

    That mean if you plan to use ISPConfig do this:

    postconf -e 'home_mailbox = Maildir/'
    postconf -e 'mailbox_command ='
    /etc/init.d/postfix restart



    NOT THIS:

    *Please note: You do not have to do this if you intend to use ISPConfig on your system as ISPConfig does the necessary configuration using procmail recipes. But please go sure to enable Maildir under Management -> Server -> Settings -> EMail in the ISPConfig web interface.
     
    Last edited: Jun 26, 2007

Share This Page