Hi,

All user on registered on the LDAP directory received emails, local users get "Invalid recipient":

Aug 22 14:14:16 mx-01 smtpd[15911]: 1413a338b810bc82 smtp failed-command command="RCPT TO:<m...@passerelles34.fr>" result="550 Invalid recipient: <m...@passerelles34.fr>" Aug 22 14:14:17 mx-01 smtpd[15911]: 1413a338b810bc82 smtp disconnected reason=disconnect

I confirm the user exist on the OpenSMTPD server.

~$ getent passwd mob
mob:x:1079:1011:Mob,,,:/home/mob:/bin/bash

Here the configuration files :

action "inbound" maildir junk userbase <ldap> alias <aliases>

match from any for domain "passerelles34.fr" action "inbound"

The man pages says:
userbase <table>
        Use the mapping table for user lookups instead of the
        getpwnam(3) function.

So there is no lookup for your local users anymore. It only looks up ldap:/etc/mail/ldap.conf.

I don't think it is possible to use two lookup tables. I believe you need another match line before this line
match from any for domain "passerelles34.fr" action "inbound"
that only matches for the local users. (Or the other way around.) Maybe the rcpt-to option can help.

(Maybe, if you can query ldap for all valid mail addresses, you could generate a rcpt-to recipient table (just a list of all valid addresses) via a cron job.

And then
match from any for rcpt-to <ldap-mail-addresses> action "inbound"
match from any for domain "passerelles34.fr" action "inbound-localusers"

Don't know. Just a late night idea.)


Reply via email to