[Mailmunge] {rcpt_addr} Macro

postfix at ptld.com postfix at ptld.com
Wed Aug 18 12:05:09 EDT 2021


>> Trying to access $ctx->sendmail_macro('rcpt_addr') inside
>> filter_recipient() and im getting undef.

> Instead, as per the documentation (which I encourage you to read
> carefully before posting on the list) you access them within
> filter_recipient as $ctx->rcpt_addr, $ctx->rcpt_mailer and
> $ctx->rcpt_host, respectively.

Yes im aware of this in the manual and im using the $ctx->rcpt_* 
versions. I just wanted to verify what postfix is sending to mailmunge 
which is why i was trying to access the macro directly. This is related 
to another issue im trying to understand in regards to aliases.


> rcpt_addr, rcpt_mailer and rcpt_host are unusual in that they change
> for each RCPT command.  As such, you can't access them as macros.

I know the macros change as multiple RCPT commands can be sent each with 
a different address. But why does that make them un-accessable? After 
all mailmunge is reading them to be able to get $ctx->rcpt_addr so i 
didn't assume they would be unavailable. You don't have to answer that, 
now that i know they are unavailable by design i will go another route. 
Thanks.


More information about the Mailmunge mailing list