Kérkel segíts, hogy ne maradjon hibás információ az oldalon!
Ha szerinted valami nem fedi a valóságot, kérlek írd meg, hogy javítani tudjam. Ha kérdésed van, fordulj hozzám bizalommal!

2014. július 18., péntek

Guestfish + ntfs guest

A napokban segítenem kellett valakinek a kvm imagéből kiszedni fájlokat. 
Az első reakcióm a guestfish volt. Centos alatt kell néhány csomag hozzá, hogy ntfst is tudjon. Ezeket a yum simán felrakja: 

  $ yum libguestfs libguestfs-tools libguestfs-winsupport

Találtam egy hasznos kis perl scriptet, ami képes bemountolni a windows meghajtót a fájlrendszerünkbe. 
Na ezt! Ezt ne használd, cefet lassú: 500k-2MB/s a csúcs.

Ennél a guestfish copy-outja jóval gyorsabb. Viszont az csak fájlonként tud. Erre megoldás a tar-out, ami könyvtárakat kirak tarba.
Ez már elég jó és gyors :)

A guestfish legyeszerűbben -i kapcsolóval használható, ekkor megpróbálja fellelni a parítciókat és auto mountolni magába: 

  $ guestfish --ro -a kepfile.img -i 

A --ro kapcsoló a read-onlyt jelzi. Ofc, ha módosítani akarunk, ez nem kell.


[root@marwin 2014-07-17]# guestfish --ro -a kvm3583.img -i
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.
Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell
Operating system: Windows Server 2012 Datacenter
/dev/sda2 mounted on /
> 
  
A guestfish konzolon:
  listázás: ll
  másolás: copy-out
  könyvtár csomagolva kimásolása: tar-out

Amit nem próbáltam ki, mert későn jött az ötlet, az az, hogy a guestfish is tud stdoutra tarozni, nekem meg ftp-n át kellett töltenem a fájlokat és az lftp fogad stdinről feltöltenivalót. 
Ezt az ötletet majd legközelebb .)

UPDATE:
Vágyam még ma teljesült, így néz ki egy minta parancs:
   $ virt-tar-out --ro -a kvm3583.img /KONYVTAR - | lftp -u useride,passwordide 84.21.7.211 -e "put /dev/stdin -o file.tar; quit;"

Legnagyobb hátránya, hogy csak könyvtárakat enged tarozni a libguestfs.

2014. június 19., csütörtök

KVM Windows VIRTIO net driver code 39

Windows Server 2008 Web edition (32bit) 60 napos trialjával játszva tapasztaltam, hogy nem sikerül a virtio hálózati drivert telepíteni: 
 Windows cannot load the device driver for this hardware. The driver may be corrupted or missing (Code 39). 

 A hiba oka, mint kiderült, az az, hogy a windows automatikusan megkeresve olyan verzió driverét találta meg, ami nem ment fel a 2008-ra. Az XP könyvtárából kézzel kiválasztva a drivert gond nélkül települt. 

Hasonló hiba volt XP esetén is, onnan jött a megoldás: https://bugzilla.redhat.com/show_bug.cgi?id=1043197

2014. június 17., kedd

RHEL KVM kép root jelszó beállítása

A RHEL képekben a root jelszó alapértelmezésben le van tiltva, openstack környezetben cloud-inittől várja a beállításakat. 
RHEL 6 (centos 6) KVM környezetben a root jelsztót kívülről a guestfs-tools segítségével állíthatjuk be a RHEL oldalon leírtak szerint: 
https://access.redhat.com/site/solutions/641193


# guestfish --rw -a 
> run
>list-filesystems
> mount /dev/vda1 /
> vi /etc/shadow

A !! helyére az OpenSSL-el lehet jelszót generálni:


openssl passwd -1 changeme
Majd ki kell kapcsolni a cloud-init servicet:
  1. guestfish -a  -i ln-sf /dev/null /etc/systemd/system/cloud-init.service

