LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix: User messages are okay; but error messages themselves seem to be bouncing (http://www.linuxquestions.org/questions/linux-server-73/postfix-user-messages-are-okay%3B-but-error-messages-themselves-seem-to-be-bouncing-533898/)

jgombos 03-02-2007 08:56 AM

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)

Any ideas why it would be trying to send to root@myhost.myhost and postfix@myhost.myhost?

trickykid 03-02-2007 09:23 AM

What does your postfix configuration look like?

jgombos 03-02-2007 09:47 AM

master.cf
Code:

smtp        inet        n        -        y        -        -        smtpd
pickup        fifo        n        -        y        60        1        pickup
cleanup        unix        n        -        y        -        0        cleanup
qmgr        fifo        n        -        y        300        1        nqmgr
rewrite        unix        -        -        y        -        -        trivial-rewrite
bounce        unix        -        -        y        -        0        bounce
defer        unix        -        -        y        -        0        bounce
flush        unix        n        -        y        1000?        0        flush
smtp        unix        -        -        y        -        -        smtp
showq        unix        n        -        y        -        -        showq
error        unix        -        -        y        -        -        error
local          unix        -        n        n        -        -        local
virtual        unix        -        n        y        -        -        virtual
lmtp        unix        -        -        y        -        -        lmtp
cyrus          unix        -        n        n        -        -        pipe
  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
uucp          unix        -        n        n        -        -        pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail.postfix ($recipient)
ifmail    unix  -      n      n      -      -      pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp    unix  -      n      n      -      -      pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

main.cf
Code:

smtp_helo_name    = jgombos.org
queue_directory  = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory  = /usr/libexec/postfix
mail_owner        = postfix
myhostname        = myhostname
inet_interfaces  = localhost
mydestination    = $myhostname, localhost.$mydomain
transport_maps    = hash:/etc/postfix/transport
alias_maps        = hash:/etc/postfix/aliases
mailbox_command  = /usr/bin/procmail
debug_peer_level  = 2
debugger_command  =
        PATH=/usr/bin:/usr/X11R6/bin
        xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path    = /usr/sbin/sendmail.postfix
newaliases_path  = /usr/bin/newaliases.postfix
mailq_path        = /usr/bin/mailq.postfix
setgid_group      = postdrop
manpage_directory = /usr/share/man
sample_directory  = /usr/share/doc/postfix-1.1.12/samples
readme_directory  = /usr/share/doc/postfix-1.1.12/README_FILES
alias_database    = hash:/etc/postfix/aliases
smtpd_sasl_auth_enable    = no
smtpd_sasl_local_domain    = $myhostname
smtp_sasl_auth_enable      = yes
smtp_sasl_security_options =
smtp_sasl_password_maps    = hash:/etc/postfix/sasl_passwd
message_size_limit        = 40960000


jgombos 03-03-2007 02:21 PM

I can't send any mail locally
 
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.

If I send an email to myusername@myhostname.mydomainname.tld, the postfix log shows:

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.


All times are GMT -5. The time now is 10:38 AM.