Hello,
match action "mbox"
match from any for domain <domains> action "deliver"
match auth from any for any action "relay"
------------------------------
as i can imagine, the "mbox" match is expanded to
match from local to local action "mbox"
if I understand it correctly, "from local" means that mail has come from
127.0.0.1(or what?),
Connections from mx.kasakoff.net are "from local".
> and "for local" is what?
Mails going to @mx.kasakoff.net.
I am asking, because actually, with this config, i can send mail to any
server, look:
mx$ mail -v -r nore...@kasakoff.net <mailto:nore...@kasakoff.net> -s
"test mail" kos...@tvema.ru <mailto:kos...@tvema.ru>
test
.
EOT
<<< 220 mx.kasakoff.net ESMTP OpenSMTPD
>>> EHLO localhost
<<< 250-mx.kasakoff.net Hello localhost
[local], pleased to meet you
<<< 250-8BITMIME
<<< 250-ENHANCEDSTATUSCODES
<<< 250-SIZE 104857600
<<< 250 HELP
>>> MAIL FROM:<nore...@kasakoff.net <mailto:nore...@kasakoff.net>>
<<< 250 2.0.0 Ok
>>> RCPT TO:<kos...@tvema.ru <mailto:kos...@tvema.ru>>
<<< 250 2.1.5 Destination address valid: Recipient ok
>>> DATA
<<< 354 Enter mail, end with "." on a line by itself
>>> .
<<< 250 2.0.0 6bc3d534 Message accepted for delivery
>>> QUIT
<<< 221 2.0.0 Bye
"tvema.ru" is not local, then, why does it work?
Because of this line in your config:
match auth from any for any action "relay"
Your connection is local, so it's automatically authenticated and
matches with "auth".
Mail from is "nore...@kasakoff.net" so it matches with "from any".
Rcpt to is "kos...@tvema.ru", which is not in the domains table, so it
matches with "for any".
Ergo the the mail will be relayed to mail.tvema.ru.