Thanks for your reply, I understand, so to send emails to myself I need to
have a system user? There is any workaroud?



On Mon, 20 Nov 2017 at 19:31 Edgar Pettijohn <[email protected]>
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][email protected]            [8][email protected]
> > [9][email protected]       [10][email protected]
> > [11][email protected]        [12][email protected]
> > [13][email protected]          [14][email protected]
> > [15][email protected]          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][email protected]>
> > smtp: 0x16013f381000: >>> 250 2.0.0: Ok
> > smtp: 0x16013f381000: <<< RCPT TO:<[22][email protected]>
> > smtp: 0x16013f381000: >>> 550 Invalid recipient
> > 8aa88c570492e5d8 smtp event=failed-command address=127.0.0.1
> host=localhost comm
> > and="RCPT TO:<[23][email protected]>" 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:[email protected][parent=0x0]
> >    expand: 0x2c298604018: inserted node 0x2c298607000
> >    expand: lka_expand: address: [27][email protected] [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][email protected]>" 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:[email protected]
> >    8. mailto:[email protected]
> >    9. mailto:[email protected]
> >   10. mailto:[email protected]
> >   11. mailto:[email protected]
> >   12. mailto:[email protected]
> >   13. mailto:[email protected]
> >   14. mailto:[email protected]
> >   15. mailto:[email protected]
> >   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:[email protected]
> >   22. mailto:[email protected]
> >   23. mailto:[email protected]
> >   24. http://foobar.com/
> >   25. http://foobar.com/
> >   26. mailto:address%[email protected]
> >   27. mailto:[email protected]
> >   28. mailto:[email protected]
>
-- 
Enviado desde mi tostadora de mano...

Reply via email to