2014. június 11., szerda

XRDP magyar kiosztás

Két link, ami segít megoldani XRDP (+vnc) alatt a billentyűzet kiosztás bajokat XFCE alatt.

http://bernatarlandis.wordpress.com/2013/08/09/wrong-keyboard-layout-in-rdp-session-over-debian-gnulinux/

Nekem ez működött Centos alatt: 
https://www.mail-archive.com/xrdp-devel@lists.sourceforge.net/msg00309.html

Mivel az ilyen levlisták is eltűnhetnek, biztos, ami biztos, idemásolom  a magyar charset fájlt: 



 Szőllősi Imre
e-mail: szoll...@eig.hu

[noshift]
Key8=0:0
Key9=65307:27
Key10=49:49
Key11=50:50
Key12=51:51
Key13=52:52
Key14=53:53
Key15=54:54
Key16=55:55
Key17=56:56
Key18=57:57
Key19=246:246
Key20=252:252
Key21=243:243
Key22=65288:8
Key23=65289:9
Key24=113:113
Key25=119:119
Key26=101:101
Key27=114:114
Key28=116:116
Key29=122:122
Key30=117:117
Key31=105:105
Key32=111:111
Key33=112:112
Key34=501:337
Key35=250:250
Key36=65293:13
Key37=65507:0
Key38=97:97
Key39=115:115
Key40=100:100
Key41=102:102
Key42=103:103
Key43=104:104
Key44=106:106
Key45=107:107
Key46=108:108
Key47=233:233
Key48=225:225
Key49=48:48
Key50=65505:0
Key51=507:369
Key52=121:121
Key53=120:120
Key54=99:99
Key55=118:118
Key56=98:98
Key57=110:110
Key58=109:109
Key59=44:44
Key60=46:46
Key61=45:45
Key62=65506:0
Key63=65450:42
Key64=65513:0
Key65=32:32
Key66=65509:0
Key67=65470:0
Key68=65471:0
Key69=65472:0
Key70=65473:0
Key71=65474:0
Key72=65475:0
Key73=65476:0
Key74=65477:0
Key75=65478:0
Key76=65479:0
Key77=65407:0
Key78=65300:0
Key79=65429:0
Key80=65431:0
Key81=65434:0
Key82=65453:45
Key83=65430:0
Key84=65437:0
Key85=65432:0
Key86=65451:43
Key87=65436:0
Key88=65433:0
Key89=65435:0
Key90=65438:0
Key91=65439:0
Key92=0:0
Key93=65406:0
Key94=237:237
Key95=65480:0
Key96=65481:0
Key97=65360:0
Key98=65362:0
Key99=65365:0
Key100=65361:0
Key101=0:0
Key102=65363:0
Key103=65367:0
Key104=65364:0
Key105=65366:0
Key106=65379:0
Key107=65535:127
Key108=65421:13
Key109=65508:0
Key110=65299:0
Key111=65377:0
Key112=65455:47
Key113=65027:0
Key114=0:0
Key115=65515:0
Key116=65516:0
Key117=65383:0
Key118=0:0
Key119=0:0
Key120=0:0
Key121=0:0
Key122=0:0
Key123=0:0
Key124=65027:0
Key125=0:0
Key126=65469:61
Key127=0:0
Key128=0:0
Key129=0:0
Key130=0:0
Key131=0:0
Key132=0:0
Key133=0:0
Key134=0:0
Key135=0:0
Key136=0:0
Key137=0:0

