vedetta-com / caesonia

OpenBSD Email Service
ISC License
781 stars 41 forks source link

missing line in smtpd.conf? #162

Closed TonyBostonTB closed 5 years ago

TonyBostonTB commented 6 years ago

I couldn't send messages as authenticated user unless I added the following line match auth from any for any action "relay"

Is this missing in the config file or did I miss someting else?

edit: okay, so this mail then doesn't use dkimroxy, right?

btw, the error I was getting was "invalid recipient" for ANY recipient I tried - seems dkimproxy somehow got borked. Ideas anyone?

horia commented 6 years ago

Relevant "auth" snippet https://github.com/vedetta-com/caesonia/blob/master/src/etc/mail/smtpd.conf#L168

# Outgoing messages (from auth users) to dkimproxy_out for signing
# (!) do not accept mail FROM local host and IP, nor FOR local domain
match   tag MSA \
    !from local \
    !mail-from <localhost> \
    !for local \
    auth \
    action "dkim"

Was your initial test (i.e. without match auth from any for any action "relay") sending from local host or IP?

TonyBostonTB commented 6 years ago

I was sending from remote via mail client smtp authentication user=tboston@example.com address=IPv6:2a02:8106:208:5201:1c58:dfd0:: host=2a02:8106:208:5201:1c58:dfd0:: result=ok

smtp failed-command address=IPv6:::1 host=localhost command="RCPT TO:<user@example.org>" result="550 Invalid recipient"

horia commented 6 years ago

To see what's going on, e.g matching rules: https://man.openbsd.org/smtpd#T

Enables real-time tracing at startup smtpd -dvT rules

There is no missing line, to my knowledge. After auth, the message goes through dkimproxy_out on IPv4 127.0.0.1 not IPv6 ::1 (dkimproxy needs a small patch to work with IPv6, not part of the OpenBSD package)

horia commented 5 years ago

[*] dkimproxy IPv6 patch https://svnweb.freebsd.org/ports/head/mail/dkimproxy/files/

TonyBostonTB commented 5 years ago

Do you know how to tell that ::1 should not be used?

horia commented 5 years ago

Please test again with this patch.

TonyBostonTB commented 5 years ago

thank you @horia Well, I could have seen this myself I guess - it's working again