Help with my server

Discussion in 'Installation/Configuration' started by ladykrimson, Aug 2, 2010.

  1. ladykrimson

    ladykrimson New Member

    I am at my wit's end. I have been working on this for three weeks, and I am so frustrated!

    A year and a half ago, my friend helped me set up a Linux Mandriva server for email, web pages, file storage, and mysql. While I am computer literate with Windows, I am new to Linux. My friend set me up with Webmin to manage the server, and that was how I did it for a year and a half.

    Unfortunately, the motherboard blew a capacitor, and I don't have the know-how to repair that. The motherboard was very old (http://www.biostar-usa.com/mbdetails.asp?model=m7vig pro d), and I really don't want to pay $150.00 to replace it. I tried to boot the hard drive in the new system, but it freezes on the splash screen with a kernel panic. I tried getting help on the Mandriva forums, but they were impatient with me and rather rude (not to mention a little overwhelming). My friend that helped me set it up does not have time to help me again, so I am on my own.

    So, I have a new system with a new hard drive, on which I have installed Mandriva Power Pack 2010. I copied over some of the settings (only the ones regarding my host name and domain). All of the services are working, but my server will not resolve to my domain name. My server is also refusing email connection. I have managed to ping my server successfully using a command prompt.

    I am very computer literate with Windows software and basic hardware, but my weak areas include programming and networking. These two areas are quite hazy for me. I am also a bit new to Linux, though I am learning a lot from this experience.

    I still have the old server hard drive (it has Mandriva 2008) which is completely functional; it just doesn't want to boot. We have tried editing the fstab files and the menu.lst files, but it will not move past a kernel panic. I do not have a Live CD, and the company does not sell them anymore. I can fully access the drive as a secondary drive only.

    Could someone please please help me? Please? I don't know where else to go! :(
     
  2. falko

    falko Super Moderator

    Does the new server have the same network settings (e.g. IP address) and hostname as the old one?

    Any errors in your mail log?
     
  3. ladykrimson

    ladykrimson New Member

    Just one error, over and over again.

    Code:
    fatal: open database /etc/postfix/virtual.db: No such file or directory
    
    The file is there, though.

    I think the new server has all the old network settings. I am not sure because my networking knowledge is quite weak.
     
  4. falko

    falko Super Moderator

    What's the output of
    Code:
    ls -la /etc/postfix/
    ? What's in /etc/postfix/main.cf?
     
  5. ladykrimson

    ladykrimson New Member

    Code:
    ls -la /etc/postfix/:
    Code:
    total 232
    drwxr-xr-x  3 root root  4096 2010-08-03 14:37 ./
    drwxr-xr-x 95 root root 12288 2010-08-04 12:02 ../
    -rw-r--r--  1 root root 18849 2009-10-11 16:24 access
    -rw-r--r--  1 root root  2337 2009-08-19 18:29 aliases
    -rw-r--r--  1 root root 12288 2009-08-19 18:29 aliases.db
    -rw-r--r--  1 root root  3548 2009-10-11 16:24 bounce.cf.default
    -rw-r--r--  1 root root 11681 2009-10-11 16:24 canonical
    -rw-r--r--  1 root root   250 2009-10-11 16:24 dynamicmaps.cf
    -rw-r--r--  1 root root  9904 2009-10-11 16:24 generic
    -rw-r--r--  1 root root 18287 2009-10-11 16:24 header_checks
    -rw-r--r--  1 root root  2412 2010-08-03 13:38 main.cf
    -rw-r--r--  1 root root 23245 2009-10-11 16:24 main.cf.default
    -rw-r--r--  1 root root 26007 2009-10-11 16:24 main.cf.dist
    -rw-r--r--  1 root root  1350 2009-10-11 16:24 makedefs.out
    -rw-r--r--  1 root root  6770 2010-08-03 14:37 master.cf
    -rw-r--r--  1 root root  6816 2009-10-11 16:24 relocated
    drwxr-xr-x  2 root root  4096 2008-12-11 11:28 ssl/
    -rw-r--r--  1 root root   835 2009-10-11 16:24 syslog-ng.conf
    -rw-r--r--  1 root root 12500 2009-10-11 16:24 transport
    -rw-r--r--  1 root root 12619 2010-08-03 12:08 virtual
    -rw-r--r--  1 root root 12288 2010-08-03 12:08 virtual.db
    
    What's in /etc/postfix/main.cf:

    Code:
    # Please be sure to read the /usr/share/doc/postfix/README.MDK file
    # to learn about differences from stock postfix to Mandriva package.
    # This file contains only the parameters changed from a default install
    # see /etc/postfix/main.cf.dist for a commented, fuller version of this file.
    
    # These are changed by postfix install script
    readme_directory = /usr/share/doc/postfix/README_FILES
    html_directory = /usr/share/doc/postfix/html
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    command_directory = /usr/sbin
    manpage_directory = /usr/share/man
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    
    # User configurable parameters
    
    delay_warning_time = 1h
    smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux)
    unknown_local_recipient_reject_code = 550
    smtp-filter_destination_concurrency_limit = 2
    lmtp-filter_destination_concurrency_limit = 2
    virtual_alias_domains = krimsonphoenix.com
    virtual_alias_maps = hash:/etc/postfix/virtual
    recipient_delimiter = +
    myhostname = mail.krimsonphoenix.com
    myorigin = krimsonphoenix.com
    inet_interfaces = localhost
    mynetworks_style = host
    virtual_alias_domains = krimsonphoenix.com
    virtual_alias_maps = hash:/etc/postfix/virtual
    disable_vrfy_command = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_client_access hash:/etc/postfix/pop-before-smtp, reject_non_fqdn_recipient, reject_rbl_client sbl.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_unauth_destination
    alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
    smtpd_helo_required = yes
    smtp_skip_4xx_greeting = yes
    fallback_relay = 
    mailbox_command = /usr/bin/procmail
    message_size_limit = 409600000
    mailbox_size_limit = 10512000000
    
    #SSL Configuration
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    
    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
    initial_destination_concurrency = 3
    recipient_delimiter = +
    
    Thank you very much.
     
  6. falko

    falko Super Moderator

    Is your Postfix running chrooted? What's in /etc/postfix/master.cf?
     
  7. ladykrimson

    ladykrimson New Member

    What exactly does chrooted mean? Is it user ownership? If so, ownership of the folder is the root. Here are the contentsof the master.cf:

    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # The script postfix-chroot.sh can be used to set up a Postfix chroot
    # environment on your Mandrivalinux System.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp	inet	n	-	y	-	-	smtpd
    #submission inet n       -       n       -       -       smtpd
    #  -o smtpd_tls_security_level=encrypt
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #smtps     inet  n       -       n       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628      inet  n       -       n       -       -       qmqpd
    pickup	fifo	n	-	y	60	1	pickup
      -o content_filter=
      -o receive_override_options=
    cleanup	unix	n	-	y	-	0	cleanup
    qmgr	fifo	n	-	y	300	1	qmgr
    #qmgr     fifo  n       -       n       300     1       oqmgr
    tlsmgr	unix	-	-	y	1000?	1	tlsmgr
    rewrite	unix	-	-	y	-	-	trivial-rewrite
    bounce	unix	-	-	y	-	0	bounce
    defer	unix	-	-	y	-	0	bounce
    trace	unix	-	-	y	-	0	bounce
    verify	unix	-	-	y	-	1	verify
    flush	unix	n	-	y	1000?	0	flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp	unix	-	-	y	-	-	smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay	unix	-	-	y	-	-	smtp
    	-o smtp_fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq	unix	n	-	y	-	-	showq
    error	unix	-	-	y	-	-	error
    retry	unix	-	-	y	-	-	error
    discard	unix	-	-	y	-	-	discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp	unix	-	-	y	-	-	lmtp
    anvil	unix	-	-	y	-	1	anvil
    scache	unix	-	-	y	-	1	scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    #maildrop  unix  -       n       n       -       -       pipe
    #  flags=DRhu user=nobody argv=/usr/bin/maildrop -d ${recipient}
    #
    # ====================================================================
    #
    # The Cyrus deliver program has changed incompatibly, multiple times.
    # Please See the Postfix CYRUS_README file for details
    # deliver interface (deprecated), to use this also use
    # postconf -e cyrus-deliver_destination_recipient_limit=1
    cyrus-deliver     unix  -       n       n       -       -       pipe
      user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # for default cyrus socket placement
    cyrus     unix  -       n       n       -       -       lmtp
      -o lmtp_cache_connection=yes
    #
    # if you configure cyrus socket in the chroot jail
    cyrus-chroot     unix  -       -       y       -       -       lmtp
      -o lmtp_cache_connection=yes
    #
    # for lmtp to cyrus via tcp
    cyrus-inet	unix	-	-	y	-	-	lmtp
      -o lmtp_cache_connection=yes
      -o lmtp_sasl_auth_enable=yes
      -o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
      -o lmtp_sasl_security_options=noanonymous
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    #uucp      unix  -       n       n       -       -       pipe
    #  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # ====================================================================
    #
    # Other external delivery methods.
    # These are not distributed with Mandrivalinux
    #
    #ifmail    unix  -       n       n       -       -       pipe
    #  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    #
    #bsmtp     unix  -       n       n       -       -       pipe
    #  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    #
    #scalemail-backend unix -       n       n       -       2       pipe
    #  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
    #  ${nexthop} ${user} ${extension}
    #
    #mailman   unix  -       n       n       -       -       pipe
    #  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    #  ${nexthop} ${user}
    #
    ##### START OF CONTENT FILTER CUSTOMIZATIONS #####
    # Please see the Postfix FILTER_README for details.
    # These sample entries expect your content filter to
    # listen on port 10025 and to inject mail back into
    # postfix on port 10026.
    #
    # to enable such content filter run the command
    #    postconf -e content_filter=smtp-filter:127.0.0.1:10025
    #    postconf -e smtp-filter_destination_concurrency_limit=2
    # or
    #    postconf -e content_filter=lmtp-filter:127.0.0.1:10025
    #    postconf -e lmtp-filter_destination_concurrency_limit=2
    # and the command
    #    postconf -e receive_override_options=no_address_mappings
    #
    # adjust the value of ?mtp-filter_destination_concurrency_limit
    # to match the maximum number of process your content filter
    # will spawn.
    #
    127.0.0.1:10026	inet	n	-	y	-	-	smtpd
      -o content_filter=
      -o smtpd_restriction_classes=
      -o smtpd_client_restrictions=permit_mynetworks,reject
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_end_of_data_restrictions=
      -o smtpd_etrn_restrictions=
      -o smtpd_data_restrictions=
      -o smtpd_delay_reject=no
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o mynetworks=127.0.0.0/8
      -o smtpd_authorized_xforward_hosts=127.0.0.0/8
      -o strict_rfc821_envelopes=yes
      -o smtpd_error_sleep_time=0
      -o smtpd_soft_error_limit=1001
      -o smtpd_hard_error_limit=1000
      -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    #
    lmtp-filter	unix	-	-	y	-	-	lmtp
      -o lmtp_data_done_timeout=1200
      -o lmtp_send_xforward_command=yes
      -o lmtp_cache_connection=no
      -o max_use=20
    #
    smtp-filter	unix	-	-	y	-	-	smtp
      -o smtp_data_done_timeout=1200
      -o smtp_send_xforward_command=yes
      -o max_use=20
    #
    ##### END OF CONTENT FILTER CUSTOMIZATIONS #####
     
  8. falko

    falko Super Moderator

    http://en.wikipedia.org/wiki/Chroot

    Yes, your Postfix is running chrooted. What's the output of
    Code:
    ls -la /var/spool/postfix/etc/postfix/
    ?
     
  9. ladykrimson

    ladykrimson New Member

    there is no such directory as /var/spool/postfix/etc/postfix. The contents of /var/spool/postfix/etc are:

    host.conf
    host
    localtime
    nsswitch.conf
    resolve.conf
    services
     
  10. falko

    falko Super Moderator

    Try this:
    Code:
    cp -pfr /etc/postfix/ /var/spool/postfix/etc/
    Then restart Postfix.
     
  11. ladykrimson

    ladykrimson New Member

    I did so, and the connection was refused.
     
  12. falko

    falko Super Moderator

    Ok, then change
    Code:
    smtp	inet	n	-	y	-	-	smtpd
    to
    Code:
    smtp	inet	n	-	n	-	-	smtpd
    in your master.cf to not chroot Postfix and restart it.
     
  13. ladykrimson

    ladykrimson New Member

    The connection is still refused. When I restarted, I received this message:

    Code:
    Executing /etc/rc.d/init.d/postfix restart ..
    
    Shutting down postfix: [  OK  ]
    Starting postfix: /usr/sbin/postfix-chroot.sh: line 380: return: -1: invalid option
    return: usage: return [n]
    [  OK  ]
     
  14. ladykrimson

    ladykrimson New Member

    These are the current postfix configurations. Perhaps they will help:

    Code:
    Hostname 	Krimson 
    System 	Linux Krimson 2.6.31.13-desktop-1mnb #1 SMP Tue Apr 27 21:14:13 EDT 2010 i686 Intel(R) Celeron(R) CPU 2.20GHz GNU/Linux 
    
    main.cf
    
    non-default parameters
    alias_maps 	hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases 
    broken_sasl_auth_clients 	yes 
    delay_warning_time 	1h 
    disable_vrfy_command 	yes 
    html_directory 	/usr/share/doc/postfix/html 
    inet_interfaces 	localhost 
    initial_destination_concurrency 	3 
    mailbox_command 	/usr/bin/procmail 
    mailbox_size_limit 	10512000000 
    manpage_directory 	/usr/share/man 
    message_size_limit 	409600000 
    myhostname 	krimson 
    mynetworks_style 	host 
    myorigin 	krimsonphoenix.com 
    readme_directory 	/usr/share/doc/postfix/README_FILES 
    recipient_delimiter 	+ 
    sendmail_path 	/usr/sbin/sendmail.postfix 
    smtp_tls_note_starttls_offer 	yes 
    smtp_use_tls 	yes 
    smtpd_banner 	$myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux) 
    smtpd_helo_required 	yes 
    smtpd_recipient_restrictions 	permit_sasl_authenticated, permit_mynetworks, check_client_access hash:/etc/postfix/pop-before-smtp, reject_non_fqdn_recipient, reject_rbl_client sbl.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_unauth_destination 
    smtpd_sasl_auth_enable 	yes 
    smtpd_tls_CAfile 	/etc/postfix/ssl/cacert.pem 
    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_use_tls 	yes 
    virtual_alias_domains 	krimsonphoenix.com 
    virtual_alias_maps 	hash:/etc/postfix/virtual 
    
    main.cf
    
    parameters defined as per defaults
    command_directory 	/usr/sbin 
    config_directory 	/etc/postfix 
    daemon_directory 	/usr/lib/postfix 
    data_directory 	/var/lib/postfix 
    mailq_path 	/usr/bin/mailq 
    newaliases_path 	/usr/bin/newaliases 
    setgid_group 	postdrop 
    smtpd_sasl_local_domain 	
    smtpd_sasl_security_options 	noanonymous 
    smtpd_tls_auth_only 	no 
    smtpd_tls_session_cache_timeout 	3600s 
    tls_random_source 	dev:/dev/urandom 
    unknown_local_recipient_reject_code 	550 
    
    master.cf
    
    service	type	private	unpriv	chroot	wakeup	maxproc	command + args
    smtp	inet	n	-	y	-	-	smtpd 
    pickup	fifo	n	-	y	60	1	pickup 
    							-o
    							-o
    cleanup	unix	n	-	y	-	0	cleanup 
    qmgr	fifo	n	-	y	300	1	qmgr 
    tlsmgr	unix	-	-	y	1000?	1	tlsmgr 
    rewrite	unix	-	-	y	-	-	trivial-rewrite 
    bounce	unix	-	-	y	-	0	bounce 
    defer	unix	-	-	y	-	0	bounce 
    trace	unix	-	-	y	-	0	bounce 
    verify	unix	-	-	y	-	1	verify 
    flush	unix	n	-	y	1000?	0	flush 
    proxymap	unix	-	-	n	-	-	proxymap 
    proxywrite	unix	-	-	n	-	1	proxymap 
    smtp	unix	-	-	y	-	-	smtp 
    relay	unix	-	-	y	-	-	smtp 
    							-o
    showq	unix	n	-	y	-	-	showq 
    error	unix	-	-	y	-	-	error 
    retry	unix	-	-	y	-	-	error 
    discard	unix	-	-	y	-	-	discard 
    local	unix	-	n	n	-	-	local 
    virtual	unix	-	n	n	-	-	virtual 
    lmtp	unix	-	-	y	-	-	lmtp 
    anvil	unix	-	-	y	-	1	anvil 
    scache	unix	-	-	y	-	1	scache 
    cyrus-deliver	unix	-	n	n	-	-	pipe 
    							
    cyrus	unix	-	n	n	-	-	lmtp 
    							-o
    cyrus-chroot	unix	-	-	y	-	-	lmtp 
    							-o
    cyrus-inet	unix	-	-	y	-	-	lmtp 
    							-o
    							-o
    							-o
    							-o
    127.0.0.1:10026	inet	n	-	y	-	-	smtpd 
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    							-o
    lmtp-filter	unix	-	-	y	-	-	lmtp 
    							-o
    							-o
    							-o
    							-o
    smtp-filter	unix	-	-	y	-	-	smtp 
    							-o
    							-o
    							-o
    
    A friend of mine mentioned security settings...that my server will refuse connections until it is not an open relay. Does this make any sense?
     
  15. falko

    falko Super Moderator

    Which guide (URL) did you use to set up the system?
     
  16. ladykrimson

    ladykrimson New Member

    I didn't use any guide. I looked a few up, but none of them ever gave specifics of networking (which ip goes where, domain configuration, etc.). I basically looked at all the postfix files from my old hard drive and inputted values into the new files. I was very careful not to simply copy stuff over. Where ever I saw IP addresses and domain settings, I adjusted the new files with those settings.

    There are no urls I can find which allow me to configure a server using webmin, which is how the first server was done.
     
  17. ladykrimson

    ladykrimson New Member

    When I use Thunderbird to connect to my mail server, I get an error message that tells me the connection was refused. I called up my ISP and double checked that all of my ports are open. I have a host name. I just don't understand why this is not working.

    I have the old hard drive with all the settings, but that one will not boot up due to the different motherboard. I do not have a Live CD for Mandriva 2008, nor do they sell one (so I can't boot the old drive, which is what I would prefer to do).

    I am so frustrated with this. It has been over a month, and I just can't figure this out. I am trying to go back to networking basics, but my inexperience with Linux is hindering my progress. I wanted to scan the ports on my server, but I can't figure out how to run the already installed nMap. I tried telnet, but port 23 is closed, and I am not very good with console commands, either.

    Any advice or instructions on this?
     

Share This Page