Amvisd DKIM issue postfix not matching

I am having issue Amvisd DKIM using postfix. I cant figure out what is wrong been trying to figure it out for a few days, to me it seems the email are being signed correctly by amvisd but it is not matching my public key.

When i run amavisd showkeys I get the below output
; key#1, domain, /var/db/dkim/        3600 TXT (
  "v=DKIM1; p="

When I run amavisd testkeys
TESTING#1:   => invalid (public key: missing p= tag)

Running the fig command dig txt
; IN    TXT

;; ANSWER SECTION: 1799 IN TXT    "\"v=DKIM1\; k=rsa\; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJldKngdR9Ru5VQQndzLo+ktKbCNU7o6tfAhxtPu/11AVpyUl9dv7cS3+JENT6MmX2Gy5W7D82LScgktmxetuMJG6tlbd+DuAMdaZgAOu4LwVO+nRiBr7xw6+o3paol2MljUPGl5k5YB0nQBGKDoKZ71gR9wNqFBExNsx7MW3cWwIDAQAB\""

I cant figure out why amvisd testkey fails also when sending a email to my google account my keys dont match

dkim=neutral (no signature)

DKIM-Signature: v=1; a=rsa-sha256;; h=mime-version
      :received:received; s=default; t=1437694957; x=1439509358; bh=JF
      Ok6hXTeVAVMqjoOz689ONNsrR9+5T84DqNAyodRt0=; b=DuA5yXMMNYm9+Yx7nq

My amavisd.conf setting i am using are below
dkim_key('', 'default', '/var/db/dkim/');
@dkim_signature_options_bysender_maps = ( {
    ""  => { d => "", a => 'rsa-sha256', ttl => 21*24*3600, c => 'simple' },
Eric ConstantineAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Is the DKIM string in your txt-record all on 1 line, not in multiple lines ... That can sometimes cause strange things to happen ... ?
Eric ConstantineAuthor Commented:
the dns dkim txt string we look up with dig is all on one line the and the amavisd showkeys
 command shows the key on multiply lines but i belive this is normal.
Zephyr ICTCloud ArchitectCommented:
Please take a look at 2. Syntax Error ... It seems like that is what you are experiencing ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eric ConstantineAuthor Commented:
Thanks this looks to of solved one issue I am now getting

below error with amavisd testkey
TESTING#1:   => invalid (public key: unsupported version)

gmail give me error
dkim=neutral (bad version)

dig show
dig +short txt
"v=DKIM1 k=rsa p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJldKngdR9Ru5VQQndzLo+ktKbCNU7o6tfAhxtPu/11AVpyUl9dv7cS3+JENT6MmX2Gy5W7D82LScgktmxetuMJG6tlbd+DuAMdaZgAOu4LwVO+nRiBr7xw6+o3paol2MljUPGl5k5YB0nQBGKDoKZ71gR9wNqFBExNsx7MW3cWwIDAQAB"

I am think the issue is that the dig show k=rsa in the dns key but when I do amavisd showkey it is now showing        3600 TXT (
  "v=DKIM1; p="

Would appreciate any further thoughts before i get my dns provider to change the key again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.