Postfix email issues

8 posts / 0 new
Last post
#1 Wed, 05/22/2013 - 02:08
WilliamW

Postfix email issues

For the first time I decided to get an self managed VPS. It's gone pretty good so far. I'm using Virtualmin on Ubuntu 12.04 with Postfix as my mail server. I have noticed an issue that seems to be sending all my emails to peoples spam folders. Some header content is missing.

A sample header

from:    Site Name <webmaster@com>
to:    username <emailaddress@com>
date:    Wed, May 8, 2013 at 11:31 PM
subject:    Test Email
mailed-by:    com

As you can see everything shows as from or to "com" with no domain. Anyone have any ideas? I obviously missed something along the way.

Wed, 05/22/2013 - 08:20
andreychek

Howdy,

What is the output of these two commands:

hostname
postconf -n
Wed, 05/22/2013 - 12:06
WilliamW

Here is the output

~$ sudo hostname

mysite

:~$ postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
masquerade_domains = $mydomain
mydestination = mysite.com, localhost.com, localhost, mysite, myothersite
myhostname = mysite.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination permit_inet_interfaces
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
Wed, 05/22/2013 - 13:16
andreychek

Okay, one last question -- what are the contents of the file "/etc/mailname"?

-Eric

Wed, 05/22/2013 - 13:18
WilliamW

mysite.com

Thu, 05/23/2013 - 02:24 (Reply to #5)
WilliamW

Anyone have any ideas? My forum is pretty much crippled until I can fix this.

Thu, 05/23/2013 - 04:31
WilliamW

Here is the entire header if it helps

Delivered-To: receiver@gmail.com
Received: by xx.xxx.xxx.xxx with SMTP id db14csp45890bkb;
        Thu, 23 May 2013 02:12:27 -0700 (PDT)
X-Received: by xx.xx.x.xx with SMTP id o9mr2996106paa.13.1369300346519;
        Thu, 23 May 2013 02:12:26 -0700 (PDT)
Return-Path: <mysite@com>
Received: from mysite.com (mysite.com. [xxx.xxx.xxx.x])
        by mx.google.com with ESMTP id wv10si5768587pbc.101.2013.05.23.02.12.25
        for <receiver@gmail.com>;
        Thu, 23 May 2013 02:12:26 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of mysite@com designates xxx.xxx.xxx.x as permitted sender) client-ip=xxx.xxx.xxx.x;
Authentication-Results: mx.google.com;
       spf=pass (google.com: best guess record for domain of mysite@com designates xxx.xxx.xxx.x as permitted sender) smtp.mail=mysite@com
Received: by mysite.com (Postfix, from userid 0)
id 1C6F86852E5; Thu, 23 May 2013 02:11:55 -0700 (PDT)
From: mysite@com
Subject: Testing
To: receiver@com
Message-Id: <13693040955.2415@mysite.com>
X-Originating-IP: xx.xxx.xx.xx
X-Mailer: Webmin 1.630
Date: Thu, 23 May 2013 02:11:55 -0700 (PDT)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="bound1369300315"

This is a multi-part message in MIME format.

I followed some of the leads in the following thread and found that some of those files did have my old hostname. Fixed, restarted, still the same. What's really confusing is why does the receivers domain get removed?

http://www.virtualmin.com/node/17748

Thu, 05/23/2013 - 04:51
WilliamW

After doing all the above and still not working I took the .com off of myhostname = mysite.com and now it works. shrugs

Topic locked