msirota@ee.rochester.edu (Mark Sirota) (03/19/91)
Okay, so I've written this slick new sendmail.cf that I really like and that does everything I want and is really short and easy to read and low maintenance and all kinds of other wonderful things. It only has one problem - it doesn't work. I've gone through a number of tests and used a number of sendmail test suites that have been passed by this forum before, and everything looks peachy-keen. I expected it to just work when I installed it. The problem is that mail to any local address just gets lost. What appears to be happening, from the messages logged via syslog, is that they are dying with "User unknown". Then when they try to bounce, the return letter also gets lost with "User unknown", and so when it tries to get to Postmaster, it also gets lost with "User unknown". When I try to test a local address with sendmail -bt, it resolves just fine to the local mailer: > ADDRESS TEST MODE > Enter <ruleset> <address> > > 0 msirota > rewrite: ruleset 3 input: "msirota" > rewrite: ruleset 5 input: "msirota" > rewrite: ruleset 5 returns: "msirota" > rewrite: ruleset 3 returns: "msirota" > rewrite: ruleset 0 input: "msirota" > rewrite: ruleset 14 input: "msirota" > rewrite: ruleset 14 returns: "msirota" > rewrite: ruleset 0 returns: $# "local" $: "msirota" But mail to msirota, gets lost and the following shows up in syslog (simplified somewhat for readability): > Mar 18 17:03:21 sendmail: AA07244: from=msirota, size=88, class=0 > Mar 18 17:03:29 sendmail: AA07244: to=msirota, delay=00:00:20, stat=User unknown > Mar 18 17:03:29 sendmail: AA07247: from=MAILER-DAEMON, size=0, class=0 I suspect that something is happening with the local-mailer rewriting rulesets, which fully qualify the names, changing "msirota" to "msirota@ee.rochester.edu". Now, I don't see why that should cause a problem. I mean, it has already resolved to the local mailer, and $u should be "msirota" rather than "msirota@ee.rochester.edu", right? Or is $u then passed through the mailer-specific ruleset before final delivery or something? I thought that only happened to the header addresses, not the envelope addresses. What on earth could be going on here? Please help me out. I'm at a loss... -- Mark Sirota - Department of Electrical Engineering University of Rochester, Rochester NY Internet: msirota@ee.rochester.edu UUCP: {decvax,garp,harvard,hombre,rutgers}!rochester!ur-valhalla!msirota
rickert@mp.cs.niu.edu (Neil Rickert) (03/19/91)
In article <1991Mar18.230044.6450@ee.rochester.edu> Mark Sirota <msirota@valhalla.ee.rochester.edu> writes: >Okay, so I've written this slick new sendmail.cf that I really like and that >does everything I want and is really short and easy to read and low >maintenance and all kinds of other wonderful things. It only has one >problem - it doesn't work. > As they say, if it sounds to good to be true, it probably is. >I suspect that something is happening with the local-mailer rewriting >rulesets, which fully qualify the names, changing "msirota" to >"msirota@ee.rochester.edu". >Now, I don't see why that should cause a problem. I mean, it has already If you try searching for "msirota@ee.rochester.edu" in /etc/passwd you will discover why there is a problem. >resolved to the local mailer, and $u should be "msirota" rather than >"msirota@ee.rochester.edu", right? Or is $u then passed through the >mailer-specific ruleset before final delivery or something? I thought that Well, it resolved to the local mailer, with $:msirota. That is not the same as saying that $u is "msirota. The 'user' obtained when you resolved to a mailer is passed through ruleset 2, then the mailer specific ruleset, then ruleset 4. It is this final value which may eventually become $u. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science <rickert@cs.niu.edu> Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940
igb@fulcrum.bt.co.uk (Ian G Batten) (03/21/91)
In article <1991Mar18.230044.6450@ee.rochester.edu> Mark Sirota <msirota@valhalla.ee.rochester.edu> writes: > I suspect that something is happening with the local-mailer rewriting > rulesets, which fully qualify the names, changing "msirota" to > "msirota@ee.rochester.edu". > > Now, I don't see why that should cause a problem. I mean, it has already > resolved to the local mailer, and $u should be "msirota" rather than > "msirota@ee.rochester.edu", right? Or is $u then passed through the > mailer-specific ruleset before final delivery or something? I thought that > only happened to the header addresses, not the envelope addresses. What on > earth could be going on here? After the address has been resolved it is passed through S and 4 prior to invocation of the mailer. There is support in IDA for different rulesets for header and transport rewrites, but it is not present in other sendmails. One technique is to wrap angle brakets around the transport address as it is generated in ruleset 0: R$+ $#local$:<$1> local via alias table which can then be spotted in S to mean ``leave alone'' S20 R<$+> $@<$1> return transport addr R$+@$+ $@$1@$2 return non-local address R$+ $@$1@$J add local domain - 822 style and finally stripped off in ruleset 4 S4 R<$+> $:$1 remove brackets from $u addr Hope this helps. ian