Trying to get mail working

Discussion in 'Server Operation' started by cruz, Oct 6, 2007.

  1. cruz

    cruz New Member

    I had the mail working when I sent it throught my ISP. But now that I have a static IP, I can not get it working. I reinstalled the server software (debian perfect setup) I sent mail out and get nothing. I do not know why it is using @example.com for. When I enter the command hostname it is just what I setup when I installed the server.This is the log file for the mail.
    HTML:
    Oct  5 17:45:24 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:24 server1 imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=30, sent=452
    Oct  5 17:45:27 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:27 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Oct  5 17:45:27 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=46, sent=336, time=0
    Oct  5 17:45:27 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:27 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Oct  5 17:45:27 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=79, sent=237, time=0
    Oct  5 17:45:27 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:27 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Oct  5 17:45:27 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=77, sent=418, time=0
    Oct  5 17:45:30 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:30 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Oct  5 17:45:30 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=61, sent=166, time=0
    Oct  5 17:45:41 server1 postfix/smtpd[15363]: connect from localhost.localdomain[127.0.0.1]
    Oct  5 17:45:41 server1 postfix/smtpd[15363]: 365154A5EC6: client=localhost.localdomain[127.0.0.1]
    Oct  5 17:45:41 server1 postfix/cleanup[15367]: 365154A5EC6: message-id=<[email protected]>
    Oct  5 17:45:41 server1 postfix/qmgr[580]: 365154A5EC6: from=<[email protected]>, size=730, nrcpt=1 (queue active)
    Oct  5 17:45:41 server1 postfix/smtpd[15363]: disconnect from localhost.localdomain[127.0.0.1]
    Oct  5 17:45:41 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:41 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Oct  5 17:45:41 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=40, sent=110, time=0
    Oct  5 17:45:41 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Oct  5 17:45:41 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Oct  5 17:45:41 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=77, sent=418, time=0
    Oct  5 17:45:41 server1 postfix/smtp[15369]: 365154A5EC6: to=<[email protected]>, relay=eforwardct.name-services.com[216.163.188.58]:25, delay=0.47, delays=0.06/0.02/0.34/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BDE333F1C55)
    Oct  5 17:45:41 server1 postfix/qmgr[580]: 365154A5EC6: removed
    
    Please help me to get this going.
     
  2. cruz

    cruz New Member

    working on getting mail to send and receive

    I went into the main.cf file and this is what it looks like.
    HTML:
    # 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 (Debian/GNU)
    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
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/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
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = server1.mysite4webhosting.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = server1.mysite4webhosting.com, localhost.mysite4webhosting.com, , localhost
    relayhost = 
    mynetworks = 127.0.0.0/8
    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_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,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_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    
    Is the mynetworks corect?
     
  3. falko

    falko Super Moderator Howtoforge Staff

    mynetworks is correct.

    You must set the correct sender address in your email client (e.g. Outlook, Thunderbird, Squirrelmail, etc.).
     
  4. cruz

    cruz New Member

    I had set up the mail server to forward throught my ISP and it woked fine. I was able to send and receive from my hotmail account. Now I reset up the server and got a static IP and as you told me it is sending, but I am not recieiving. What changed ? Is there some sort of record I need to set up? Is there somthing I need to point to my server from were my domain is registered? Is there any info were I can read about what I have configured wrong? Thanks for everything
     
  5. falko

    falko Super Moderator Howtoforge Staff

  6. cruz

    cruz New Member

    MX record

    I went to the dns in ispconfig for the website I created, and there is a MX record in there. I did setup a MX record at noip. They have my domain pointing to my server, but it is www.mysite4webhosing.com. Just the same as is in the DNS in ispconfig area for the site. I added one for apostolichearts.com site as well, but it is mail.apostolichearts.com. The nameservers for the site apostolichearts is www.mysite4webhosting.com. Is the name server ok? I'm confused. I do have DNS service from noip.com. I do not think it is being used. Can I enter there info and change the dns to point to them under nameservers? I think they have like 5 ns servers. I'm sorry that I do not understand more. I'm trying to understand all this mail stuff. I thank you for your help.

    p.s. I noticed that the mx for apostolichearts at noip.com was mail.apostolichearts.com, I changed it to www.mysite4webhosting.com. That is what I set my box up with when I did the install. Was that corect to change that?
     
    Last edited: Oct 8, 2007
  7. falko

    falko Super Moderator Howtoforge Staff

    Code:
    mh1:~# dig mx apostolichearts.com
    
    ; <<>> DiG 9.2.1 <<>> mx apostolichearts.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38962
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; QUESTION SECTION:
    ;apostolichearts.com.           IN      MX
    
    ;; ANSWER SECTION:
    apostolichearts.com.    60      IN      MX      5 mail.apostolichearts.com.
    
    ;; ADDITIONAL SECTION:
    mail.apostolichearts.com. 60    IN      A       76.255.160.38
    
    ;; Query time: 117 msec
    ;; SERVER: 213.191.92.84#53(213.191.92.84)
    ;; WHEN: Mon Oct  8 17:46:47 2007
    ;; MSG SIZE  rcvd: 74
    
    mh1:~#
    Is 76.255.160.38 your IP address?
     
  8. cruz

    cruz New Member

    yes

    Yes that is my IP. Now I am able to send and receive mail from mysbc dsl account, but I can not send or receive from hotmail. How can I get hotmail to except my email from the serer?. I just do not want people that sighn up on the site with hotmail or any other mail service not to receive mail from the site.
     
  9. cruz

    cruz New Member

    I went ahead and installed my script and the mail is working. Strange, it will not send to hotmail from squrrelmail, (send or receive) but it has no troubles sending from the script. Do you have any suggestions as to maybe another program to use to get my mail besides squrrelmail? Also how can I uninstall squrrelmail from ispconfig? Thanks for all the help. :)
     
  10. falko

    falko Super Moderator Howtoforge Staff

Share This Page