Guest User

Untitled

a guest
Jan 20th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. # opendkim-default-keygen
  2. Generating default DKIM keys:
  3. Cannot determine host's domain name, so skipping default key generation.
  4.  
  5. # hostname
  6. domain.org
  7.  
  8. # cat /etc/hostname
  9. domain.org
  10.  
  11. # cat /etc/hosts
  12. # Your system has configured 'manage_etc_hosts' as True.
  13. # As a result, if you wish for changes to this file to persist
  14. # then you will need to either
  15. # a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
  16. # b.) change or remove the value of 'manage_etc_hosts' in
  17. # /etc/cloud/cloud.cfg or cloud-config from user-data
  18. #
  19. # The following lines are desirable for IPv4 capable hosts
  20. 127.0.0.1 domain domain.org
  21. 127.0.0.1 localhost.localdomain localhost
  22. 127.0.0.1 localhost4.localdomain4 localhost4
  23.  
  24. # The following lines are desirable for IPv6 capable hosts
  25. ::1 domain domain.org
  26. ::1 localhost.localdomain localhost
  27. ::1 localhost6.localdomain6 localhost6
  28.  
  29. # cat /etc/sysconfig/network
  30. NETWORKING=yes
  31. HOSTNAME=domain.org
  32. NOZEROCONF=yes
  33.  
  34. # cat /etc/centos-release
  35. CentOS Linux release 7.5.1804 (Core)
  36.  
  37. # less /usr/sbin/opendkim-default-keygen
  38.  
  39. [root@domain postfix]# prog=opendkim
  40. [root@domain postfix]# KEYGEN=/usr/sbin/$prog-genkey
  41. [root@domain postfix]# DKIM_SELECTOR=default
  42. [root@domain postfix]# DKIM_KEYDIR=/etc/$prog/keys
  43. [root@domain postfix]# ls /etc/opendkim
  44. keys KeyTable SigningTable TrustedHosts
  45. [root@domain postfix]# ls /etc/opendkim/keys
  46. [root@domain postfix]# hostname --domain
  47. [root@domain postfix]# mkdir -p $DKIM_KEYDIR
  48. [root@domain postfix]# $KEYGEN -D $DKIM_KEYDIR -s $DKIM_SELECTOR -d domain.org
  49. [root@domain postfix]# chown -R root:$prog $DKIM_KEYDIR
  50. [root@domain postfix]# chmod 640 $DKIM_KEYDIR/$DKIM_SELECTOR.private
  51. [root@domain postfix]# chmod 644 $DKIM_KEYDIR/$DKIM_SELECTOR.txt
Add Comment
Please, Sign In to add comment