On Mon, Nov 20, 2017 at 11:06:34PM +0000, Gonzalo wrote: > Thanks for your reply, I understand, so to send emails to myself I need to > have a system user?
No, but you have not explained what it is that you want to achieve. All Edgar and I were saying is that smtpd is doing what you asked it to, and it doesn't do what you want because you didn't express it correctly. > There is any workaroud? > No idea, I don't know what it is that you're trying to achieve > On Mon, 20 Nov 2017 at 19:31 Edgar Pettijohn <ed...@pettijohn-web.com> > wrote: > > > On Mon, Nov 20, 2017 at 02:13:17PM -0300, Gonzalo wrote: > > > Hello, > > > > > > I am having problems sending mails to self user. > > > > > > My setup so far is: > > > > > > OpenBSD 6.2-release > > > OpenSMTPD 6.0.0 > > > queue compression > > > > > > bounce-warn 1h, 6h, 2d > > > expire 3d > > > > > > ## PKI > > > > > > pki [1]foobar.com certificate "/etc/ssl/foobar.com.fullchain.pem" > > > pki [2]foobar.com key "/etc/ssl/private/foobar.com.key" > > > > > > ## Tables > > > table aliases file:/etc/mail/aliases > > > table domains file:/etc/mail/domains > > > table passwd passwd:/etc/mail/passwd > > > table virtuals file:/etc/mail/virtuals > > > table blacklist-recipients file:/etc/mail/blacklist-recipients > > > > > > ## Limits > > > max-message-size 50M > > > > > > ## Ports > > > listen on lo0 > > > listen on lo0 port 10028 tag DKIM_OUT > > > listen on egress port 25 tls pki [3]foobar.com > > > listen on egress port 587 tls-require pki [4]foobar.com auth <passwd> > > > > > > ## Block spammers > > > reject from any sender <blacklist-recipients> for domain <domains> > > > > > > # Accept mail sent from local server to a local account > > > accept from local \ > > > for local alias <aliases> \ > > > deliver to mda "/usr/local/bin/rspamc --mime --exec \" > > /usr/local/libex > > > ec/dovecot/dovecot-lda -f %{sender} -d %{dest}\"" > > > > The above rule is accepting mail from your machine to itself. Since > > cecilia isn't > > a local user it fails. Since cecilia isn't a local user I fail to see why > > he/she will > > be receiving mail. > > > > > > > > accept from any for domain <domains> virtual <virtuals> \ > > > deliver to mda "/usr/local/bin/rspamc --mime --exec > > \"/usr/local/libexec > > > /dovecot/dovecot-lda -f %{sender} -d %{dest}\"" > > > > The rule above is accepting the mail from the outside world and since the > > account > > is in the virtuals file it works. > > > > > > > > accept for local alias <aliases> \ > > > deliver to mda "/usr/local/bin/rspamc --mime --exec > > \"/usr/local/libexec > > > /dovecot/dovecot-lda -f %{sender} -d %{dest}\"" > > > > > > accept tagged DKIM_OUT for any relay \ > > > hostname [5]foobar.com > > > > > > accept from local for any \ > > > relay via smtp://[6]127.0.0.1:10027 > > > > > > virtuals file: > > > [7]ab...@foobar.com [8]ceci...@foobar.com > > > [9]postmas...@foobar.com [10]ceci...@foobar.com > > > [11]webmas...@foobar.com [12]ceci...@foobar.com > > > [13]ceci...@foobar.com [14]ceci...@foobar.com > > > [15]ceci...@foobar.com vmail > > > > > > smtpd -dv -f /etc/mail/smtpd.conf -T smtp output: > > > smtp: 0x16013f381000: connected to listener 0x1600dce5c000 > > [hostname=[16]foobar. > > > com, port=25, tag=] > > > smtp: 0x16013f381000: STATE_NEW -> STATE_CONNECTED > > > 8aa88c570492e5d8 smtp event=connected address=127.0.0.1 host=localhost > > > smtp: 0x16013f381000: >>> 220 [17]foobar.com ESMTP OpenSMTPD > > > smtp: 0x16013f381000: <<< EHLO [18]mail.foobar.com > > > smtp: 0x16013f381000: STATE_CONNECTED -> STATE_HELO > > > smtp: 0x16013f381000: >>> [19]250-foobar.com Hello [20]mail.foobar.com > > [127.0.0. > > > 1], pleased to meet you > > > smtp: 0x16013f381000: >>> 250-8BITMIME > > > smtp: 0x16013f381000: >>> 250-ENHANCEDSTATUSCODES > > > smtp: 0x16013f381000: >>> 250-SIZE 52428800 > > > smtp: 0x16013f381000: >>> 250-DSN > > > smtp: 0x16013f381000: >>> 250 HELP > > > smtp: 0x16013f381000: <<< MAIL FROM:<[21]ceci...@foobar.com> > > > smtp: 0x16013f381000: >>> 250 2.0.0: Ok > > > smtp: 0x16013f381000: <<< RCPT TO:<[22]ceci...@foobar.com> > > > smtp: 0x16013f381000: >>> 550 Invalid recipient > > > 8aa88c570492e5d8 smtp event=failed-command address=127.0.0.1 > > host=localhost comm > > > and="RCPT TO:<[23]ceci...@foobar.com>" result="550 Invalid recipient" > > > smtp: 0x16013f381000: <<< RSET > > > smtp: 0x16013f381000: >>> 250 2.0.0: Reset state > > > smtp: 0x16013f381000: <<< QUIT > > > smtp: 0x16013f381000: >>> 221 2.0.0: Bye > > > smtp: 0x16013f381000: STATE_HELO -> STATE_QUIT > > > 8aa88c570492e5d8 smtp event=closed address=127.0.0.1 host=localhost > > reason=quit > > > > > > aliases file is the regular one plus this line: > > > vmail:?? ?? ?? /dev/null > > > domain file: > > > [24]foobar.com > > > > > > mail.[25]foobar.com > > > > > > smtpd -dv -f /etc/mail/smtpd.conf -T rules -T trace -T expand output: > > > debug: smtp: new client on listener: 0x7857b0f7000 > > > 758fea245ad52499 smtp event=connected address=127.0.0.1 host=localhost > > > expand: 0x2c298604018: expand_insert() called for > > > [26]address:ceci...@foobar.com[parent=0x0] > > > expand: 0x2c298604018: inserted node 0x2c298607000 > > > expand: lka_expand: address: [27]ceci...@foobar.com [depth=0] > > > rule matched: accept from <localhost> for?? domain <localnames> alias > > > aliases deliver to mda "/usr/local/bin/rspamc --mime --exec "?? ?? ?? > > > ?? ?? > > > /usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest}"" > > > expand: 0x2c298604018: expand_insert() called for > > > username:cecilia[parent=0x2c298607000, mapping=aliases, > > > userbase=<getpwnam>] > > > expand: 0x2c298604018: inserted node 0x2c298607800 > > > expand: lka_expand: username: cecilia [depth=1] > > > expand: lka_expand: user-part does not match system user > > > expand: 0x2c298604018: clearing expand tree > > > 758fea245ad52499 smtp event=failed-command address=127.0.0.1 > > > host=localhost command="RCPT TO:<[28]ceci...@foobar.com>" result="550 > > > Invalid recipient" > > > 758fea245ad52499 smtp event=closed address=127.0.0.1 host=localhost > > > reason=quit > > > debug: smtp: 0x78575c19000: deleting session: done > > > Any ideas? > > > Thanks guys. > > > -- > > > > > > References > > > > > > 1. http://foobar.com/ > > > 2. http://foobar.com/ > > > 3. http://foobar.com/ > > > 4. http://foobar.com/ > > > 5. http://foobar.com/ > > > 6. http://127.0.0.1:10027/ > > > 7. mailto:ab...@foobar.com > > > 8. mailto:ceci...@foobar.com > > > 9. mailto:postmas...@foobar.com > > > 10. mailto:ceci...@foobar.com > > > 11. mailto:webmas...@foobar.com > > > 12. mailto:ceci...@foobar.com > > > 13. mailto:ceci...@foobar.com > > > 14. mailto:ceci...@foobar.com > > > 15. mailto:ceci...@foobar.com > > > 16. http://foobar.com/ > > > 17. http://foobar.com/ > > > 18. http://mail.foobar.com/ > > > 19. http://250-foobar.com/ > > > 20. http://mail.foobar.com/ > > > 21. mailto:ceci...@foobar.com > > > 22. mailto:ceci...@foobar.com > > > 23. mailto:ceci...@foobar.com > > > 24. http://foobar.com/ > > > 25. http://foobar.com/ > > > 26. mailto:address%3aceci...@foobar.com > > > 27. mailto:ceci...@foobar.com > > > 28. mailto:ceci...@foobar.com > > > -- > Enviado desde mi tostadora de mano... -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org