[Rspamd-Users] Raw envelope recipient address in LUA script
Ralph Seichter
m16+rspamd at monksofcool.net
Fri Oct 12 19:38:30 UTC 2018
Hello,
I'm having trouble finding the raw envelope recipient in a LUA script.
Imagine an SMTP session that includes the following client command:
RCPT TO:<joe+abc at example.com>
Postfix calls rspamd as a milter. When I use the following code
rlist = task:get_recipients('smtp')
r1 = rlist[1]['addr']
r2 = task:get_principal_recipient()
both r1 and r2 are set to "joe at example.com", lacking the "+abc". Is
there a function which returns the full "joe+abc at example.com" (what
Sendmail would probably call Milter.macros.envrcpt)?
For testing purposes I have used milter-regex instead of rspamd, and it
receives "<joe+abc at example.com>" (including the angle brackets) from
Postfix, so I am certain the correct data is available.
-Ralph
More information about the Users
mailing list