On Wed, Aug 21, 2013 at 08:08:14PM +0200, Denis Fondras wrote:
> Hello all,
> 
> I'm trying to migrate my Postfix setup to OpenSMTPd.
> I'm using opensmtpd-latest.tar.gz on OpenBSD 5.3.
> 
> Here is my setup :
> 
> -- /etc/mail/smtpd.conf :
> listen on all
> 
> table mydomains { domain.fr, domain.org }
> table myaddress "/etc/mail/vusers.txt"
> 
> accept from any for domain <mydomains> virtual <myaddress> deliver to
> lmtp "/usr/local/var/run/dovecot/lmtp"
> 
> accept from { 127.0.0.0/8 192.168.20.254/32 ::1/128
> 2001:7A8:B5AD:20::1000/128 } for any relay
> --
> 
> -- /etc/mail/vusers.txt
> [email protected]   [email protected]
> [email protected]         denis,[email protected]
> --
> 
> What I'm trying to do and what I get :
> 
> --
> $ telnet ::1 25
> Trying ::1...
> Connected to ::1.
> Escape character is '^]'.
> 220 kreator.ledeuns.net ESMTP OpenSMTPD
> ehlo coco
> 250-kreator.ledeuns.net Hello coco [IPv6:::1], pleased to meet you
> 250-8BITMIME
> 250-ENHANCEDSTATUSCODES
> 250-SIZE 36700160
> 250 HELP
> mail from:<[email protected]>
> 250 Ok
> rcpt to:<[email protected]>
> 550 Invalid recipient
> --
> 
> The server logs :
> --
> [..]
> debug: aliases_virtual_get: '[email protected]' resolved to 2 nodes
> smtp-in: Failed command on session 000000003d74c32d: "rcpt
> to:<[email protected]>" => 550 Invalid recipient
> [..]
> --
> 
> If I remove [email protected] from /etc/mail/vusers.txt the mail is
> accepted. If I replace [email protected] with a local user, it works.
> 
> What am I doing wrong ?

Your problem is that there is no rule that handles [email protected], so
the whole expansion fails.  You might want to add a catch-all relay
rule.

> PS. It seems OpenSMTPd handle the "accept" rules in the order they
> appear in the config file.

Yes, that's on purpose: the rule is "first match wins"

Eric.

-- 
You received this email because you are subscribed to the "[email protected]" 
list
To unsubscribe, send mail with subject: [[email protected]] unregister

Reply via email to