Postfix: User messages are okay; but error messages themselves seem to be bouncing
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Postfix: User messages are okay; but error messages themselves seem to be bouncing
Something is malconfigured. Although I can send and receive messages okay, the error log reflects many bounced messages, apparently because it's using a hostname in place of a domainname. Here's a clip taken from maillog:
Code:
Feb 25 10:59:38 myhost postfix/smtpd[4339]: disconnect from unknown[127.0.0.1]
Feb 25 11:01:00 myhost postfix/pickup[1282]: 716C56DCC89: uid=0 from=<root>
Feb 25 11:01:00 myhost postfix/cleanup[4099]: 716C56DCC89: message-id=<20070225160100.716C56DCC89@myhost>
Feb 25 11:01:00 myhost postfix/nqmgr[1283]: 716C56DCC89: from=<root@myhost.myhost>, size=455, nrcpt=1 (queue active)
Feb 25 11:01:00 myhost postfix/cleanup[4099]: 8FB356DCC82: message-id=<20070225160100.716C56DCC89@myhost>
Feb 25 11:01:00 myhost postfix/nqmgr[1283]: 8FB356DCC82: from=<root@myhost.myhost>, size=577, nrcpt=1 (queue active)
Feb 25 11:01:00 myhost postfix/local[4340]: 716C56DCC89: to=<root@localhost.myhost>, relay=local, delay=0, status=sent (forwarded as 8FB356DCC82)
Feb 25 11:01:00 myhost postfix/smtp[4495]: 8FB356DCC82: to=<postfix@myhost.myhost>, relay=none, delay=0, status=bounced (Name service error for myhost.myhost: Host not found)
Feb 25 11:01:00 myhost postfix/cleanup[4099]: E91C66DCC89: message-id=<20070225160100.E91C66DCC89@myhost>
Feb 25 11:01:01 myhost postfix/nqmgr[1283]: E91C66DCC89: from=<>, size=2085, nrcpt=1 (queue active)
Feb 25 11:01:01 myhost postfix/smtp[4495]: E91C66DCC89: to=<root@myhost.myhost>, relay=none, delay=1, status=bounced (Name service error for myhost.myhost: Host not found)
Feb 25 11:08:23 myhost postfix/pickup[1282]: AAD766DCC89: uid=0 from=<root>
Feb 25 11:08:23 myhost postfix/cleanup[4551]: AAD766DCC89: message-id=<20070225160823.AAD766DCC89@myhost>
Feb 25 11:08:23 myhost postfix/nqmgr[1283]: AAD766DCC89: from=<root@myhost.myhost>, size=463, nrcpt=1 (queue active)
Feb 25 11:08:24 myhost postfix/smtp[4553]: AAD766DCC89: to=<root@myhost.myhost>, relay=none, delay=1, status=bounced (Name service error for myhost.myhost: Host not found)
Feb 25 11:08:24 myhost postfix/cleanup[4551]: 48B5E6DCC82: message-id=<20070225160824.48B5E6DCC82@myhost>
Feb 25 11:08:24 myhost postfix/nqmgr[1283]: 48B5E6DCC82: from=<>, size=1965, nrcpt=1 (queue active)
Feb 25 11:08:24 myhost postfix/smtp[4553]: 48B5E6DCC82: to=<root@myhost.myhost>, relay=none, delay=0, status=bounced (Name service error for myhost.myhost: Host not found)
After more analysis, the problem is more general. I cannot send any email locally. I've been running this configuration on a home LAN for years and never had a need for local mail. The hostname and domainname are fabricated just for the sake of configuring the network, but aren't registered with a DNS.
status=bounced (name service error for myhostname.mydomainname.tld: host not found)
I think I may have solved the problem. Adding these lines to main.cf:
Code:
myhost = localhost
mydomain = localdomain
fixed local mail delivery. If that also fixes the other problems, I have to say I Postfix needs a better default configuration. Those parameters probably should have been set that way out of the box.
[UPDATE]
This may be a case of multiple layered problems. After making the above changes, I'm getting this in /var/log/maillog:
Code:
Mar 3 14:01:00 myhost postfix/pickup[9188]: C5C796DCC89: uid=0 from=<root>
Mar 3 14:01:00 myhost postfix/cleanup[9631]: C5C796DCC89: message-id=<20070303210100.C5C796DCC89@localhost>
Mar 3 14:01:00 myhost postfix/nqmgr[9189]: C5C796DCC89: from=<root@localhost.localdomain>, size=521, nrcpt=1 (queue active)
Mar 3 14:01:00 myhost postfix/local[9641]: C5C796DCC89: to=<postfix@localhost.localdomain>, relay=local, delay=0, status=bounced (can't create user output file. Command output: procmail: Couldn't create "/var/spool/mail/postfix" )
Mar 3 14:01:00 myhost postfix/cleanup[9631]: E54656DCC82: message-id=<20070303210100.E54656DCC82@localhost>
Mar 3 14:01:00 myhost postfix/nqmgr[9189]: E54656DCC82: from=<>, size=2211, nrcpt=1 (queue active)
Mar 3 14:01:01 myhost postfix/local[9641]: E54656DCC82: to=<postfix@localhost.localdomain>, relay=local, delay=0, status=bounced (can't create user output file. Command output: procmail: Couldn't create "/var/spool/mail/postfix" )
Mar 3 14:11:51 myhost postfix/smtpd[9657]: warning: 127.0.0.1: hostname LOCALHOST verification failed: Host not found
Mar 3 14:11:51 myhost postfix/smtpd[9657]: connect from unknown[127.0.0.1]
Mar 3 14:11:51 myhost postfix/smtpd[9657]: 429706DCC82: client=unknown[127.0.0.1]
AFAIK, procmail runs as root when processing root messages, so it should be able to create any file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.