1

Hi im having problems with opendkim signing mail. check my log. i fixed the permission issue by chowning that file. but still emails are not being signed. any clues? running on centos5 with postfix/opendkim,dovecot

Jul 22 05:25:03 veepiz postfix/smtpd[3837]: > localhost[127.0.0.1]: 354 End data with <CR><LF>.<CR><LF>
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: public/cleanup socket: wanted attribute: status
Jul 22 05:25:03 veepiz postfix/cleanup[3846]: 72B3E16400B: message-id=<[email protected]>
Jul 22 05:25:03 veepiz opendkim[2681]: can't load key from /etc/mail/dkim/keys/veepiz.com/default: Permission denied
Jul 22 05:25:03 veepiz opendkim[2681]: (unknown-jobid): error loading key 'default._domainkey.veepiz.com'
Jul 22 05:25:03 veepiz postfix/cleanup[3846]: 72B3E16400B: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<veepiz.com>
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: input attribute name: status
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: input attribute value: 256
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: public/cleanup socket: wanted attribute: reason
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: input attribute name: reason
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: input attribute value: 4.7.1 Service unavailable - try again later
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: public/cleanup socket: wanted attribute: (list terminator)
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: input attribute name: (end)
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: > localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again later
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: abort all milters
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: milter8_abort: abort milter inet:127.0.0.1:20209
Jul 22 05:25:03 veepiz sendmail[3833]: p6M5P2l4003833: to=apache, ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30429, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 451 4.7.1 Service unavailable - try again later
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: < localhost[127.0.0.1]: QUIT
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: > localhost[127.0.0.1]: 221 2.0.0 Bye
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: match_hostname: localhost ~? 198.168.0.0/24
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: match_hostaddr: 127.0.0.1 ~? 198.168.0.0/24
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: match_hostname: localhost ~? 127.0.0.0/8
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: abort all milters
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: milter8_abort: abort milter inet:127.0.0.1:20209
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: disconnect event to all milters
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: milter8_disc_event: quit milter inet:127.0.0.1:20209
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: disconnect from localhost[127.0.0.1]
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: master_notify: status 1
Jul 22 05:25:03 veepiz postfix/smtpd[3837]: connection closed

here is output from postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = accept
milter_protocol = 2
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
myhostname = mail.veepiz.com
mynetworks = 198.168.0.0/24, 127.0.0.0/8
myorigin = veepiz.com
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:127.0.0.1:20209
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains =
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_milters = inet:127.0.0.1:20209
unknown_local_recipient_reject_code = 550

2 Answers 2

5

Looks like you may still have the wrong permissions on your keyfile. Chowning isn't enough, it must also be chmodded to 700.

Here's a step-by-step walkthrough for setting up OpenDKIM on a CentOS box with Postfix:

http://stevejenkins.com/blog/2010/09/how-to-get-dkim-domainkeys-identified-mail-working-on-centos-5-5-and-postfix-using-opendkim/

Follow those steps exactly and you'll be signing mail in no time.

4
  • thanks for the answer! please bear in mind that per serverfault.com/questions/how-to-answer we prefer answers that can stand alone even if every link in the post fell off the internet forever. So providing the "Reader's Digest" condensed version here would turn this from a good answer to a great one! Aug 8, 2011 at 9:39
  • Got it, Jeff. Will do that moving forward. Thanks. :)
    – SteveJ
    Aug 8, 2011 at 15:18
  • Still haven't done that, Steve. Not good. Dec 10, 2015 at 20:18
  • Holy Necropost, Batman! :) What have I still not done that's not good? If it's "Creating the Reader's Digest" version of the instructions... first, I said I'd do that "moving forward." Second, there are no condensed version of THOSE instructions, as that process requires a lot of steps. Also, DomainKeys is outdated, and shouldn't be used. The NEW condensed version is simply "yum install opendkim" The updated package (I'm the Fedora packager) has made a lot of progress since 2011. :)
    – SteveJ
    Dec 11, 2015 at 0:15
3

I know the question has been posted some while ago... but this reply could be helpful for other people...

I had the same issue and I solved by changing the rights on the file.

ls -l /etc/mail/dkim/keys/veepiz.com/default
-rw------- 1 root     root     887 Dec 10 19:07 default

if the file belongs to root you have to chown it.

chown opendkim:opendkim /etc/mail/dkim/keys/veepiz.com/default
-rw------- 1 opendkim opendkim 887 Dec 10 19:07 default

restart opendkim and then postfix.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .