Need help with ISPConfig Mail and Squirrelmail

Discussion in 'Installation/Configuration' started by m.xander, Dec 24, 2011.

  1. falko

    falko Super Moderator

    I guess digitalpacific.com.au isn't your domain, right? Only the owner of the domains can create DNS records for the domain, so it makes no sense to create a record if you don't own the domain. Therefore it makes more sense to rename your server (to something like server1.urbancampsite.com).
     
  2. cbj4074

    cbj4074 HowtoForge Supporter

    I will add that unless you have some good reason for running your own name-servers on the ISPConfig box, I would just let the Web host handle it.

    There are several disadvantages to the roll-your-own approach:

    a.) It's complicated and it's easy to make a mistake.

    b.) There are no "validation tools" within the interface that are specific to your setup (ISPConfig couldn't possibly account for that, whereas your host could, given that it's their network and hardware).

    c.) If your server goes down or is compromised, you're in worse shape than you would otherwise be (the potential exists to "lock yourself out" of your box completely if the DNS server goes belly-up).

    You know?
     
  3. m.xander

    m.xander New Member

    Changed the server name...

    Hello... after reading the post from Falko as well I've changed the server name.

    In ISPConfig have changed the name of the server to server1.urbancampsite.com

    In /etc/postfix/main.cf have changed myhostname to server1.urbancampsite.com
    then ;
    Code:
    service postfix restart
    Still no success sending from anyuser@urbancampsite.com

    The was no spacial reason to have my own name servers, I just figured while I was going to have a crack at this I'd get my own nameservers and learn a bit about that as well... I figured that it would better for clients to have ns1.urbancampsite.com rather than ns1.somebodyelse.com that's all...

    Webmin is now installed Falko so if you've got further thoughts...
     
  4. falko

    falko Super Moderator

    Code:
    mh1:~# dig server1.urbancampsite.com
    
    ; <<>> DiG 9.3.4 <<>> server1.urbancampsite.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 62116
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;server1.urbancampsite.com.     IN      A
    
    ;; AUTHORITY SECTION:
    urbancampsite.com.      86400   IN      SOA     ns1.urbancampsite.com. m.xander.urbancampsite.com. 2012010901 28800 7200 604800 86400
    
    ;; Query time: 456 msec
    ;; SERVER: 213.133.98.98#53(213.133.98.98)
    ;; WHEN: Mon Jan  9 13:10:00 2012
    ;; MSG SIZE  rcvd: 92
    
    mh1:~#
    You didn't create an A record for server1.urbancampsite.com.
     
  5. m.xander

    m.xander New Member

    digitalpacific A record...

    hello,

    hopefully this may help with the trouble shooting..
    Removing the digital pacific A record basically stopped browser access to the website. so I've put it back in..

    [​IMG]

    ... so because its on one of their VPS's the full path "25612-21212.vps.digitalpacific.com.au" in the A record is necessary. once I put it back in the website was back...

    ... so that leads me to think about the mail server that the full path "25612-21212.vps.digitalpacific.com.au" might be applicable to the mail configation..???
     
  6. cbj4074

    cbj4074 HowtoForge Supporter

    What hostnames are listed in /etc/hostname and /etc/mailname?
     
  7. m.xander

    m.xander New Member

    Re-install

    OK... so I've spat the dummy and decided to re-install the whole server from scratch...

    Parallels control panel allows to re-install the Ubuntu server back to the original state before I started.
    So starting from the perfect server Ubuntu 10.04 starting at step 6-install vim-nox (which I didn't do, but instead first added the repositories as in step 8 in order to then install vim-gnome {just to get the fully blown vim} )

    Step 7. vi /etc/network/interfaces - and I recall not being 100% sure of this on the first attempt. and also its a little different on my server.

    vi /etc/network/interfaces
    Code:
    # This configuration file is auto-generated.
    # WARNING: Do not edit this file, otherwise your changes will be lost.
    # Please edit template /etc/network/interfaces.template instead.
    
    
    auto lo
    iface lo inet loopback
            address 127.0.0.1
            netmask 255.0.0.0
            broadcast 127.255.255.255
            up ip route replace 127.0.0.0/8 dev lo
    
    
    # Auto generated venet0 interfaces
    auto venet0
    iface venet0 inet static
            address 127.0.0.1
            netmask 255.255.255.255
            broadcast 0.0.0.0
            up route add -net 191.255.255.1 netmask 255.255.255.255 dev venet0
            up route add default gw 191.255.255.1
    
    auto venet0:0
    iface venet0:0 inet static
            address 202.130.46.114
            netmask 255.255.255.255
    
    so then...
    vi /etc/network/interfaces.template
    Code:
    auto lo
    iface lo inet loopback
            address 127.0.0.1
            netmask 255.0.0.0
            broadcast 127.255.255.255
            up ip route replace 127.0.0.0/8 dev lo
    
    Unfortunately at this stage I've re-installed the OS and only recall that I wasn't 100% sure about this except that address is 202.130.46.114
    I've done a liffle googling about this and would like to know how to verify what my server's network details are for these...
     
  8. cbj4074

    cbj4074 HowtoForge Supporter

    Your hosting provider custom-tailors its images (as do most) such that they function properly "out-of-the-box".

    You shouldn't have to make any changes to your VPS's networking configuration, manually. Most hosting providers offer a control panel of sorts to manage those aspects of the server.

    If you intend to use the hosting company's nameservers and DNS management interface this time around, don't change anything networking-related.
     
  9. m.xander

    m.xander New Member

    auto gernerated hostname...

    That makes sense...

    Now is /etc/hosts

    Code:
    127.0.0.1 localhost.localdomain localhost
    # Auto-generated hostname. Please do not remove this comment.
    202.130.46.114 25612-21212.vps.digitalpacific.com.au 25612-21212
    
    So does this relate to the problems I was having earlier?
    note: on the previous install I used "25612-21212.vps.digitalpacific.com.au" for this.
    Am I supposed to change "25612-21212.vps.digitalpacific.com.au" to "server1.mydomain.com"
    and
    "25612-21212" to "server1" for hostname or just leave that..?

    and then just add
    Code:
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
     
    Last edited: Jan 12, 2012
  10. cbj4074

    cbj4074 HowtoForge Supporter

    As stated above, don't fiddle with your network configuration. Nothing you need to do as related to ISPConfig requires you to change the default networking setup.

    Don't add the IPv6 bit, either. Unless your hosting provider has assigned an IPv6 address to you, and your DNS server (I should say, your hosting provider's DNS server) is IPv6-capable, doing so only invites trouble.

    The hostname that your provider has assigned to your VPS should not be changed. This ensures that your server is always reachable at that hostname, even if your "primary domain" (e.g., urbancampsite.com) is unresponsive. Maybe you let your domain name registration expire, maybe someone hacks your registration... there are a number of reasons for which you should not change anything related to that pre-assigned hostname.

    The are only a couple of exceptions:

    1.) your Postfix configuration files, in that the myhostname directive may be set to any domain that resolves to your IP address (e.g., urbancampsite.com), but,

    2.) if you make that change, you should ensure that your rDNS (reverse DNS) lookup matches -- that is, an rDNS against your IP address resolves to urbancampsite.com; this is usually done by setting the "primary domain" within the hosting provider's interface (e.g., to urbancampsite.com), and ensuring that the PTR (reverse DNS) record is accurate.
     
    Last edited: Jan 12, 2012
  11. m.xander

    m.xander New Member

    12 Install Postfix, Courier, Saslauthd, MySQL, rkhunter, binutils

    OK... so in step 12 Install Postfix, Courier, Saslauthd, MySQL, rkhunter, binutils
    I've entered a different system mail name:

    New password for the MySQL "root" user: <-- yourrootsqlpassword
    Repeat password for the MySQL "root" user: <-- yourrootsqlpassword
    Create directories for web-based administration? <-- No
    General type of mail configuration: <-- Internet Site
    System mail name: <-- xanderit.com
    SSL certificate required <-- Ok
     
  12. m.xander

    m.xander New Member

  13. falko

    falko Super Moderator

    Which virtualization technique do you use (OpenVZ, KVM, etc.)? Do you have access to the hardware node?
     
  14. m.xander

    m.xander New Member

    It uses Parrallals Virtuozzo
    Do I have acccess to hardware nodes... not 100% sure what you mean. Do you mean access to the hardware node... It's an unmanaged VPS but I can request basic information from the provider - they do not provide software support, but manage the hardware.
    (I'm having a search for more info, I haven't done much with the Parrallels control panel..)

    From what I understand about /etc/fstab it is used to define device mount points, so on a virtual machine I have virtual device mount points..?

    What does quota do with /etc/fstab ?
     
    Last edited: Jan 13, 2012
  15. cbj4074

    cbj4074 HowtoForge Supporter

    I have a similarly-configured VPS and modified the /dev/vzfs entry in /etc/fstab in order to get quota to work. The full contents of this file are:

    Code:
    proc  /proc       proc    defaults    0    0
    none  /dev/pts    devpts  rw          0    0
    /dev/vzfs / reiserfs rw,usrquota,grpquota 0 0
    
    Obviously, don't copy-paste the last line verbatim if your system uses a different device name/path.

    And use caution when modifying this file; mistakes can render your system un-bootable and your only option will be to start from scratch.

    If your provider offers a "snapshot" style backup service, it would be worth paying for it, even if only while you're configuring the server. Most providers will prorate those "add-on" services, too, so you may be able to pay just a few bucks for two or three days of access to the backup service.
     
    Last edited: Jan 13, 2012
  16. cbj4074

    cbj4074 HowtoForge Supporter

    That's fine, but as I've mentioned before, be sure to modify Postfix's configuration file (/etc/postfix/main.cf) such that the mydestination directive does not contain this same domain. The relevant lines should look like this:

    Code:
    myhostname = xanderit.com
    mydestination = localhost, localhost.localdomain
    
    Also, don't include in mydestination any domain for which ISPConfig is handling email. ISPConfig-controlled mail domains are handled differently (via the virtual_mailbox_domains directive).

    Finally, be sure that /etc/hostname and /etc/mailname contain xanderit.com, too.
     
  17. m.xander

    m.xander New Member

    Code:
    root@25612-21212:/# mount
    /dev/vzfs on / type reiserfs (rw,usrquota,grpquota)
    Code:
    root@25612-21212:~# vi /etc/fstab
    root@25612-21212:~# touch /aquota.user /aquota.group
    root@25612-21212:~# chmod 600 /aquota.*
    root@25612-21212:~# mount -o remount /
    mount: permission denied
    ..?
     
    Last edited: Jan 13, 2012
  18. cbj4074

    cbj4074 HowtoForge Supporter

    You can't un-mount a filesystem on which the running operating system is installed. Restart the machine if you have made the necessary changes to /etc/fstab and all should be well.
     
  19. m.xander

    m.xander New Member

    Yes... it was 3 or 4am and the idea was in the back of my mind somewhere...

    The container is rebooted now... thanks.

    Code:
    quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
    quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file.
    Please turn quotas off or use -f to force checking.
    Code:
    root@25612-21212:~# quotacheck -favugm
    quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
    quotacheck: Scanning /dev/vzfs [/] done
    quotacheck: Checked 3811 directories and 42728 files
    quotacheck: Quota file //aquota.user has IMMUTABLE flag set. Clearing.
    quotacheck: Failed to remove IMMUTABLE flag from quota file //aquota.user: Inappropriate ioctl for device
    quotacheck: Quota file //aquota.group has IMMUTABLE flag set. Clearing.
    quotacheck: Failed to remove IMMUTABLE flag from quota file //aquota.group: Inappropriate ioctl for device
    root@25612-21212:~#
     
    Last edited: Jan 13, 2012
  20. cbj4074

    cbj4074 HowtoForge Supporter

    And quota is functioning as expected? Great! :D
     

Share This Page