This is expected behavior. The *ENVELOPE* from is <>, while the From header will be set to the recipient address (Postfix will not show this in the logs). This can be overridden:

https://doc.dovecot.org/main/core/config/sieve/extensions/vacation.html#sieve_vacation_send_from_recipient

This protects against mail loops, so overriding this is not wise.


Regards,

Stephan.


Op 6-8-2025 om 10:03 schreef Ciprian M. Vizitiu [FDT] via dovecot:
    Hello everyone,

    Running a Dovecot 2.3.13 (Debian 11 native package) configured to deliver
    to Postfix lmtp and using dovecot-sieve.

    Setting-up a simple vacation responder works as expected but trying to
    catch a missing header e.g.

  if allof (not exists "X-GitLab-NotificationReason")
  {
          vacation :days 1 :addresses [1]"[email protected]" :subject "Message 
sent to an automated address " :from [2]"[email protected]" text:
  Hello,

  This is an automated reply to let you know that 
[3][email protected] is an automated address and is not read by a 
human operator.

  If you're trying to contact EXAMPLECOM please send your emails to 
[4][email protected]
  .
  ;
  }

    ... will result in an empty "from:" field instead of the required
    [5]"[email protected]" e.g.

    Aug 06 09:41:45 email-001.example.com postfix/smtpd[1974551]: disconnect
    from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
    Aug 06 09:41:45 email-001.example.com dovecot[1174421]:
    
lmtp([6][email protected])<1974562><uTh/ITkHk2giIR4AdMz+wA>:
    sieve: msgid=[7]<[email protected]>:
    vacation action: sent vacation response to
    [8]<[email protected]>
    Aug 06 09:41:45 email-001.example.com postfix/pickup[1956559]: B7BF8207C9:
    uid=18018 from=<>
    Aug 06 09:41:45 email-001.example.com postfix/cleanup[1974554]:
    B7BF8207C9:
    message-id=[9]<[email protected]>
    Aug 06 09:41:45 email-001.example.com postfix/qmgr[1171599]: B7BF8207C9:
    from=<>, size=979, nrcpt=2 (queue active)
    Aug 06 09:41:45 email-001.example.com postfix/smtp[1974565]: B7BF8207C9:
    to=[10]<[email protected]>,
    relay=smtpconnector.upper.relay[192.168.2.14]:25, delay=0.12,
    delays=0.06/0.01/0.03/0.02, dsn=5.7.1, status=bounced (host
    smtpconnector.upper.relay[192.168.2.14] said: 554 5.7.1 <>: Sender address
    rejected: Access denied (in reply to RCPT TO command))

    I tried forcing

      sieve_user_email = [11][email protected]

    ... but to no avail.

    I'm well aware that I could try and fix the problem at Postfix level but
    blindly catching ALL mails with an empty "from:" field feels bad: one
    miss-configured daemon and we spam everyone plus we already do some
    intricate rewriting.

    Any ideas?

References

    Visible links
    1. mailto:[email protected]
    2. mailto:[email protected]
    3. mailto:[email protected]
    4. mailto:[email protected]
    5. mailto:[email protected]
    6. mailto:[email protected]
    7. mailto:[email protected]
    8. mailto:[email protected]
    9. mailto:[email protected]
   10. mailto:[email protected]
   11. mailto:[email protected]

_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to