How to setup mx record for subdomain?

Questions of the day ?

How to setup a MX domain for ?

We just now edit zone file /var/named/master/db.domeniuro

$TTL 300

@ 1d IN SOA (
2016090701 ;Serial
10800 ;Refresh after 3 hours
3600 ;Retry after 1 hour
1209600 ;Expire after 1 week
86400 ) ;Minimum TTL of 1 day

;———————–___ Name Servers ____—————————-

1d IN NS
1d IN NS
1d IN MX 5
1d IN MX 10
1d IN TXT “v=spf1 a mx ptr -all”

;———————–___ Aliases___________—————————-

mail IN A
mail2 IN A

subdomeniu  IN  A

;———- MX Subdomeni —————-
subdomeniu IN MX 5
subdomeniu IN MX 20


How we test if we setup right MX ?

[root@mail7 ~]# host -t mx mail is handled by 20 mail is handled by 5

How to fix auto-read-only mdadm.

This guide shows you a simple way to fix your mdadm raid based drives which are not syncing or in the auto-read-only mode.

To find the names of your drives which are under auto-read-only mode or not syncing

cat /proc/mdstat

Force the drives to sync.

mdadm --readwrite /dev/md9

Replace md9 with the name of the drive like md127 etc.
server ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear] [multipath]
md125 : active (auto-read-only) raid1 sda1[0] sdb1[1]
      192640 blocks [2/2] [UU]

md126 : active raid1 sda5[0] sdb5[1]
      97650944 blocks [2/2] [UU]

md127 : active raid1 sdb2[1] sda2[0]
      97659008 blocks [2/2] [UU]
      [=>...................]  resync =  8.8% (8686848/97659008) finish=64.0min speed=23148K/sec

md128 : active (auto-read-only) raid1 sdb6[1] sda6[0]
      288875200 blocks [2/2] [UU]

Source Info:

CP: max source files number arguments for copy utility


Today we have a problem: We get this error when we try to copy over 32356 file in other folder.
[root@mail]# cp -p office_23\* office\
-bash: /bin/cp: Argument list too long

Solutions: run your command in a loop.

[root@mail]# for file in office_23\*; do cp -p “$file” office\; done

And works very well.

Could not reliably determine the server’s fully qualified domain name Ubuntu?

If you get next error:

Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
... waiting apache2:
Could not reliably determine the server's fully qualified domain name, using for ServerName

vi  /etc/apache2/conf.d/fqdn
or vi  /etc/apache2/conf-available/fqdn.conf  ( for Ubuntu 14.04 )
 a2enconf fqdn

Ubuntu server 12.04 LTS with GUI and xRDP.

Some people like GUI interface and some steps show here.

First step is to go comand line interface:

sudo apt-get update
sudo apt-get install ubuntu-desktop

install Gnome 
apt-get install gnome-shell

and reboot

After reboot we need to install xRDP

apt-get install xrdp

root@server-ubuntu-12:~# sysv-rc-conf --list | grep xrdp
xrdp 0:off 1:off 2:on 3:on 4:on 5:on 6:off

How to set locale in Ubuntu / Debian

After a clean Debian/Ubuntu install, I get the following error “LC_ALL to default locale: No such file or directory”.

Answer:  Type the following in terminal to get rid of that error,

sudo apt-get install language-pack-en-base

sudo dpkg-reconfigure locales

Other options it is to run:

 # locale-gen 

You will get

 Generating locales (this might take a while)...
   en_US.UTF-8... done
Generation complete.