Message from discussion
null or MISSING-HOST-NAME in From field
Received: by 10.224.138.142 with SMTP id a14mr1536864qau.4.1351884082844;
Fri, 02 Nov 2012 12:21:22 -0700 (PDT)
Received: by 10.236.192.164 with SMTP id i24mr234880yhn.14.1351884082822; Fri,
02 Nov 2012 12:21:22 -0700 (PDT)
Path: gf5ni14056677qab.0!nntp.google.com!c7no3642467qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: list.postfix.users
Date: Fri, 2 Nov 2012 12:21:22 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.186.150.135;
posting-account=uH6i3woAAAAupanW7DRfF_hV4N_NOAJ9
NNTP-Posting-Host: 76.186.150.135
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <802a491e-f3bd-4109-b97a-4dae98d8b30d@googlegroups.com>
Subject: null or MISSING-HOST-NAME in From field
From: bzipiti...@gmail.com
Injection-Date: Fri, 02 Nov 2012 19:21:22 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I have set up a postfix mail server behind a NAT. Am using a static 192.16=
8 IP address, and have port 25 forwarded to that server. Also am using out=
going.verizon.net as a relay host, (And dovecot to provide IMAP service, b=
ut it's not running while I test this.) I am able to receive and send mail=
. The problem is, in sent mails, the sender has no host name. If I send a=
message from user1 to a Yahoo account, the mail is received, but the From =
field has "user1@.MISSING-HOST-NAME.". If I send a message to a local user=
(user2), the mail is received, but the From field has "user1@". I don't s=
ee what is wrong in the configuration.
I'm not even sure it's a problem with postfix, but what else could it be? =
I'm using Arch Linux, and they've recently switched to systemd. Could syst=
emd be messing it up somehow? I've been testing with mutt and alpine, coul=
d either of those be causing this problem?
I edited /etc/hosts, so "hostname -f" reports "mail.example.com".
---------------
Here's my /etc/postfix/main.cf:
queue_directory =3D /var/spool/postfix
command_directory =3D /usr/sbin
daemon_directory =3D /usr/lib/postfix
data_directory =3D /var/lib/postfix
mail_owner =3D postfix
myhostname =3D mail.example.com
myorigin =3D $mydomain
smtpd_tls_cert_file=3D/etc/ssl/certs/dovecot.pem
smtpd_tls_key_file=3D/etc/ssl/private/dovecot.key
smtpd_use_tls=3Dyes
smtpd_tls_session_cache_database =3D btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database =3D btree:${data_directory}/smtp_scache
relayhost =3D [outgoing.verizon.net]
smtp_connection_cache_destinations =3D outgoing.verizon.net
smtp_sasl_auth_enable =3D yes
smtp_sasl_password_maps =3D static:usern...@verizon.net:password
smtp_sasl_security_options =3D noanonymous
mydestination =3D $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code =3D 550
mynetworks =3D 192.168.0.0/16, 127.0.0.0/8
alias_maps =3D hash:/etc/postfix/aliases
alias_database =3D $alias_maps
home_mailbox =3D Maildir/
=20
debug_peer_level =3D 2
debugger_command =3D
PATH=3D/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path =3D /usr/sbin/sendmail
newaliases_path =3D /usr/bin/newaliases
mailq_path =3D /usr/bin/mailq
setgid_group =3D postdrop
html_directory =3D no
manpage_directory =3D /usr/share/man
readme_directory =3D /usr/share/doc/postfix
inet_protocols =3D ipv4
----------------------------
Here's what I think is relevant output from postconf:
append_at_myorigin =3D yes
append_dot_mydomain =3D yes
mydestination =3D $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain =3D example.com
myhostname =3D mail.example.com
mynetworks =3D 192.168.0.0/16, 127.0.0.0/8
mynetworks_style =3D subnet
myorigin =3D $mydomain
----------------------------
And here's what I see in the logs when I send a message from user1 to user2=
:
Nov 02 08:30:59 mail systemd[1]: Starting Postfix Mail Transport Daemon...
Nov 02 08:31:00 mail postfix/postfix-script[3442]: starting the Postfix mai=
l system
Nov 02 08:31:00 mail systemd[1]: Started Postfix Mail Transport Daemon.
Nov 02 08:31:00 mail postfix/master[3443]: daemon started -- version 2.9.4,=
configuration /etc/postfix
Nov 02 08:31:41 mail postfix/pickup[3444]: 80F0FA40: uid=3D1000 from=3D<use=
r1>
Nov 02 08:31:41 mail postfix/cleanup[3451]: 80F0FA40: message-id=3D<2012110=
2133141.GA3446@mail>
Nov 02 08:31:41 mail postfix/qmgr[3445]: 80F0FA40: from=3D<us...@example.co=
m>, size=3D424, nrcpt=3D1 (queue active)
Nov 02 08:31:41 mail postfix/local[3453]: 80F0FA40: to=3D<us...@example.com=
>, orig_to=3D<user2>, relay=3Dlocal, delay=3D0.14, delays=3D0.08/0.01/0/0.0=
4, dsn=3D2.0.0, status=3Dsent (delivered to maildir)
Nov 02 08:31:41 mail postfix/qmgr[3445]: 80F0FA40: removed
---------
I've tried several postfix configuration options, and had no luck:
masquerade_domains =3D $mydomain
disable_dns_lookups =3D yes
smtp_host_lookup =3D native
resolve_null_domain =3D yes
Anyone have any ideas what I'm missing?