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;
        h=message-id:date:from:user-agent:mime-version:to:subject
         :content-type:content-transfer-encoding;
        bh=hIg2rsvX7ZVlZxUvlxcAferfWCNO29ChHZUt2szZE3s=;
        b=yX7zxQby6f/EO0kg5jKePqRgxB8aUm3OngzMbb6ZhUbSB80o3TNSaiaSm3yvhP5yY3
         G0QSaRht+qu/O2f/shhPHSdQn0MZVcnmkXjz2h7vLOQoO6k7amDd4abKSo6ATfdUDtRo
         2aObDC/NtH4cjTcDtSDa4S77XTtbCTxEjuPB3Mkaeei76UCfjZt6Q8dwssIC5JrfNIvM
         yRe3jhVdRksHFLmdj/0WQvN/wSblUyZH473QiDGu5VdSPfRpJHZeATeAhCdYLGDebw7P
         p6KspvOEOK+w7SG/JQMdbvmxIf0l8UKNHzxGPfYRJ6LkRA59ptrXtGxFmLT8FbCKHxVk
         Hcag==
X-Received: by 10.112.13.72 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.04.27.00.47.51
        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[209.85.217.175]
May  2 11:51:00 powerplant postfix/smtpd[5065]: BA49BC085F: client=mail-lb0-f175.google.com[209.85.217.175]
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[209.85.217.175]
May  2 11:51:42 powerplant postfix/smtp[5070]: BA49BC085F: to=<****@gmail.com>, orig_to=<***@****.mooo.com>, relay=smtp.comhem.basefarm.net[80.76.149.166]:25, delay=42, delays=0.09/0.01/0.05/42, dsn=4.0.0, status=deferred (host smtp.comhem.basefarm.net[80.76.149.166] 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[65.55.116.99]
May  2 11:52:14 powerplant postfix/smtpd[5065]: A95EAC0860: client=blu0-omc3-s24.blu0.hotmail.com[65.55.116.99]
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[65.55.116.99]
May  2 11:52:17 powerplant postfix/smtp[5070]: A95EAC0860: to=<****@gmail.com>, orig_to=<***@****.mooo.com>, relay=smtp.comhem.basefarm.net[80.76.149.166]: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

 
discard

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

Browse other questions tagged or ask your own question.