Problem with postfix install

Discussion in 'HOWTO-Related Questions' started by ctroyp, Nov 12, 2005.

  1. ctroyp

    ctroyp New Member HowtoForge Supporter

    Using the Debian Sarge "Perfect Setup" when I got to the part to "telnet localhost 25" I get:
    Code:
    server1:~# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    Connection closed by foreign host.
    
    The second time I try it doesn't close and I can enter "ehlo localhost" and nothing happens.
    Here are the contents of my /etc/postfix/main.cf file:
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    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
    
    myhostname = server1.strec.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = server1.strec.com, localhost.strec.com, , localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = 
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = nonanonymous
    broken_sasl_auth_clients = yes
    smptd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    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
    home_mailbox = Maildir/
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    
    strec.com is the domain name I entered during the Debian setup and is not an internet domain.

    Should I try reinstalling postfix? If so, how do I go about that to make sure everything is removed completely?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Cant find any errors in your main.cf. Do you get errors in your mail log:

    /vat/log/mail.log
     
  3. ctroyp

    ctroyp New Member HowtoForge Supporter

    Code:
    Nov 13 08:33:06 server1 postfix/smtpd[31434]: fatal: unknown smtpd_sasl_security                                             _options value "nonanonymous" in "nonanonymous"
    Nov 13 08:33:07 server1 postfix/master[24404]: warning: process /usr/lib/postfix                                             /smtpd pid 31434 exit status 1
    Nov 13 08:33:07 server1 postfix/master[24404]: warning: /usr/lib/postfix/smtpd:                                              bad command startup -- throttling
    
     
  4. falko

    falko Super Moderator ISPConfig Developer

  5. ctroyp

    ctroyp New Member HowtoForge Supporter

  6. falko

    falko Super Moderator ISPConfig Developer

  7. ctroyp

    ctroyp New Member HowtoForge Supporter

    Hmmm, I remember you posting this before, but I used strec.com during my Debian setup. Is this domain supposed to be an available Internet domain? I just use it locally and never planned to use it outside of my network. This is the same domain I used in my Fedora Core 4 setup and I never had a problem with my postfix. I guess I am confused with the use of the domain required during the O/S setup.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Yes, that's right.
     
  9. ctroyp

    ctroyp New Member HowtoForge Supporter

    Okay, if that is the case, then how can I change it to the domain of my main website?

    Also, for postfix, I only need to change strec to the new domain, right? or, will need to reinstall postfix?
     
  10. falko

    falko Super Moderator ISPConfig Developer

    You only need to change myhostname in /etc/postfix/main.cf and restart Postfix.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Dont set a domain as myhostname that you use as virtualhost in ISPConfig, otherwise an account at from this domain can get all emails from other accounts.
     
  12. ctroyp

    ctroyp New Member HowtoForge Supporter

    I changed it and I get the same thing:
    Code:
    server1:~# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    Connection closed by foreign host.
    
     
  13. ctroyp

    ctroyp New Member HowtoForge Supporter

    That makes sense till, but I don't have another internet domain to use. I have the Debian server domain set to server1.strec.com, and my other internet domains are being virtually hosted by ISPConfig.:confused:

    I am curious why this was never an issue with my Fedora server. I had the Fedora server domain set to server1.strec.com as well. I followed both "Perfect Setup" instructions for Fedora and Debian.

    Not sure what to do a this point???
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    You can make an DNS a record on the DNS Server that is autoritive for your domain, e.g server1.mydomain.com pointing to your server IP and use this domain for myhostname variable in postfix.
     
  15. ctroyp

    ctroyp New Member HowtoForge Supporter

    Please bare with me here...

    There are a few areas I know of that could be the source of my postfix problem. Let me give you the details/questions in hopes to fix this problem...

    I have registered my domain through godaddy.com and I use zoneedit.com's DNS. Within godaddy, I have pointed my domain to the two dns servers at zoneedit.com.

    I presume you are referring to my public domain (www.mydomain.com which is used to access my primary website) and not my local domain (strec.com). Is zoneedit.com the authoratative DNS server is public for my domain? Would it be the one that I use to add the record? In any event, I have added an alias (CNAME) of server1.mydomain.com not server1.strec.com and I still have the problem.

    When using The Perfect Setup (Debian Sarge), during the section for setting up my host and domain I used "server1" for the host and "strec.com" for the domain. This is not my internet domain. It is my local domain that I use for my LAN. Should I have used my public internet domain here? Falko mentioned that this should be my internet domain, but I did not have an issue doing that on my other server. till, you mentioned that if I changed it to my internet domain, that (since it is hosted virtually through ISPConfig) I may begin receiving unintended emails.

    During the setup of ISPConfig I entered the following info:
    Code:
    Please enter your MySQL server: [I]localhost[/I]
    Please enter your MySQL user: [I]root[/I]
    Please enter your MySQL password: [I]my MySQL password[/I]
    Please enter a name for the ISPConfig database: [I]ispconfigdb[/I]
    Please enter the IP address of the ISPConfig web: [I]192.168.2.50[/I]
    Please enter the host name: [I]www[/I]
    Please enter the domain: [I]strec.com[/I]
    Please select the protocol (http or https (SSL encryption)) to use to access the ISPConfig system: If you want to use your control panel with SSL, select 1. You can then access it under https://www.xyz.de:81. If you want to access it under http://www.xyz.de:81, choose 2.
    I am wondering if this could be my mistake. Should I have used www and mydomain.com instead of www and strec.com?

    Also, I am noticing something else...
    When I login to ISPConfig I use www.mydomain.com:81 and provide the credentials. I can access all pages fine, but the strange thing is that when I go to Management -> Server -> Settings or Status it sends me to the login screen again and I reenter the same credentials. After that, it sends me back to the main ISPConfig page, but I notice that the address in my address bar (of IE) has my WAN IP instead of www.mydomain.com:81/index... I am hoping this will help you to understand where the problem may be.

    Well that's all I can think of right now as far as details. Maybe now that you can see all of the details on one page, it will help you understand my problem better.

    I appreciate your help very much.
     
  16. falko

    falko Super Moderator ISPConfig Developer

    I guess you're still referring to your telnet problem...

    Can you post your real domain here? Also your router's public IP address? What's in /etc/postfix/main.cf?

    If you have a name server in your LAN that resolves www.strec.com correctly and your PCs in the LAN use that name server and you don't want to access ISPConfig from outside your LAN, then you can use www.strec.com. Otherwise you should use www.mydomain.com (which should point to your router's public IP address).

    That happens because you use another URL to access ISPConfig than the one that's in /home/admispconfig/ispconfig/lib/config.inc.php. Either use the URL from that file, or change it in that file.
     
  17. ctroyp

    ctroyp New Member HowtoForge Supporter

    Correct. When I try to "telnet localhost 25". It immediatly closes the connection, then I type it in again and it will then let me type in "ehlo localhost". That is when it doesn't return anything like it should.

    I will PM it to you...
    Here is the contents of /etc/postfix/main.cf:
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    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
    
    myhostname = server1.localdomain.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = server1.strec.com, localhost.strec.com, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION" 
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = nonanonymous
    broken_sasl_auth_clients = yes
    smptd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    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
    home_mailbox = Maildir/
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    

    I will change it to www.mydomain.com. So the IP address will not be set to 192.168.2.50 in ISPConfig Management -> Server -> Settings, but rather my WAN IP address?


    That took care of it. I had the WAN IP in there so I changed it to my internet domain name.
     
    Last edited: Dec 16, 2005
  18. falko

    falko Super Moderator ISPConfig Developer

    No, you have to use the IP addresses under Management -> Server -> Settings that you see when you run
    Code:
    ifconfig
    on the system, so it should be 192.168.2.50.
     
  19. ctroyp

    ctroyp New Member HowtoForge Supporter

    Ok, it is still 192.168.2.50.
     
  20. ctroyp

    ctroyp New Member HowtoForge Supporter

    What about the DNS settings within ISPConfig for the server and for all of the websites? Wht DNS server should these be set at? FYI, My primary internet domain is virtually hosted.
     

Share This Page