[shift]
Key8=0:0
Key9=65307:27
Key10=39:39
Key11=34:34
Key12=43:43
Key13=33:33
Key14=37:37
Key15=47:47
Key16=61:61
Key17=40:40
Key18=41:41
Key19=214:214
Key20=220:220
Key21=211:211
Key22=65288:8
Key23=65056:0
Key24=81:81
Key25=87:87
Key26=69:69
Key27=82:82
Key28=84:84
Key29=90:90
Key30=85:85
Key31=73:73
Key32=79:79
Key33=80:80
Key34=469:336
Key35=218:218
Key36=65293:13
Key37=65507:0
Key38=65:65
Key39=83:83
Key40=68:68
Key41=70:70
Key42=71:71
Key43=72:72
Key44=74:74
Key45=75:75
Key46=76:76
Key47=201:201
Key48=193:193
Key49=167:167
Key50=65505:0
Key51=475:368
Key52=89:89
Key53=88:88
Key54=67:67
Key55=86:86
Key56=66:66
Key57=78:78
Key58=77:77
Key59=63:63
Key60=58:58
Key61=95:95
Key62=65506:0
Key63=65450:42
Key64=65511:0
Key65=32:32
Key66=65509:0
Key67=65470:0
Key68=65471:0
Key69=65472:0
Key70=65473:0
Key71=65474:0
Key72=65475:0
Key73=65476:0
Key74=65477:0
Key75=65478:0
Key76=65479:0
Key77=65273:0
Key78=65300:0
Key79=65463:55
Key80=65464:56
Key81=65465:57
Key82=65453:45
Key83=65460:52
Key84=65461:53
Key85=65462:54
Key86=65451:43
Key87=65457:49
Key88=65458:50
Key89=65459:51
Key90=65456:48
Key91=65452:44
Key92=0:0
Key93=65406:0
Key94=205:205
Key95=65480:0
Key96=65481:0
Key97=65360:0
Key98=65362:0
Key99=65365:0
Key100=65361:0
Key101=0:0
Key102=65363:0
Key103=65367:0
Key104=65364:0
Key105=65366:0
Key106=65379:0
Key107=65535:127
Key108=65421:13
Key109=65508:0
Key110=65299:0
Key111=65377:0
Key112=65455:47
Key113=65027:0
Key114=0:0
Key115=65515:0
Key116=65516:0
Key117=65383:0
Key118=0:0
Key119=0:0
Key120=0:0
Key121=0:0
Key122=0:0
Key123=0:0
Key124=65027:0
Key125=65513:0
Key126=65469:61
Key127=65515:0
Key128=65517:0
Key129=0:0
Key130=0:0
Key131=0:0
Key132=0:0
Key133=0:0
Key134=0:0
Key135=0:0
Key136=0:0
Key137=0:0

[altgr]
Key8=0:0
Key9=65307:27
Key10=126:126
Key11=65114:711
Key12=94:94
Key13=65109:728
Key14=65112:176
Key15=65116:731
Key16=96:96
Key17=65110:729
Key18=65105:180
Key19=65113:733
Key20=65111:168
Key21=65115:184
Key22=65288:8
Key23=65289:9
Key24=92:92
Key25=124:124
Key26=101:101
Key27=182:182
Key28=956:359
Key29=2299:8592
Key30=8364:8364
Key31=205:205
Key32=248:248
Key33=254:254
Key34=247:247
Key35=215:215
Key36=65293:13
Key37=65507:0
Key38=228:228
Key39=496:273
Key40=464:272
Key41=91:91
Key42=93:93
Key43=689:295
Key44=237:237
Key45=435:322
Key46=419:321
Key47=36:36
Key48=223:223
Key49=172:172
Key50=65505:0
Key51=164:164
Key52=62:62
Key53=35:35
Key54=38:38
Key55=64:64
Key56=123:123
Key57=125:125
Key58=60:60
Key59=59:59
Key60=62:62
Key61=42:42
Key62=65506:0
Key63=65450:42
Key64=65513:0
Key65=32:32
Key66=65509:0
Key67=65470:0
Key68=65471:0
Key69=65472:0
Key70=65473:0
Key71=65474:0
Key72=65475:0
Key73=65476:0
Key74=65477:0
Key75=65478:0
Key76=65479:0
Key77=65407:0
Key78=65300:0
Key79=65429:0
Key80=65431:0
Key81=65434:0
Key82=65453:45
Key83=65430:0
Key84=65437:0
Key85=65432:0
Key86=65451:43
Key87=65436:0
Key88=65433:0
Key89=65435:0
Key90=65438:0
Key91=65439:0
Key92=0:0
Key93=65406:0
Key94=60:60
Key95=65480:0
Key96=65481:0
Key97=65360:0
Key98=65362:0
Key99=65365:0
Key100=65361:0
Key101=0:0
Key102=65363:0
Key103=65367:0
Key104=65364:0
Key105=65366:0
Key106=65379:0
Key107=65535:127
Key108=65421:13
Key109=65508:0
Key110=65299:0
Key111=65377:0
Key112=65455:47
Key113=65027:0
Key114=0:0
Key115=65515:0
Key116=65516:0
Key117=65383:0
Key118=0:0
Key119=0:0
Key120=0:0
Key121=0:0
Key122=0:0
Key123=0:0
Key124=65027:0
Key125=0:0
Key126=65469:61
Key127=0:0
Key128=0:0
Key129=0:0
Key130=0:0
Key131=0:0
Key132=0:0
Key133=0:0
Key134=0:0
Key135=0:0
Key136=0:0
Key137=0:0

