The Perfect Sever, Ubuntu 7.10 Postfix issue

Discussion in 'HOWTO-Related Questions' started by Leichtweis, Mar 19, 2008.

  1. Leichtweis

    Leichtweis New Member

    Ubuntu Server 7.10 Postfix issue

    I am attempting to configure postfix for my buddies Ubuntu server. He already had all the normal web stuff set up (ftp, PHP, mySQL, ect.) except for postfix.
    Having used Falko's guide to set up my Centos server I figured it would be easy.

    So I followed Falko's instructions on setting up Postfix With SMTP-AUTH And TLS in Ubuntu Server 7.10 HERE. Everything seemed to go fine. Followed all prompts everything looked good. I installed Courier-POP everything there looked fine.
    So I figured I would test the setup. Did this
    Code:
    telnet localhost 25
    
    Trying 127.0.0.1...
    Connected to mail.pinpunk.com.
    Escape character is '^]'.
    220 mail.pinpunk.com ESMTP Postfix (Ubuntu)
    
    ehlo localhost
    250-mail.pinpunk.com
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    mail from: root@localhost
    rcpt to: user@localhost
    data
    Subject: My first mail on Postfix
    
    Hi,
    Are you there?
    regards,
    Admin[
    . 
    quit 
    Ok that worked fine, I got the mail so then I tried to send it to my peronal e-mail:


    Code:
    telnet mail.pinpunk.com 25
    
    Trying 127.0.0.1...
    Connected to mail.pinpunk.com.
    Escape character is '^]'.
    220 mail.pinpunk.com ESMTP Postfix (Ubuntu)
    
    ehlo pinpunk.com
    250-mail.pinpunk.com
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    mail from: [email][email protected][/email]
    rcpt to: [email][email protected][/email]  <---used my gmail address
    554 5.7.1 <[email protected]>: Relay access denied
    Thats the error I get. Can't figure it out. But what I thought was odd is that I telneted back under localhost 25 and sent a mail from root@localhost to my gmail and it worked fine.

    If you guys could help a guy out it would be greatly appreciated.

    Thanks, Dan
     
    Last edited: Mar 19, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?
    Is the server running on a dynamic IP address?
     
  3. Leichtweis

    Leichtweis New Member

    I have more errors in the log then I know what do do with. I am not sure where to start.

    The server is running on a static IP.

    Here is a snip it of the mail.log

    Code:
    Mar 19 03:22:04 ubuserver postfix/smtpd[12493]: connect from unknown[122.163.253.115]
    Mar 19 03:22:07 ubuserver postfix/smtpd[12493]: NOQUEUE: reject: RCPT from unknown[122.163.253.115]: 554 5.7.1 <ab@nutscape.$
    Mar 19 03:22:07 ubuserver postfix/smtpd[12493]: lost connection after RCPT from unknown[122.163.253.115]
    Mar 19 03:22:07 ubuserver postfix/smtpd[12493]: disconnect from unknown[122.163.253.115]
    Mar 19 03:24:01 ubuserver postfix/smtpd[12767]: cannot load Certificate Authority data
    Mar 19 03:24:01 ubuserver postfix/smtpd[12767]: warning: TLS library problem: 12767:error:02001002:system library:fopen:No s$
    Mar 19 03:24:01 ubuserver postfix/smtpd[12767]: warning: TLS library problem: 12767:error:2006D080:BIO routines:BIO_new_file$
    Mar 19 03:24:01 ubuserver postfix/smtpd[12767]: warning: TLS library problem: 12767:error:0B084002:x509 certificate routines$
    Mar 19 03:24:01 ubuserver postfix/smtpd[12767]: connect from frostcatcher.com[66.93.0.30]
    Mar 19 03:24:46 ubuserver postfix/smtpd[12767]: NOQUEUE: reject: RCPT from frostcatcher.com[66.93.0.30]: 554 5.7.1 <dan@metr$
    Mar 19 03:25:32 ubuserver postfix/smtpd[12767]: disconnect from frostcatcher.com[66.93.0.30]
    Mar 19 03:26:45 ubuserver postfix/anvil[12498]: statistics: max connection rate 1/60s for (smtp:66.7.178.144) at Mar 19 03:1$
    Mar 19 03:26:45 ubuserver postfix/anvil[12498]: statistics: max connection count 1 for (smtp:66.7.178.144) at Mar 19 03:16:45
    Mar 19 03:26:45 ubuserver postfix/anvil[12498]: statistics: max cache size 1 at Mar 19 03:16:45
    Mar 19 03:26:55 ubuserver postfix/smtpd[12767]: connect from frostcatcher.com[66.93.0.30]
    Mar 19 03:28:09 ubuserver postfix/smtpd[12767]: disconnect from frostcatcher.com[66.93.0.30]
    Mar 19 03:31:24 ubuserver postfix/smtpd[13027]: cannot load Certificate Authority data
    Mar 19 03:31:24 ubuserver postfix/smtpd[13027]: warning: TLS library problem: 13027:error:02001002:system library:fopen:No s$
    Mar 19 03:31:24 ubuserver postfix/smtpd[13027]: warning: TLS library problem: 13027:error:2006D080:BIO routines:BIO_new_file$
    Mar 19 03:31:24 ubuserver postfix/smtpd[13027]: warning: TLS library problem: 13027:error:0B084002:x509 certificate routines$
    Mar 19 03:31:26 ubuserver postfix/smtpd[13027]: connect from cpe-66-68-250-175.rgv.res.rr.com[66.68.250.175]
    Mar 19 03:31:26 ubuserver postfix/smtpd[13027]: disconnect from cpe-66-68-250-175.rgv.res.rr.com[66.68.250.175]
    Mar 19 03:32:30 ubuserver postfix/smtpd[13027]: connect from unknown[121.34.228.65]
    
    certificate verification problem? I don't know maybe I should just uninstall postfix and start over again?

    Ok I reinstalled but I still get errors:
    Code:
    Mar 20 17:03:54 ubuserver postfix/smtpd[20449]: warning: cannot get certificate from file /etc/postfix/ssl/smtpd.crt
    Mar 20 17:03:54 ubuserver postfix/smtpd[20449]: warning: TLS library problem: 20449:error:02001002:system library:fopen:No s$
    Mar 20 17:03:54 ubuserver postfix/smtpd[20449]: warning: TLS library problem: 20449:error:20074002:BIO routines:FILE_CTRL:sy$
    Mar 20 17:03:54 ubuserver postfix/smtpd[20449]: warning: TLS library problem: 20449:error:140DC002:SSL routines:SSL_CTX_use_$
    Mar 20 17:03:54 ubuserver postfix/smtpd[20449]: cannot load RSA certificate and key data
    Mar 20 17:03:54 ubuserver postfix/smtpd[20449]: connect from frostcatcher.com[66.93.0.30]
    Mar 20 17:03:58 ubuserver postfix/smtpd[20455]: warning: cannot get certificate from file /etc/postfix/ssl/smtpd.crt
    Mar 20 17:03:58 ubuserver postfix/smtpd[20455]: warning: TLS library problem: 20455:error:02001002:system library:fopen:No s$
    Mar 20 17:03:58 ubuserver postfix/smtpd[20455]: warning: TLS library problem: 20455:error:20074002:BIO routines:FILE_CTRL:sy$
    Mar 20 17:03:58 ubuserver postfix/smtpd[20455]: warning: TLS library problem: 20455:error:140DC002:SSL routines:SSL_CTX_use_$
    Mar 20 17:03:58 ubuserver postfix/smtpd[20455]: cannot load RSA certificate and key data
    Mar 20 17:03:59 ubuserver postfix/smtpd[20455]: connect from seven.pairlist.net[209.68.2.241]
    Mar 20 17:03:59 ubuserver postfix/smtpd[20455]: NOQUEUE: reject: RCPT from seven.pairlist.net[209.68.2.241]: 554 5.7.1 <alle$
    Mar 20 17:03:59 ubuserver postfix/smtpd[20455]: disconnect from seven.pairlist.net[209.68.2.241]
    Mar 20 17:04:32 ubuserver postfix/smtpd[20449]: NOQUEUE: reject: RCPT from frostcatcher.com[66.93.0.30]: 554 5.7.1 <dan@metr$
    Mar 20 17:04:49 ubuserver postfix/smtpd[20449]: disconnect from frostcatcher.com[66.93.0.30]
    
    possible problem because of the hostname? in the log it shows it as frostcatcher.com but the domain I am trying to set up mail from is pinpunk.com I am so green to linux its not even funny.
     
    Last edited: Mar 20, 2008
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /etc/postfix/ssl
    ?
     
  5. Leichtweis

    Leichtweis New Member

    Code:
    total 28
    drwxr-xr-x 2 root root 4096 2008-03-20 23:10 .
    drwxr-xr-x 4 root root 4096 2008-03-21 01:00 ..
    -rw-r--r-- 1 root root 1269 2008-03-20 23:10 cacert.pem
    -rw-r--r-- 1 root root  963 2008-03-20 23:10 cakey.pem
    -rw-r--r-- 1 root root  936 2008-03-20 23:09 smtpd.crt
    -rw-r--r-- 1 root root  765 2008-03-20 23:08 smtpd.csr
    -rw-r--r-- 1 root root  887 2008-03-20 23:09 smtpd.key
    
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Please run these commands again:
    Code:
    mkdir /etc/postfix/ssl
    cd /etc/postfix/ssl/
    openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
    
    chmod 600 smtpd.key
    openssl req -new -key smtpd.key -out smtpd.csr
    
    openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
    
    openssl rsa -in smtpd.key -out smtpd.key.unencrypted
    
    mv -f smtpd.key.unencrypted smtpd.key
    openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
     
  7. Leichtweis

    Leichtweis New Member

    Ok I figured it out, there was never a problem. I was not attempting to authenticate (postfix wouldn't let me because its not a open relay) once I used a mail client and checked server requires authentication. Worked like a charm.

    Thanks for everyones help!
     

Share This Page