On Thu, Feb 20, 2025 at 10:11:03AM +0300, Maksim Rodin wrote: > Hello, > I am trying to use sieve to forward or redirect messages > after they reach the dovecot service on my mail server. > My sieve rule for the mail user "[email protected]" > contains a single line: > > """ > redirect "[email protected]"; > """ > > After enabling this rule and sending mail to the mailbox > "[email protected]" I see the following it the maillog: > > """ > 1) Feb 20 09:18:21 mail smtpd[6741]: 6979ad3753eb0f9d smtp failed-command > command="RCPT TO:<[email protected]> " > result="550 Invalid recipient: <[email protected]>" > 2) Feb 20 09:18:21 mail dovecot: lmtp: Error: sendmail: command failed: > 550 Invalid recipient: <[email protected]> > 3) Feb 20 09:18:21 mail dovecot: lmtp([email protected])<39847> > <oA1MJC3JtmenmwAAZU03Dg>: Error: > sieve: msgid=<[email protected]>: > redirect action: failed to redirect message to <[email protected]>: > Sendmail program returned error (temporary failure) > """ > > I suppose OpenSMTPD does not like the "RCPT TO:" part of the mail > transaction. I only noticed that the error in the log shows an additional > space > after the address: > """ > smtp failed-command command="RCPT TO:<[email protected]> " > """ > > but I am not sure if I can do something with this. > I tried to write the rule like this: > > """ > redirect "<[email protected]>"; > """ > > But nothing changed. > Is this a problem with dovecot or OpenSMTPD? > > OpenBSD 6.7 stable > dovecot 2.3.21.1 (d492236fa0) > OpenSMTPD 7.6.0 > > -- > Best regards > Maksim Rodin >
FWIW, I have accounts with 'redirect "[email protected]";' rules that are correctly forwarded by OpenSMTPd (7.6-stable, also with Dovecot). Is [email protected] a valid user as far as OpenSMTPd is concerned? That is, if you send a message directly to that address, does it get delivered? --

