Q: milter API: The argv[0] parameter to the xffi_envrcpt() callback

Q: milter API: The argv[0] parameter to the xffi_envrcpt() callback

Post by Marc Balme » Tue, 30 Dec 2003 00:39:24


Sendmailers,

I am working on milters and a question came up about the xxfi_envrcpt
callback function.

The paramter argv[0] is guaranteed to contain the recipient address. All
my tests reveal that this address is in the form "<address>", i.e. with
angle brackets around the address. Can it be relied on that there are
always angle bracktets around the address? Is the format of the address
given as argv[0] somewhere documented? Are there exceptions?

Thanks for clarification,
Marc
 
 
 

Q: milter API: The argv[0] parameter to the xffi_envrcpt() callback

Post by David F. S » Tue, 30 Dec 2003 00:47:04


That's always the case in my tests, too. However, I always canonicalize
the address before further processing by stripping any angle brackets and
converting to lower-case. (You need to retain the original verison, though,
in case you ever want to call smfi_delrcpt)

 
 
 

Q: milter API: The argv[0] parameter to the xffi_envrcpt() callback

Post by Derek Ball » Tue, 30 Dec 2003 02:26:08

In article < XXXX@XXXXX.COM >, Marc Balmer



I think you'll always get <>'s *IF* the sending MTA is compliant and
actually includes <>'s.

I know when I had my spamcheck milter, one of the things I checked for
was such things as:


so as to return

<<< 551 5.7.1 Syntax error in MAIL command

because argv[0] didn't have <>'s on it.

D