Sendmail

發送郵件:正確的 /dev/urandom

  • May 2, 2015

我在 hpux 11.31 上配置 sendmail 如果我設置了我必須設置一個隨機文件

define(`confRAND_FILE',`dev:/dev/urandom')dnl

給出這個錯誤

STARTTLS: Error: no proper random file definition dev:/dev/urandom

如果我設置

define(`confRAND_FILE',`file:/dev/urandom')dnl

給出這個錯誤

STARTTLS: Warning: safeopen(/dev/urandom) failed

如何設置?謝謝

找到解決方案 http://support.hp.com/id-en/document/c00916394

必須使用 egd:/dev/urandom,而不是文件,使用 /dev/random 會報錯

這是正確的mc文件

divert(0)dnl
VERSIONID(`$Id: generic-hpux10.mc,v 8.13 2001/05/29 17:29:52 ca Exp $')
OSTYPE(hpux11)dnl
DOMAIN(generic)dnl
define(`_X400_UUCP_')dnl
define(`_MASQUERADE_ENVELOPE_')dnl
define(`MASQUERADE_NAME')dnl
define(`confTRY_NULL_MX_LIST',`T')dnl
define(`LUSER_RELAY',`name_of_luser_relay')dnl
define(`DATABASE_MAP_TYPE',`dbm')dnl
define(`_CLASS_U_')dnl
define(`LOCAL_RELAY')dnl
define(`MAIL_HUB')dnl
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5')dnl
FEATURE(always_add_domain)dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(openmail)dnl
MAILER(uucp)dnl
define(`SMART_HOST', `posta.domain.com')
define(`confCACERT_PATH', `/etc/mail/certs')dnl
define(`confCACERT', `/etc/mail/certs/domain.com.crt')dnl
define(`confSERVER_CERT', `/etc/mail/certs/hpux2.domain.com.crt')dnl
define(`confSERVER_KEY', `/etc/mail/certs/hpux2.domain.com.key')dnl
define(`confCLIENT_CERT', `/etc/mail/certs/hpux2.domain.com.crt')dnl
define(`confCLIENT_KEY', `/etc/mail/certs/hpux2.domain.com.key')dnl
define(`confRAND_FILE',`egd:/dev/urandom')dnl
D{tls_version}TLSv1
O UseTLS=True

引用自:https://unix.stackexchange.com/questions/199887