[capslock]
Key8=0:0
Key9=65307:27
Key10=49:49
Key11=50:50
Key12=51:51
Key13=52:52
Key14=53:53
Key15=54:54
Key16=55:55
Key17=56:56
Key18=57:57
Key19=214:214
Key20=220:220
Key21=211:211
Key22=65288:8
Key23=65289:9
Key24=81:81
Key25=87:87
Key26=69:69
Key27=82:82
Key28=84:84
Key29=90:90
Key30=85:85
Key31=73:73
Key32=79:79
Key33=80:80
Key34=469:336
Key35=218:218
Key36=65293:13
Key37=65507:0
Key38=65:65
Key39=83:83
Key40=68:68
Key41=70:70
Key42=71:71
Key43=72:72
Key44=74:74
Key45=75:75
Key46=76:76
Key47=201:201
Key48=193:193
Key49=48:48
Key50=65505:0
Key51=475:368
Key52=89:89
Key53=88:88
Key54=67:67
Key55=86:86
Key56=66:66
Key57=78:78
Key58=77:77
Key59=44:44
Key60=46:46
Key61=45:45
Key62=65506:0
Key63=65450:42
Key64=65513:0
Key65=32:32
Key66=65509:0
Key67=65470:0
Key68=65471:0
Key69=65472:0
Key70=65473:0
Key71=65474:0
Key72=65475:0
Key73=65476:0
Key74=65477:0
Key75=65478:0
Key76=65479:0
Key77=65407:0
Key78=65300:0
Key79=65429:0
Key80=65431:0
Key81=65434:0
Key82=65453:45
Key83=65430:0
Key84=65437:0
Key85=65432:0
Key86=65451:43
Key87=65436:0
Key88=65433:0
Key89=65435:0
Key90=65438:0
Key91=65439:0
Key92=0:0
Key93=65406:0
Key94=205:205
Key95=65480:0
Key96=65481:0
Key97=65360:0
Key98=65362:0
Key99=65365:0
Key100=65361:0
Key101=0:0
Key102=65363:0
Key103=65367:0
Key104=65364:0
Key105=65366:0
Key106=65379:0
Key107=65535:127
Key108=65421:13
Key109=65508:0
Key110=65299:0
Key111=65377:0
Key112=65455:47
Key113=65027:0
Key114=0:0
Key115=65515:0
Key116=65516:0
Key117=65383:0
Key118=0:0
Key119=0:0
Key120=0:0
Key121=0:0
Key122=0:0
Key123=0:0
Key124=65027:0
Key125=0:0
Key126=65469:61
Key127=0:0
Key128=0:0
Key129=0:0
Key130=0:0
Key131=0:0
Key132=0:0
Key133=0:0
Key134=0:0
Key135=0:0
Key136=0:0
Key137=0:0

