sendmail relay only IF condition1 AND condition2 match

Hi,

I am trying to find a way to configure sendmail to accept relay only if a join (AND) of 2 condition holds. To be specific:

something like (in the access file)

From:allowdomain.com&&1.2.3.4 RELAY

does something like this exist? Which is the syntax?

Thanks