On 2025-09-05 at 15:22:59 UTC-0400 (Fri, 05 Sep 2025 15:22:59 -0400) postfix--- via Postfix-users <[email protected]> is rumored to have said:
> Postfix is setup using virtual domains and addresses, using SQL queries to > get user addresses and aliases. > I am using a milter that runs during the RCPT and DATA stages. > An email is received to an [email protected] address that maps to a real > [email protected] address. > > During the RCPT stage the milter is given [email protected] for the rcpt_addr. > But during the DATA stage the milter is given [email protected] instead of > [email protected]. > > My milter logic is processing for [email protected] during RCPT but then > during DATA the email address has changed to [email protected] messing up the > logic. > I have enable_original_recipient=yes, but I obviously misunderstood that > setting as that isn't sending the original RCPT address to the milter. > > Is there anyway for the (alias) envelope RCPT address to be sent to the > milter during DATA? Or any creative work arounds so the milter logic is > working with the alias during DATA? In the DATA phase you have access to the message headers, and so your Milter can extract the original alias from the X-Original-To header. If you are using a Milter that doesn't let you do that, you might want to consider using MIMEDefang or MailMunge, both of which allow arbitrary logic (anything you can express in Perl) at each phase. -- Bill Cole _______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