[shiftcapslock]
Key8=0:0
Key9=65307:27
Key10=39:39
Key11=34:34
Key12=43:43
Key13=33:33
Key14=37:37
Key15=47:47
Key16=61:61
Key17=40:40
Key18=41:41
Key19=246:246
Key20=252:252
Key21=243:243
Key22=65288:8
Key23=65056:0
Key24=113:113
Key25=119:119
Key26=101:101
Key27=114:114
Key28=116:116
Key29=122:122
Key30=117:117
Key31=105:105
Key32=111:111
Key33=112:112
Key34=501:337
Key35=250:250
Key36=65293:13
Key37=65507:0
Key38=97:97
Key39=115:115
Key40=100:100
Key41=102:102
Key42=103:103
Key43=104:104
Key44=106:106
Key45=107:107
Key46=108:108
Key47=233:233
Key48=225:225
Key49=167:167
Key50=65505:0
Key51=507:369
Key52=121:121
Key53=120:120
Key54=99:99
Key55=118:118
Key56=98:98
Key57=110:110
Key58=109:109
Key59=63:63
Key60=58:58
Key61=95:95
Key62=65506:0
Key63=65450:42
Key64=65511:0
Key65=32:32
Key66=65509:0
Key67=65470:0
Key68=65471:0
Key69=65472:0
Key70=65473:0
Key71=65474:0
Key72=65475:0
Key73=65476:0
Key74=65477:0
Key75=65478:0
Key76=65479:0
Key77=65273:0
Key78=65300:0
Key79=65463:55
Key80=65464:56
Key81=65465:57
Key82=65453:45
Key83=65460:52
Key84=65461:53
Key85=65462:54
Key86=65451:43
Key87=65457:49
Key88=65458:50
Key89=65459:51
Key90=65456:48
Key91=65452:44
Key92=0:0
Key93=65406:0
Key94=237:237
Key95=65480:0
Key96=65481:0
Key97=65360:0
Key98=65362:0
Key99=65365:0
Key100=65361:0
Key101=0:0
Key102=65363:0
Key103=65367:0
Key104=65364:0
Key105=65366:0
Key106=65379:0
Key107=65535:127
Key108=65421:13
Key109=65508:0
Key110=65299:0
Key111=65377:0
Key112=65455:47
Key113=65027:0
Key114=0:0
Key115=65515:0
Key116=65516:0
Key117=65383:0
Key118=0:0
Key119=0:0
Key120=0:0
Key121=0:0
Key122=0:0
Key123=0:0
Key124=65027:0
Key125=65513:0
Key126=65469:61
Key127=65515:0
Key128=65517:0
Key129=0:0
Key130=0:0
Key131=0:0
Key132=0:0
Key133=0:0
Key134=0:0
Key135=0:0
Key136=0:0

Key137=0:0

2014. március 15., szombat

Perl CPAN automatikus követés

Kicsit idegesítő volt, hogy a CPAN-t nem lehetett otthagyni, hogy telepítsen fel egy csomagot, mert mindig [yes]-re kellett nyomni, hogy kövesse a szükséges összetevőket. 
Ez az egy soros átkonfigurálja a CPAN-t automatikus követésre: 

perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit'

2013. december 22., vasárnap

Sendmail + dkim

Elég sok keresgélés után az utolsó mozzanatokat ez a leírás adta meg:
http://www.goldfisch.at/knowwiki/howtos/dkim-filter

goldfisch.at: thanks :)


dkim-filter with sendmail

dkim-filter is a milter for sendmail/postfix to implement signing and verifying emails according the DKIM-standard.

installing dkim-filter on Ubuntu

I think dkim-filter is easy to install on any system, but on ubuntu its just
apt-get install dkim-filter

I didnt had to copy and edit any M4-files as described in various howtos. I use Ubuntu 8.04 LTS but I assume its the same on any more recent Ubuntu.

