On Apr 24, 2019 5:30 AM, Noth <[email protected]> wrote:
>
>
> On 24/04/2019 02:13, Edgar Pettijohn wrote:
> > On Apr 23, 2019 6:35 PM, Noth <[email protected]> wrote:
> >>
> >> On 23/04/2019 23:51, Edgar Pettijohn wrote:
> >>> On Apr 23, 2019 2:49 PM, Noth <[email protected]> wrote:
> >>>> Hi,
> >>>>
> >>>> I'm trying to migrate my setups for smtpd+dovecot, and I'm about
> >>>>half
> >>>> there. The scenario is this:
> >>>>
> >>>> - OpenBSD client machines have smtpd set up to send the daily/weekly
> >>>> mails to an address [email protected] handled by central server also
> >>>> running smtpd
> >>>>
> >>>> - Central server running OpenBSD with smtpd + dovecot for domain
> >>>> example.org. Local mail is also delivered to [email protected]
> >>>>
> >>>> I can mail [email protected] using the [email protected] mail account, and
> >>>> mail from 6.3 machines is still coming in, but I don't receive mail from
> >>>> the 6.4 machines. I'm a bit stumped as to what I've setup wrong here.
> >>>> Any suggestions are welcome. All this was based on the old faq example
> >>>> that was removed in 6.4. Dovecot config works fine.
> >>>>
> >>>> Maillog is full of these errors: result="524 5.2.4 Mailing list
> >>>> expansion problem"
> >>>>
> >>>>
> >>>>
> >>>> Client machines smtpd.conf :
> >>>>
> >>>> listen on lo0
> >>>>
> >>>> table aliases file:/etc/mail/aliases
> >>>>
> >>>> action "relay" relay host "smtp://mail.example.org" tls no-verify
> >>>> action "maildir" maildir alias <aliases>
> >>>>
> >>>> match from local for "example.org" action "relay"
> >>>> match from local for local action "maildir"
> >>>>
> >>>> Client machines aliases file has the root entry modified like thus:
> >>>>
> >>>> root: [email protected]
> >>>>
> >>>>
> >>>> Server smtpd.conf:
> >>>>
> >>>> queue compression
> >>>>
> >>>> # pki setup
> >>>> pki mail.example.org cert "/etc/ssl/mail.example.org.crt"
> >>>> pki mail.example.org key "/etc/ssl/private/mail.example.org.key"
> >>>>
> >>>> # tables setup
> >>>> table aliases file:/etc/mail/aliases
> >>>> table domains file:/etc/mail/domains
> >>>> table passwd passwd:/etc/mail/passwd
> >>>> table virtuals file:/etc/mail/virtuals
> >>>>
> >>>>
> >>>> # listen ports setup
> >>>> listen on lo0
> >>>> listen on egress port 25 tls pki mail.example.org auth-optional
> >>>> listen on egress port submission tls-require pki mail.example.org auth
> >>>> <passwd>
> >>>>
> >>>> # special case for gmail to avoid ipv6 here
> >>>> #limit mta for domain gmail.com inet4
> >>>>
This looks fishy.
> >>>> action "deliver" mda "/usr/libexec/mail.lmtp -d /var/dovecot/lmtp -f
> >>>> %{sender} %{rcpt}" virtual <virtuals>
> >>>> action "deliver_local" mda "/usr/libexec/mail.lmtp -d
> >>>> unix:/var/dovecot/lmtp" alias <aliases>
> >>>> action "relay" relay
> >>>>
> >>>> match from any for domain <domains> action "deliver"
> >>>> match from any for local action "deliver"
> >>>> match from local for local action "deliver_local"
> >>>>
> >>>>
> >>>> aliases file same as for clients
> >>>>
> >>>> domain file:
> >>>>
> >>>> example.org
> >>>>
> >>>> virtuals:
> >>>>
> >>>> [email protected] [email protected]
> >>>> [email protected] [email protected]
> >>>> [email protected] [email protected]
> >>>> [email protected] vmail
> >>>>
> >>>>
> >>> Are the clients clients sending their mail and the server is having
> >>> problems or vice versa?
> >> Actually the error is 550 invalid recipient because of
> >> [email protected] instead of [email protected]. Sorry about that
> >>
> > Follow the first example from smtpd.conf(5) and set up a "smart host relay"
> > then set up the server to listen on 587 and authenticate. That should be
> > the first step. I remember having a similar problem but I don't remember
> > the exact solution.
> >
> > Edgar
>
> OK, using the example in the manpage for smtpd.conf, the client machines
> are able to send to the correct address using this:
>
> listen on lo0
>
> table aliases file:/etc/mail/aliases
>
> action "relay" relay host "smtp://mail.example.org" tls no-verify
> action "local" maildir alias <aliases>
>
> match for local action "local"
> match for any action "relay"
>
>
> But the central server isn't able to process local mail ( I use
> /etc/daily as the test). Using the following config, all I get is :
>
> Apr 24 12:19:56 hostname smtpd[35350]: 0000000000000000 mda delivery
> evpid=0301bf137eed1f11 from=<> to=<[email protected]>
> rcpt=<[email protected]> user=vmail delay=0s result=PermFail
> stat=Error ("smtpd: mda command line could not be expanded: No such file
> or directory")
>
> It seems to either have a problem with my virtual file or with the
> aliases one. I've tried redoing both to no avail. As you can see below I
> tried using a different local to local delivery method but that had the
> exact same error, which really puzzled me as no mda keyword is being
> invoked, just lmtp!
>
>
> server conf (for tables, see above):
>
> pki mail.example.org cert "/etc/ssl/mail.example.org.crt"
> pki mail.example.org key "/etc/ssl/private/mail.example.org.key"
>
> table aliases file:/etc/mail/aliases
> table domains file:/etc/mail/domains
> table passwd passwd:/etc/mail/passwd
> table virtuals file:/etc/mail/virtuals
>
> listen on lo0
> listen on egress tls pki mail.example.org
> listen on egress port submission tls-require pki mail.example.org auth
> <passwd>
>
> action mda_with_aliases mda "/usr/libexec/mail.lmtp -d /var/dovecot/lmtp
> -f %{sender} %{rcpt}" alias <aliases>
> #action lmtp-local lmtp localhost:25 alias <aliases>
> action mda_without_aliases mda "/usr/libexec/mail.lmtp -d
> /var/dovecot/lmtp -f %{sender} %{rcpt}" virtual <virtuals>
>
> match for local action mda_with_aliases
> #match for local action lmtp-local
> match from any for domain <domains> action mda_without_aliases
>