On Monday 28 March 2011 20:37:12 Jeroen Geilman wrote: > On 03/28/2011 07:47 PM, Anne Wilson wrote: > > Back in 2006 this list helped me set up Postfix on my server box in such > > a way that it separated local (LAN) mail from external mail, and it has > > worked well ever since. On my local boxes and laptops I set up > > transport in a very similar way, sending external mail to my ISP's smtp > > server, and sending LAN mail to my mail server box, where it was > > delivered to users' Inboxes. > > > > Now I want to extend that. Specifically I want to be able to run > > Logwatch on this laptop, for instance, and have the report go to the > > server box, and here I came unstuck. I have tried everything I can > > think of, but feel that I'm now thrashing about. My last effort was to > > set Transport to send everything to 192.168.0.40. When I ran Logwatch, > > this is what happened: > > > > The original message was received at Mon, 28 Mar 2011 14:17:49 +0100 > > from tosh [127.0.0.1] > > > > ----- The following addresses had permanent fatal errors ----- > > > > a...@lydgate.org > > > > (reason: 550 Host unknown) > > (expanded from:<root@localhost.localdomain>) > > > > ----- Transcript of session follows ----- > > > > 550 5.1.2 a...@lydgate.org... Host unknown (Name server: 192.168.0.40: > > host not found) > > This will be caused by not wrapping a literal IP address inside []: > > relayhost = [192.168.0.40] > I tried that, and also tried relayhost = smtp:[192.168.0.40]. Neither helped.
> > Can you please help me find and fix the problem? > > I doubt this is your real - or only - problem. > Fair enough. I know that my thrashing around will not have helped, but I needed a pointer as to where to start looking in a more organised fashion. :-) > Include postconf -n and relevant logs for more constructive help. postconf -n alias_database = hash:/etc/postfix/aliases alias_maps = hash:/etc/postfix/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = localhost inet_protocols = all mail_owner = postfix mail_spool_directory = /var/spool/mail mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man masquerade_domains = $mydomain mydestination = $myhostname, localhost.$mydomain, $mydomain, lydgate.lan mydomain = lydgate.net myhostname = tosh.lydgate.net mynetworks = 192.168.0.0/28, 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.7.3/README_FILES relayhost = smtp:[192.168.0.40] sample_directory = /usr/share/doc/postfix-2.7.3/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 /etc/aliases has the normal root alias to send things to me - one of my "thrashings" was to try putting a postfix/aliases file that would use my local address instead. Since it didn't work, I'll revert that. I have compared the config with that on the server box, but of course there will be some things that shouldn't be the same - and that's probably part of the problem. I think the relevant part of the logs is: Mar 28 13:47:40 tosh sendmail[12442]: alias database /etc/aliases rebuilt by anne Mar 28 13:47:40 tosh sendmail[12442]: /etc/aliases: 77 aliases, longest 16 bytes, 785 bytes total Mar 28 13:47:41 tosh postfix/postfix-script[12512]: starting the Postfix mail system Mar 28 13:47:41 tosh postfix/master[12513]: fatal: bind 127.0.0.1 port 25: Address already in use Mar 28 13:48:24 tosh postfix/postfix-script[12568]: fatal: the Postfix mail system is not running Mar 28 13:48:25 tosh sendmail[12571]: alias database /etc/aliases rebuilt by anne Mar 28 13:48:25 tosh sendmail[12571]: /etc/aliases: 77 aliases, longest 16 bytes, 785 bytes total Mar 28 13:48:25 tosh postfix/postfix-script[12642]: starting the Postfix mail system Mar 28 13:48:25 tosh postfix/master[12643]: fatal: bind 127.0.0.1 port 25: Address already in use Mar 28 14:17:49 tosh sendmail[13733]: p2SDHkbr013733: from=anne, size=6180, class=0, nrcpts=1, msgid=<201103281317.p2SDHkbr013733@localhost.localdomain>, relay=root@localhost Mar 28 14:17:49 tosh sendmail[13945]: p2SDHnwN013945: from=<anne@localhost.localdomain>, size=6460, class=0, nrcpts=1, msgid=<201103281317.p2SDHkbr013733@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=tosh [127.0.0.1] Mar 28 14:17:49 tosh sendmail[13733]: p2SDHkbr013733: to=root, ctladdr=anne (500/100), delay=00:00:03, xdelay=00:00:00, mailer=relay, pri=36180, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p2SDHnwN013945 Message accepted for delivery) Mar 28 14:17:50 tosh sendmail[13946]: p2SDHnwN013945: to=a...@lydgate.org, ctladdr=<anne@localhost.localdomain> (500/100), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=36677, relay=192.168.0.40, dsn=5.1.2, stat=Host unknown (Name server: 192.168.0.40: host not found) Mar 28 14:17:50 tosh sendmail[13946]: p2SDHnwN013945: p2SDHowN013946: DSN: Host unknown (Name server: 192.168.0.40: host not found) Mar 28 14:17:50 tosh sendmail[13946]: p2SDHowN013946: to=<anne@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=37701, dsn=2.0.0, stat=Sent Mar 29 03:46:07 tosh sendmail[6663]: p2T2k3hQ006663: from=root, size=6229, class=0, nrcpts=1, msgid=<201103290246.p2T2k3hQ006663@localhost.localdomain>, relay=root@localhost Mar 29 03:46:07 tosh sendmail[6949]: p2T2k7nR006949: from=<root@localhost.localdomain>, size=6509, class=0, nrcpts=1, msgid=<201103290246.p2T2k3hQ006663@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=tosh [127.0.0.1] Mar 29 03:46:08 tosh sendmail[6663]: p2T2k3hQ006663: to=root, ctladdr=root (0/0), delay=00:00:05, xdelay=00:00:01, mailer=relay, pri=36229, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p2T2k7nR006949 Message accepted for delivery) Mar 29 03:46:08 tosh sendmail[6950]: p2T2k7nR006949: to=a...@lydgate.org, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=36726, relay=192.168.0.40, dsn=5.1.2, stat=Host unknown (Name server: 192.168.0.40: host not found) Mar 29 03:46:08 tosh sendmail[6950]: p2T2k7nR006949: p2T2k8nR006950: DSN: Host unknown (Name server: 192.168.0.40: host not found) Mar 29 03:46:08 tosh sendmail[6950]: p2T2k8nR006950: to=a...@lydgate.org, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=37750, relay=192.168.0.40, dsn=5.1.2, stat=Host unknown (Name server: 192.168.0.40: host not found) Mar 29 03:46:08 tosh sendmail[6950]: p2T2k8nR006950: p2T2k8nS006950: return to sender: Host unknown (Name server: 192.168.0.40: host not found) Mar 29 03:46:08 tosh sendmail[6950]: p2T2k8nS006950: to=a...@lydgate.org, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=38774, relay=192.168.0.40, dsn=5.1.2, stat=Host unknown (Name server: 192.168.0.40: host not found) Mar 29 03:46:08 tosh sendmail[6950]: p2T2k8nR006950: Losing ./qfp2T2k8nR006950: savemail panic Mar 29 03:46:08 tosh sendmail[6950]: p2T2k8nR006950: SYSERR(root): savemail: cannot save rejected email anywhere Two things stand out, to me. First, whenever I did a postfix restart I was told that the stop failed, but the start succeeded. This seems wrong to me, but I don't know enough to know why or whether it runs only when called. Second - the problem appears to be connected with "localhost". In the past I always used to rewrite hosts, with a separate line tying a fixed IP to the box. On the laptop I was using dhcp, so couldn't do that. To test this theory I changed the laptop to static IP and rebooted. This time I got an entirely different report: Mar 29 09:44:00 tosh sendmail[1868]: alias database /etc/aliases rebuilt by root Mar 29 09:44:00 tosh sendmail[1868]: /etc/aliases: 77 aliases, longest 16 bytes, 785 bytes total Mar 29 09:44:00 tosh sendmail[1874]: starting daemon (8.14.4): SMTP+queueing@01:00:00 Mar 29 09:44:00 tosh sendmail[1874]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use Mar 29 09:44:00 tosh sendmail[1874]: daemon MTA: problem creating SMTP socket Mar 29 09:44:00 tosh sm-msp-queue[1882]: starting daemon (8.14.4): queueing@01:00:00 (several times, this group of lines) Mar 29 09:44:50 tosh sendmail[1874]: daemon MTA: problem creating SMTP socket Mar 29 09:44:50 tosh sendmail[1874]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting Mar 29 09:45:01 tosh sm-msp-queue[1882]: restarting /usr/sbin/sendmail due to signal Mar 29 09:46:10 tosh sendmail[3179]: p2T8k5Ac003179: from=anne, size=6282, class=0, nrcpts=1, msgid=<201103290846.p2T8k5Ac003179@localhost.localdomain>, relay=root@localhost Mar 29 09:46:10 tosh postfix/smtpd[3474]: connect from tosh[127.0.0.1] Mar 29 09:46:10 tosh postfix/smtpd[3474]: EF141DFCBD: client=tosh[127.0.0.1] Mar 29 09:46:10 tosh postfix/cleanup[3477]: EF141DFCBD: message- id=<201103290846.p2T8k5Ac003179@localhost.localdomain> Mar 29 09:46:11 tosh postfix/qmgr[1866]: EF141DFCBD: from=<anne@localhost.localdomain>, size=6931, nrcpt=1 (queue active) Mar 29 09:46:11 tosh sendmail[3179]: p2T8k5Ac003179: to=root, ctladdr=anne (500/100), delay=00:00:06, xdelay=00:00:01, mailer=relay, pri=36282, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as EF141DFCBD) Mar 29 09:46:11 tosh postfix/smtp[3478]: fatal: unknown service: [192.168.0.40]/tcp Mar 29 09:46:11 tosh postfix/smtpd[3474]: disconnect from tosh[127.0.0.1] Mar 29 09:46:12 tosh postfix/qmgr[1866]: warning: private/smtp socket: malformed response Mar 29 09:46:12 tosh postfix/qmgr[1866]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description Mar 29 09:46:12 tosh postfix/master[1850]: warning: process /usr/libexec/postfix/smtp pid 3478 exit status 1 Mar 29 09:46:12 tosh postfix/master[1850]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling Mar 29 09:46:12 tosh postfix/error[3479]: EF141DFCBD: to=<root@localhost.localdomain>, relay=none, delay=1.4, delays=0.13/1.1/0/0.15, dsn=4.3.0, status=deferred (unknown mail transport error) Mar 29 09:54:00 tosh postfix/qmgr[1866]: EF141DFCBD: from=<anne@localhost.localdomain>, size=6931, nrcpt=1 (queue active) Mar 29 09:54:00 tosh postfix/smtp[3873]: fatal: unknown service: [192.168.0.40]/tcp Mar 29 09:54:01 tosh postfix/qmgr[1866]: warning: private/smtp socket: malformed response Mar 29 09:54:01 tosh postfix/qmgr[1866]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description Mar 29 09:54:01 tosh postfix/master[1850]: warning: process /usr/libexec/postfix/smtp pid 3873 exit status 1 Mar 29 09:54:01 tosh postfix/master[1850]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling Mar 29 09:54:01 tosh postfix/error[3874]: EF141DFCBD: to=<root@localhost.localdomain>, relay=none, delay=470, delays=469/1/0/0.06, dsn=4.3.0, status=deferred (unknown mail transport error) Anne -- New to KDE Software? - get help from http://userbase.kde.org
signature.asc
Description: This is a digitally signed message part.