After Install: Mail not working and FTP strange

Discussion in 'Installation/Configuration' started by Raffnix, Feb 2, 2006.

  1. Raffnix

    Raffnix New Member

    Hello,

    Today I installed ISPconfig on a new Server (Debian Sarge Basic Image, then "Perfect Install" from HowTo)
    I kept the given Hostname (IP.provider.tld) and installation worked well

    But after starting ISPconfig. I noticed, that in the Services overview FTP-Server was offline. Restarting didn't change anything and trying to restart on the shell returned:

    proftpd restart
    - warning: "ProFTPD" address/port (xx.xx.xx.xx:21) already in use by "Debian"


    I ignored that and pre-configured my domains (9 Clients), which are currently still running on my old server.

    Then I switched one of them (including MX) to the new server (www.mydomain.tld is working OK) an created an user (web7p1)
    Maildir has been created and I can access the Mailbox with Outlook Express and Uebimail. But trying to send mail with either of them results with an error:

    Code:
    Feb  2 18:40:34 xx-xx-xx-xx courierpop3login: LOGIN, user=web7p1, ip=[::ffff:xx.xx.xx.xx]
    Feb  2 18:40:35 xx-xx-xx-xx courierpop3login: LOGOUT, user=web7p1, ip=[::ffff:xx.xx.xx.xx], top=0, retr=0, time=1
    Feb  2 18:41:57 xx-xx-xx-xx postfix/smtpd[2144]: connect from localhost[::1]
    Feb  2 18:41:57 xx-xx-xx-xx postfix/smtpd[2144]: NOQUEUE: reject: RCPT from localhost[::1]: 550 <sender@somedomain.tld>: Recipient address rejected: User unknown in local recipient table; from=<web7p1@mydomain.tld> to=<sender@somedomain.tld> proto=SMTP helo=<UebiMiau>
    Feb  2 18:41:57 xx-xx-xx-xx postfix/smtpd[2144]: lost connection after RCPT from localhost[::1]
    Feb  2 18:41:57 xx-xx-xx-xx postfix/smtpd[2144]: disconnect from localhost[::1]
    Feb  2 18:45:45 xx-xx-xx-xx postfix/smtpd[2226]: connect from myip[xx.xx.xx.xx]
    Feb  2 18:45:45 xx-xx-xx-xx postfix/smtpd[2226]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
    Feb  2 18:45:45 xx-xx-xx-xx postfix/smtpd[2226]: warning: myip[xx.xx.xx.xx]: SASL LOGIN authentication failed
    
    On the other hand, connecting to the server with an FTP client works fine (despite of the first error)

    If you can help me get my mail working and explain the ftp behaviour I would be glad :D
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    please have a look here:
    http://www.howtoforge.com/forums/showthread.php?t=120&page=2&highlight=socketbindtight

    The problem is that proftpd binds the port on all IP addresses with its default server and then cannot bind with the later defined virtual servers.
     
  3. Raffnix

    Raffnix New Member

    Well I added "SocketBindTight on" to proftpd.conf and rebooted, but that changed nothing: The message now reads:

    proftpd stop
    - warning: "ProFTPD" address/port (xx.xx.xx.xx:21) already in use by "FTP-Servername"
    - SocketBindTight in effect, ignoring DefaultServer

    and the FTP-Server-Status in ISPconfig is still "offline".

    The FTP-Server is reachable by the configured user. Unfortunately the user is not restricted to his Web but able to browse the whole server.


    Even worse is, that I'm still unable to send mail.
     
    Last edited: Feb 3, 2006
  4. falko

    falko Super Moderator ISPConfig Developer

    Please post your /etc/proftpd.conf here.

    It seems as if saslauthd isn't running. Please run
    Code:
    /etc/init.d/saslauthd start
     
  5. Raffnix

    Raffnix New Member

    saslauthd is running (restarted it to be sure) but still sending is not possible. This is what uebimail tells me:

    It was not possible to send this e-mail
    SMTP Error: Recipient not accepted. Verify your relay rules


    My proftpd.conf:

    Code:
    #
    # /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
    # To really apply changes reload proftpd after modifications.
    #
    
    ServerName                      "Debian"
    ServerType                      standalone
    DeferWelcome                    off
    
    MultilineRFC2228                on
    DefaultServer                   on
    ShowSymlinks                    on
    
    TimeoutNoTransfer               600
    TimeoutStalled                  600
    TimeoutIdle                     1200
    
    DisplayLogin                    welcome.msg
    DisplayFirstChdir               .message
    ListOptions                     "-l"
    
    DenyFilter                      \*.*/
    
    # Uncomment this if you are using NIS or LDAP to retrieve passwords:
    #PersistentPasswd               off
    
    # Uncomment this if you would use TLS module:
    #TLSEngine                      on
    
    # Uncomment this if you would use quota module:
    #Quotas                         on
    
    # Uncomment this if you would use ratio module:
    #Ratios                         on
    
    # Port 21 is the standard FTP port.
    Port                            21
    
    # To prevent DoS attacks, set the maximum number of child processes
    # to 30.  If you need to allow more than 30 concurrent connections
    # at once, simply increase this value.  Note that this ONLY works
    # in standalone mode, in inetd mode you should use an inetd server
    # that allows you to limit maximum number of processes per service
    # (such as xinetd)
    MaxInstances                    30
    
    # Set the user and group that the server normally runs at.
    User                            nobody
    Group                           nogroup
    
    # Umask 022 is a good standard umask to prevent new files and dirs
    # (second parm) from being group and world writable.
    Umask                           022  022
    # Normally, we want files to be overwriteable.
    AllowOverwrite                  on
    
    # Delay engine reduces impact of the so-called Timing Attack described in
    # http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
    # It is on by default.
    #DelayEngine                    off
    
    # A basic anonymous configuration, no upload directories.
    
    # <Anonymous ~ftp>
    #   User                                ftp
    #   Group                               nogroup
    #   # We want clients to be able to login with "anonymous" as well as "ftp"
    #   UserAlias                   anonymous ftp
    #   # Cosmetic changes, all files belongs to ftp user
    #   DirFakeUser on ftp
    #   DirFakeGroup on ftp
    #
    #   RequireValidShell           off
    #
    #   # Limit the maximum number of anonymous logins
    #   MaxClients                  10
    #
    #   # We want 'welcome.msg' displayed at login, and '.message' displayed
    #   # in each newly chdired directory.
    #   DisplayLogin                        welcome.msg
    #   DisplayFirstChdir           .message
    #
    #   # Limit WRITE everywhere in the anonymous chroot
    #   <Directory *>
    #     <Limit WRITE>
    #       DenyAll
    #     </Limit>
    #   </Directory>
    #
    #   # Uncomment this if you're brave.
    #   # <Directory incoming>
    #   #   # Umask 022 is a good standard umask to prevent new files and dirs
    #   #   # (second parm) from being group and world writable.
    #   #   Umask                           022  022
    #   #            <Limit READ WRITE>
    #   #            DenyAll
    #   #            </Limit>
    #   #            <Limit STOR>
    #   #            AllowAll
    #   #            </Limit>
    #   # </Directory>
    #
    # </Anonymous>
    
    SocketBindTight on
    
    Include /etc/proftpd_ispconfig.conf
    
    
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This error is not related to saslauth.

    Please post the lines that begin with:

    smtpd_recipient_restrictions = ...
    mynetworks = ....

    from your postfix main.cf.
     
  7. Raffnix

    Raffnix New Member

    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

    mynetworks = 127.0.0.0/8

    Could reject_unauth_destination be the problem?
     
    Last edited: Feb 3, 2006
  8. Raffnix

    Raffnix New Member

    Thx for the help so far.

    Unfortunately I have to reset the server and reinstall everything. If I run again in this problem, I will return here. For now, the problem is "solved" ;)

    Thank you anyway.
     
  9. marsianman

    marsianman New Member

    Hi, I am having the same problem.

    When setting up postfix for plain text authentication (eventually to use TLS) I try to use telnet and verify that it is setup correctly. Unfortuneatly it seem to always fail authentication. I think it might be due to not knowing how to authenticate. What should be in /etc/pam.d/smtpd ?

    Further details (and my config files) can be found @ http://marsianman.is-a-geek.com:8000/wp

    Any help would be appreciated, thanks guys.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    It seems as if saslauthd isn't running. Please post the output of
    Code:
    ps aux
    Also, on your page I read this:
    You don't need sasldb2 because you're using saslauthd which means your user must be in /etc/passwd and /etc/shadow and have a valid password.
     
  11. Raffnix

    Raffnix New Member

    So here I am again :D

    I'm sorry but the problems consist (at least partially)

    Status:
    Mail receiving OK
    Mail sending OK with Outlook Express
    Mail sending fails with Uebimail
    (Error: It was not possible to send this e-mail
    SMTP Error: Recipient not accepted. Verify your relay rules)

    Mail log says:
    Edit: Added "check_relay_domain" as said here
    http://www.howtoforge.com/forums/showthread.php?t=323&highlight=Webmail+send+error
    and reloaded postfix but that did not help




    Proftp still "offline"
    Access with FTP-Client seems to be OK (User is confined to his folders)
    Access with Web-FTP fails (Error: Could not connect to localhost)

    proftpd.conf:
     
    Last edited: Feb 7, 2006
  12. falko

    falko Super Moderator ISPConfig Developer

    Did you restart Postfix after your changes?



    Please post the output of
    Code:
    netstat -tap
     
  13. Raffnix

    Raffnix New Member

    Yes, I restarted postfix, and the mail.log still says the same as quoted above

    netstat:

    Code:
    Aktive Internetverbindungen (Server und stehende Verbindungen)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost:mysql         *:*                     LISTEN     2093/mysqld
    tcp        0      0 *:81                    *:*                     LISTEN     2285/ispconfig_http
    tcp        0      0 *:ftp                   *:*                     LISTEN     3125/proftpd: (acce
    tcp        0      0 aphrodite.mydoma:domain *:*                     LISTEN     2445/named
    tcp        0      0 localhost:domain        *:*                     LISTEN     2445/named
    tcp        0      0 *:smtp                  *:*                     LISTEN     14122/master
    tcp        0      0 localhost:953           *:*                     LISTEN     2445/named
    tcp6       0      0 *:imaps                 *:*                     LISTEN     2010/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     2031/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     2018/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     1997/couriertcpd
    tcp6       0      0 *:www                   *:*                     LISTEN     2315/apache2
    tcp6       0      0 *:ssh                   *:*                     LISTEN     2247/sshd
    tcp6       0      0 *:smtp                  *:*                     LISTEN     14122/master
    tcp6       0      0 localhost:953           *:*                     LISTEN     2445/named
    tcp6       0      0 *:https                 *:*                     LISTEN     2315/apache2
    
    And by the way: I want to thank you for this program and especially for the fast and friendly support everyone gets here. This is really outstanding!
     
  14. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/hosts? Please post the output of
    Code:
    iptables -L
     
  15. Raffnix

    Raffnix New Member

    etc/hosts:

    Code:
    127.0.0.1       localhost
    ::1             localhost       ip6-localhost ip6-loopback
    fe00::0         ip6-localnet
    ff00::0         ip6-mcastprefix
    ff02::1         ip6-allnodes
    ff02::2         ip6-allrouters
    ff02::3         ip6-allhosts
    
    xx.xx.xx.xx     aphrodite.mydomain.tld  aphrodite
    
    changed it to

    Code:
    127.0.0.1       localhost.localdomain     localhost
    xx.xx.xx.xx     aphrodite.mydomain.tld  aphrodite
    
    ::1             localhost       ip6-localhost ip6-loopback
    fe00::0         ip6-localnet
    ff00::0         ip6-mcastprefix
    ff02::1         ip6-allnodes
    ff02::2         ip6-allrouters
    ff02::3         ip6-allhosts
    
    and rebooted but no change

    netstat is now
    Code:
    aphrodite:~# netstat -tap
    Aktive Internetverbindungen (Server und stehende Verbindungen)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     2095/mysqld
    tcp        0      0 *:81                    *:*                     LISTEN     2297/ispconfig_http
    tcp        0      0 *:ftp                   *:*                     LISTEN     2466/proftpd: (acce
    tcp        0      0 aphrodite.mydoma:domain *:*                     LISTEN     2453/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     2453/named
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     2453/named
    tcp        0      0 *:smtp                  *:*                     LISTEN     2436/master
    tcp6       0      0 *:imaps                 *:*                     LISTEN     2012/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     2031/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     2020/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     1999/couriertcpd
    tcp6       0      0 *:www                   *:*                     LISTEN     2327/apache2
    tcp6       0      0 *:ssh                   *:*                     LISTEN     2249/sshd
    tcp6       0      0 localhost:953           *:*                     LISTEN     2453/named
    tcp6       0      0 *:smtp                  *:*                     LISTEN     2436/master
    tcp6       0      0 *:https                 *:*                     LISTEN     2327/apache2
    

    iptables:

    Code:
    aphrodite:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    aphrodite:~#
    
     
    Last edited: Feb 8, 2006
  16. falko

    falko Super Moderator ISPConfig Developer

    I guess the value of mynetworks is not correct in /etc/postfix/main.cf because otherwise you should be able to send from localhost (Uebimiau). Please post /etc/postfix/main.cf here.
     
  17. Raffnix

    Raffnix New Member

    # 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 = aphrodite.mydomain.tld
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = aphrodite.mydomain.tld, localhost.mydomain.tld, , 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 = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,check_relay_domains
    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

    virtual_maps = hash:/etc/postfix/virtusertable

    mydestination = /etc/postfix/local-host-names
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Code:
    mynetworks = 127.0.0.0/8
    is correct...
    Please run
    Code:
    postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains'
    and restart Postfix.
     
  19. Raffnix

    Raffnix New Member

    Success!! Sending with Webmail now works.

    The necessary change to main.cf was not only to add "check_relay_domains" (which I already tried before) but to delete also "reject_unauth_destination"

    That's really great, thank you for your help. :)
     
  20. sandman_ua

    sandman_ua New Member

    And what about FTP-Server: Offilne?
    I have the same problem... :(
     

Share This Page