Hello,
> Is some...@mydomain.tld a valid user as far as OpenSMTPd is concerned?
> That is, if you send a message directly to that address, does it get
> delivered?
Yes. I have Thunderbird with all these test accounts set up.
I doublechecked the second address,
it is OK and when I write to this email directly it
arrives to the right inbox.

If I connect with "telnet localhost 25" sitting in the
mail server console and write during the session:
"rcpt to:<some...@mydomain.tld"
it says:
"250 2.1.5 Destination address valid: Recipient ok"

I get the same result if I use an external address
instead of some...@mydomain.tld in a sieve rule.
I can email to any external address directly
but redirecting via sieve to that same address
fails with the same error in the log.

Btw, I already set up redirection by means of OpenSMTPD with SRS and
it works. But now I would like to have the similar functionality
available to a mail user as a user.

On Thu Feb 20 09:30:19 2025, Zé Loff wrote:
> 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 "some...@mydomain.tld" 
> > contains a single line:
> > 
> > """
> > redirect "some...@mydomain.tld";
> > """
> > 
> > After enabling this rule and sending mail to the mailbox
> > "some...@mydomain.tld" I see the following it the maillog:
> > 
> > """
> > 1) Feb 20 09:18:21 mail smtpd[6741]: 6979ad3753eb0f9d smtp failed-command
> > command="RCPT TO:<some...@mydomain.tld> "
> > result="550 Invalid recipient: <some...@mydomain.tld>"
> > 2) Feb 20 09:18:21 mail dovecot: lmtp: Error: sendmail: command failed:
> > 550 Invalid recipient: <some...@mydomain.tld>
> > 3) Feb 20 09:18:21 mail dovecot: lmtp(some...@mydomain.tld)<39847>
> > <oA1MJC3JtmenmwAAZU03Dg>: Error:
> > sieve: msgid=<7224e316-1b0f-4c00-b5df-4302523d2...@mydomain.tld>:
> > redirect action: failed to redirect message to <some...@mydomain.tld>:
> > 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:<some...@mydomain.tld> "
> > """
> > 
> > but I am not sure if I can do something with this.
> > I tried to write the rule like this:
> > 
> > """
> > redirect "<some...@mydomain.tld>";
> > """
> > 
> > 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 "x...@mydomain.tld";' rules that are
> correctly forwarded by OpenSMTPd (7.6-stable, also with Dovecot).
> 
> Is some...@mydomain.tld a valid user as far as OpenSMTPd is concerned?
> That is, if you send a message directly to that address, does it get
> delivered?
> 
> 
> -- 
>  

-- 
Best regards
Maksim Rodin

С уважением,
Родин Максим

Reply via email to