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 foobar.com certificate  "/etc/ssl/foobar.com.fullchain.pem"
pki 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 foobar.com
listen on egress port 587 tls-require pki 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/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest}\""

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}\""

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 foobar.com

accept from local for any \
        relay via smtp://127.0.0.1:10027

virtuals file:

ab...@foobar.com            cecilia@foobar.compostmas...@foobar.com
   cecilia@foobar.comwebmas...@foobar.com
cecilia@foobar.comceci...@foobar.com
cecilia@foobar.comceci...@foobar.com          vmail

smtpd -dv -f /etc/mail/smtpd.conf -T smtp output:

smtp: 0x16013f381000: connected to listener 0x1600dce5c000
[hostname=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 foobar.com ESMTP OpenSMTPD
smtp: 0x16013f381000: <<< EHLO mail.foobar.com
smtp: 0x16013f381000: STATE_CONNECTED -> STATE_HELO
smtp: 0x16013f381000: >>> 250-foobar.com Hello 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:<ceci...@foobar.com>
smtp: 0x16013f381000: >>> 250 2.0.0: Ok
smtp: 0x16013f381000: <<< RCPT TO:<ceci...@foobar.com>
smtp: 0x16013f381000: >>> 550 Invalid recipient
8aa88c570492e5d8 smtp event=failed-command address=127.0.0.1
host=localhost command="RCPT TO:<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:

foobar.com

mail.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 address:ceci...@foobar.com
[parent=0x0]
expand: 0x2c298604018: inserted node 0x2c298607000
expand: lka_expand: address: 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:<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.

--

Reply via email to