Hi,

I originally posted this as an issue on Github but then I realized that the 
mail list probably would be a better match. So I'm reposting here and have 
closed the Github issue.


I've setup OpenBSD 5.6 with OpenSMTPD 5.4.4 for use with system user (LDAP, 
using ypldap) on one primary domain. The setup is based on the guide available 
here: http://technoquarter.blogspot.se <http://technoquarter.blogspot.se/>


This is the two rules that (in my mind) should affect this.

  table domains db:/etc/mail/domains.db
  accept for domain <domains> deliver to lmtp "/var/dovecot/lmtp"

And my domains file:

     example.com <http://example.com/> accept

If I send to a user that does exist on the system I get correct behavior and 
the mail delivers, but when I send to a non-existing user the mail goes into 
limbo with '451 Temporary Failure'

Using smtpd -d -T lookup I can see the following behaviors, first an existing 
user:

   lookup: lookup "eric.ripa" as USERINFO in table getpwnam:<getpwnam> -> 
"eric.ripa:1101:1025:/home/eric.ripa"
   delivery: Ok for f23a96c23e2500b8: from=<[email protected] 
<mailto:[email protected]>>, to=<[email protected] 
<mailto:[email protected]>>, user=eric.ripa, method=lmtp, delay=1s, 
stat=Delivered

Then the non-existing user:

   lookup: lookup "foo" as USERINFO in table getpwnam:<getpwnam> -> -1
   smtp-in: Failed command on session a6ee64eda205f046: "RCPT 
TO:<[email protected] <mailto:[email protected]>>" => 451 Temporary failure
   relay: TempFail for c534b8c7f5ad4a41: session=a6ee64ec089bf84f, 
from=<[email protected] <mailto:[email protected]>>, to=<[email protected] 
<mailto:[email protected]>>, rcpt=<->, source=127.0.0.1, relay=127.0.0.1 
(localhost), delay=6m41s, stat=451 Temporary failure

Shouldn't this mail bounce with a 550 or something similar? Currently the mail 
stays in the queue until the envelope expires.

Any ideas? Is it possible to force a reject if user doesn't exist on the system?

Thanks,
Eric Ripa

Reply via email to