Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ok this one is new for me. I get an error looking like this.

Apr 27 17:00:46 powerplant postfix/smtp[2695]: E614FC0867: to=<****@***>, orig_to=<wood@*****>, relay=*****.basefarm.net[80.*****]:25, delay=346544, delays=346166/0.02/0.08/378, dsn=4.0.0, status=deferred (host ****.basefarm.net[80.*****] said: 451 Cannot verify DKIM signature: pubkey_unavailable (in reply to end of DATA command))

If I send an e-mail from my server to a external address from the command prompt to for example nisse@gmail.com it works without any error. But if a have a virtual forwarding with the virtual_alias_maps option for example kalle@localdomain.com to nisse@gmail.com then I get the error.

I am running Ubuntu with Postfix.

Example of the header of a failing email. This is the bounce back I get from the mail server after a few hours.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
X-Received: by with SMTP id f8mr143970lbc.40.1398584872715;
        Sun, 27 Apr 2014 00:47:52 -0700 (PDT)
Return-Path: <sblood@gmail.com>
Received: from ****-MacBook-Air.local (*****.bredband.comhem.se. [*****.193])
        by mx.google.com with ESMTPSA id zx3sm14422469lbc.2.2014.
        for <wood@*****.mooo.com>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 27 Apr 2014 00:47:52 -0700 (PDT)
Message-ID: <535CB625.4050600@gmail.com>
Date: Sun, 27 Apr 2014 09:47:49 +0200
From: Sun_Blood <*****@gmail.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: wood@******.mooo.com
Subject: dagens =?ISO-8859-1?Q?f=F6rsta?=
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

More logs. The problem only happens when i send email from gmail to gmail but not hotmail to gmail.

From gmail forwarded to gmail(error)

May  2 11:51:00 powerplant postfix/smtpd[5065]: connect from mail-lb0-f175.google.com[]
May  2 11:51:00 powerplant postfix/smtpd[5065]: BA49BC085F: client=mail-lb0-f175.google.com[]
May  2 11:51:00 powerplant postfix/cleanup[5069]: BA49BC085F: message-id=<53636A81.9010105@gmail.com>
May  2 11:51:00 powerplant postfix/qmgr[30892]: BA49BC085F: from=<****@gmail.com>, size=1884, nrcpt=1 (queue active)
May  2 11:51:00 powerplant postfix/smtpd[5065]: disconnect from mail-lb0-f175.google.com[]
May  2 11:51:42 powerplant postfix/smtp[5070]: BA49BC085F: to=<****@gmail.com>, orig_to=<***@****.mooo.com>, relay=smtp.comhem.basefarm.net[]:25, delay=42, delays=0.09/0.01/0.05/42, dsn=4.0.0, status=deferred (host smtp.comhem.basefarm.net[] said: 451 Cannot verify DKIM signature: pubkey_unavailable (in reply to end of DATA command))

From hotmail to gmail(no error)

May  2 11:52:14 powerplant postfix/smtpd[5065]: connect from blu0-omc3-s24.blu0.hotmail.com[]
May  2 11:52:14 powerplant postfix/smtpd[5065]: A95EAC0860: client=blu0-omc3-s24.blu0.hotmail.com[]
May  2 11:52:14 powerplant postfix/cleanup[5069]: A95EAC0860: message-id=<BLU0-SMTP361FDF6546E7DB7AC80279C92430@phx.gbl>
May  2 11:52:14 powerplant postfix/qmgr[30892]: A95EAC0860: from=<****@hotmail.com>, size=1151, nrcpt=1 (queue active)
May  2 11:52:15 powerplant postfix/smtpd[5065]: disconnect from blu0-omc3-s24.blu0.hotmail.com[]
May  2 11:52:17 powerplant postfix/smtp[5070]: A95EAC0860: to=<****@gmail.com>, orig_to=<***@****.mooo.com>, relay=smtp.comhem.basefarm.net[]:25, delay=2.7, delays=0.39/0/0.05/2.2, dsn=2.0.0, status=sent (250 OK id=1WgA8d-0003kq-Ii)
May  2 11:52:17 powerplant postfix/qmgr[30892]: A95EAC0860: removed
share|improve this question
Could you add the headers of a failing email to your question? Make sure to include all the fields you're signing with DKIM. –  Ladadadada Apr 28 at 5:50
Sure, no problem. Could it be that the DKIM-Signature is stripped when postfix tries to forward the message? –  Sun_Blood Apr 28 at 8:21
It seems to me that you are sending the email from your gmail account, to your local account, and want it forwarded back to your gmail account. Have I got that right? –  Jenny D Apr 28 at 8:42
Almost. I am sending it from my gmail account to a local account that forwards it to a second account. For example(fake names) user1@gmail.com -> user@mydomain.com user@mydomain.com -> user2@gmail.com –  Sun_Blood Apr 28 at 8:52
This really shouldn't make any difference, but could you try sending an email with only US ASCII characters in the Subject, instead of the Swedish ones you're using? Also, it might be interesting to compare if you could try sending one from e.g. Yahoo, who also use DKIM, to see if the same problem shows up. –  Jenny D Apr 28 at 9:05
show 1 more comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.