configuring dkim-filter


On Ubuntu you will have a file /etc/default/dkim-filter with only a socket-directive in it. I recommend commenting this line out cause it will override any directive you’ll set in dkimfilter.conf.

The main-config is in /etc/dkim-filter.conf and its well documented in man dkimfilter.conf. I strongly advice to use KeyList instead of KeyFile and dont forget theInternalHosts-directive which is what many Howtos miss.

Here is my dkim-filter.conf .. Please note that the paths are special to my system, so please adapt.
Syslog                  yes
AutoRestart             yes
AutoRestartRate         10/1h
AlwaysAddARHeader       yes
Background              yes
Canonicalization        relaxed
DNSTimeout              5
Mode                    sv
SignatureAlgorithm      rsa-sha256
SubDomains              no
UseASPDiscard           no
      
X-Header                yes
Socket                          local:/var/run/dkim-filter/dkim-filter.sock

KeyList         /etc/mail/dkim-keys/keylist
InternalHosts   /etc/mail/dkim-keys/goodhosts

The Socket-Directive and the communication with sendmail


The Socket is the communication between sendmail and the milter. It can be a internet-socket via tcp on a port or via a socket-file. I choose the file-socket.

Note that the Socket-Direktive is a bit .. strange. It seems that it has to be a directory where it can put its PID-file as well. Watch syslog for errors about the socket and then watch the running process (ps waux | grep dkim) which socket it has choosen and enter it in your configfile.

The path of this Socket is what you’ll have to specify in your sendmail.mc below !!

InternalHosts describes which mails shall be signed


By default dkim-filter is verifying all emails. Only emails from 127.0.0.1 (localhost) are signed by default. Well this is satisfying on very basic setups, on average mail-hosts its not.

Create this file and add all mailhosts that will send mail through this milter. 127.0.0.1 should be in it, and the Public Domainname of your server and of course every other mailserver that uses your mailserver as smarthost or DKIM-signing-instance.

Mine looks like this (my zimbra uses this server as smarthost !!):
127.0.0.1
server.mydomain.at
zimbra.mydomain.at


Please Note there is also a Directive ExternalIgnoreList that is not used on my system but can be used to specify hosts that will use your server as smarthost, but do their own DKIM-signing. 

KeyList and setting a selector


The InternalHosts specifies which emails are signed. This setting specifies which keys are used for signing so of course it only applies for signing.

You have to create this file and it should look like the following:
*@mydomain1.at:mydomain1.at:/etc/mail/dkim-keys/mydomain1.at/default
*@mydomain2.at:mydomain2.at:/etc/mail/dkim-keys/mydomain2.at/default
...

The first column is the sender-glob. Any sender-adress that matched the glob will be signed for the domain that is specified in the second column and the key that is specified in the third column.
You can read below how to create the keys.
The name of the keyfile is very important. (not that path, just the name). Its the SELECTOR. The Selector is very important for setting up your DNS-record below. The selector is kind of the subdomain that will hold the key for your domain as TXT-record. default is a common selector. mail another, but I guess PINKCROCODILEwont hurt either. 

Creating a key


go to the folder where you want to create your keys. I recommend using a own subdirectory for each domain. You will not override your own files then and can use the same selector for all your domains.

create the directory and go to it and then run

dkim-genkey -d mydomain1.at
This will create two files:
  • default.private
  • default.txt

rename default.private to default or whatever you want to use as selector. Remember: the name of the key defined the name of your selector !!

you can use

dkim-genkey -s myselector -d mydomain1.at
to have the files created as myselector.private and myselector.txt, but you must remove the trailing ‘.private’ anyway, but this is necessary if you have all keys in one folder

configuring sendmail


You have to add the milter to your sendmail.mc which might be located in /etc/mail
Add the following line to sendmail.mc and be sure not to touch any other line if you are new to sendmail. sendmail.mc is very sensitive about leading whitespaces and such stuff.

