Re: Getting Delivered-To when using LDAP?
Jorgen Lundman: >>> I suppose there is probably nothing I can do about it? >> http://www.postfix.org/postconf.5.html#prepend_delivered_header >> >> currenly immplements (and detects loops) with delivery to "|command", >> /file/name, or !$HOME/.forward. >> >> Doing this also for virtual alias expansion would require new code >> that currently does not exist. >> >> Note that loop detection requires that the existing Delivered-To: >> headers are known. That could be a problem because virtual alias >> expansion happens before the headers are received. >> >> Wietse > I suspected as such, I just wanted some authority behind me before I > send the reply upstream. > > Thank you, for everything, Nick Tait brings up an interesting idea: if loop detection is not a requirement, there are non-convoluted ways to prepend Delivered-To in the existing Postfix instance. Would that be an optionZ Wietse
Re: Getting Delivered-To when using LDAP?
On 12/11/21 00:46, Wietse Venema wrote: Jorgen Lundman: I suppose there is probably nothing I can do about it? http://www.postfix.org/postconf.5.html#prepend_delivered_header currenly immplements (and detects loops) with delivery to "|command", /file/name, or !$HOME/.forward. Doing this also for virtual alias expansion would require new code that currently does not exist. Note that loop detection requires that the existing Delivered-To: headers are known. That could be a problem because virtual alias expansion happens before the headers are received. Wietse I suspected as such, I just wanted some authority behind me before I send the reply upstream. Thank you, for everything, It would be technically possible, but the question hasn't come up in the first 20+ years of life with Postfix. Wietse If you were willing to consider convoluted workarounds: Maybe you could funnel the 'forwarded' messages through another Postfix instance that has a policy service (http://www.postfix.org/SMTPD_POLICY_README.html) which looks for "recipient=/something/" in the request, and then returns "action=prepend Delivered-To: /something/"? Nick.
Re: Getting Delivered-To when using LDAP?
Jorgen Lundman: > >> I suppose there is probably nothing I can do about it? > > > > http://www.postfix.org/postconf.5.html#prepend_delivered_header > > > > currenly immplements (and detects loops) with delivery to "|command", > > /file/name, or !$HOME/.forward. > > > > Doing this also for virtual alias expansion would require new code > > that currently does not exist. > > > > Note that loop detection requires that the existing Delivered-To: > > headers are known. That could be a problem because virtual alias > > expansion happens before the headers are received. > > > > Wietse > > I suspected as such, I just wanted some authority behind me before I > send the reply upstream. > > Thank you, for everything, It would be technically possible, but the question hasn't come up in the first 20+ years of life with Postfix. Wietse
Re: Getting Delivered-To when using LDAP?
>> I suppose there is probably nothing I can do about it? > > http://www.postfix.org/postconf.5.html#prepend_delivered_header > > currenly immplements (and detects loops) with delivery to "|command", > /file/name, or !$HOME/.forward. > > Doing this also for virtual alias expansion would require new code > that currently does not exist. > > Note that loop detection requires that the existing Delivered-To: > headers are known. That could be a problem because virtual alias > expansion happens before the headers are received. > > Wietse I suspected as such, I just wanted some authority behind me before I send the reply upstream. Thank you, for everything, Lund
Re: Getting Delivered-To when using LDAP?
Joergen Lundman: > > Customers have asked if they can get the "Delivered-To" header in the case > that their > mail is sent onwards. But we do not use the regular .forward or "delivery" > style, but > rather query LDAP for "mailForwardingAddress" to send mail on. > > As in: > virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf > virtual_mailbox_domains = ldap:/etc/postfix/ldap-domains.cf > virtual_alias_maps = ldap:/etc/postfix/ldap-forwardonly.cf, > ldap:/etc/postfix/ldap-forwards.cf > > So I think we have the problem that we are not actually delivering anything > but rather "relay"ing it onwards, so the option " prepend_delivered_header" > does not apply here? > > I suppose there is probably nothing I can do about it? http://www.postfix.org/postconf.5.html#prepend_delivered_header currenly immplements (and detects loops) with delivery to "|command", /file/name, or !$HOME/.forward. Doing this also for virtual alias expansion would require new code that currently does not exist. Note that loop detection requires that the existing Delivered-To: headers are known. That could be a problem because virtual alias expansion happens before the headers are received. Wietse
Getting Delivered-To when using LDAP?
Customers have asked if they can get the "Delivered-To" header in the case that their mail is sent onwards. But we do not use the regular .forward or "delivery" style, but rather query LDAP for "mailForwardingAddress" to send mail on. As in: virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf virtual_mailbox_domains = ldap:/etc/postfix/ldap-domains.cf virtual_alias_maps = ldap:/etc/postfix/ldap-forwardonly.cf, ldap:/etc/postfix/ldap-forwards.cf So I think we have the problem that we are not actually delivering anything but rather "relay"ing it onwards, so the option " prepend_delivered_header" does not apply here? I suppose there is probably nothing I can do about it? Sincerely, Lund