Filter lines

Keep lines containing a term from list 2 and remove lines containing an excluded term.

Input example

Input:
[email protected]
[email protected]
List 2:
gmail.com

Output example

[email protected]