MAIL_FILTER(`dkim-milter’,`S=local:/var/run/dkim-filter/dkim-filter.sock,F=, T=C:10m;S:10m;R:20m;E:20m’)
This defines a milter. I named the milter dkim-milter. This name is used in the next line you have to add. Then after the S= you need to specify the Socket as descibed in dkim-filter.conf. For the meaning of the other parameters please check your sendmail-docs or just use the values I used :)

And then you have to add another line to sendmail.mc - or - if you use any other milters, add this milter to the existing ones.

define(`confINPUT_MAIL_FILTERS’, `goldmilter,dkim-milter’)
There is only one confINPUT_MAIL_FILTERS-lines in each sendmail.mc, so dont add another one if there is already one !!. I have two milters in my system so I have to milters specified in this line.

If dkim is the only milter you use, its just dkim-milter then:

define(`confINPUT_MAIL_FILTERS’, `dkim-milter’)

After you are are ready, you will recompile sendmail.cf by entering the directory this two files are located in and running make and restarting sendmail.
cd /etc/mail
make
/etc/init.d/sendmail reload

watch the logs and please not that dkim-filter should be started before sendmail is started or sendmail will complain that it cant find the milter cause the socket does not exist yet. Its created by the Milter.

In a nutshell: sendmail is a program and dkim-filter is a program and they both communicate via the Socket we specified. dkim-filter is actually a milter which means that its a program that is integrated in every step of emailcommunication and therefor can do things that are not integrated into sendmail.

starting dkim-filter


on ubuntu its /etc/init.d/dkim-filter restart
on other systems it will be different

adding the public key to your DNS-record


DKIM works with asymetric keys. We created the keys above.
Remember: There is a private key whos filename specifies the selector. And there is a second file that has a txt-extension. This file holds everthing we need to add to our domain-record.

If you run bind9/named, just open your master-file and add the content of this file.
For any other setup (like a webbased domain-tool) you create a subdomain and add a TXT-record for this domain.
The name of the subdomain depends on your selector (set by the name of your private keyfile) and is SELECTOR._domainkey. So if you followed my instructions you’ll have a name default._domainkey but this can also be any name you used as selector. The full name an also be pinkcrocodile._domainkey.mydomain.at.

Then create a TXT-record that holds the string in the txt-file (one of the two files you created when creating the key with dkim-genkey) starting with v=DKIM ....
Then reload your nameserver and check if you did it right at http://dkimcore.org/c/keycheck

checking if things work


* send yourself a mail and look at the mail-source * send a mail to your gmail-account and look at ‘show details’ where it should say signed by mydomain1.at
example of a real source:
(the selector is heavypedals here and not default - for promoting my cargobike-company www.heavypedals.at
X-DKIM: Sendmail DKIM Filter v2.5.4 tng.goldfisch.at oBJKvEtj004420
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=heavypedals.at;
 s=heavypedals; t=1292792234; bh=ZMqIXD99NQ7chkcOn6W+a+0Kd4Cdcw3KCF+
 ZIw6Jq4o=; h=Date:From:To:Message-ID:Subject:MIME-Version:
  Content-Type:Content-Transfer-Encoding; b=Ev1gSD7F/iCK+P86mbePJlTX
 0l0mQAGf93dmeyKN5EtoBoZY+s3c+LTKRrQKHsr4r8b7vj759JcxA/QVsS1G9DTcNds
 E+67ZrGSlFjXwefGFK+3jmQP4Gyji8GS+my0JIEb6LGxCzQQFSbgSsPHiu9+9Sziw9p
 NZnWGqECja9bg=


and gmail adds the following header if everything works well: 
Authentication-Results: dkim=pass header.i=@heavypedals.at

ADSP - records



You can add more information to your DNS-zone. the adsp-record will distribute a policy how DKIM is used on your system. That means it tells recipient what to do if a mail from your domain is not signed !!