Whenever I restarted my amavis process I encountered the message:
Starting amavisd: head: cannot open `/etc/mailname' for reading: No such file or directory amavisd-new.
I decided to add an /etc/mailname file with "mail.mydomain.com", and - alas - I stopped receiving these warnings.
However, I encountered a nasty side-effect in my Postfix+amavis+dovecot setup: received emails no longer have the X-spam headers.
Here is an email header when the file /etc/mailname does not exist:
Received: from localhost (localhost [127.0.0.1]) by webservices.mydomain.com (Postfix) with ESMTP id 599C912EA177 for ; Thu, 4 Jun 2015 18:10:07 +0100 (WEST) X-virus-scanned: Debian amavisd-new at X-spam-flag: NO X-spam-score: -1.999 X-spam-level: X-spam-status: No, score=-1.999 required=3.49 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Here is a similar email right after adding the mailname file (in this example, mailname has been populated with wtf.com)
Received: from localhost (localhost [127.0.0.1]) by webservices.mydomain.com (Postfix) with ESMTP id 7195812EA177 for ; Thu, 4 Jun 2015 18:12:28 +0100 (WEST) X-virus-scanned: Debian amavisd-new at wtf.com
Everything in bold has disappeared. Can you help me understand the relationship between the two events?