DISCLAIMER: I'm neither JtR user nor Perl programmer. This answer that follows is a product of years of training in Google-Fu alone, combining a few answers from newsgroups and some JtR documentation.
John the Ripper (JtR) rules do not support multiple input words.
The only exception is with the single crack mode where operators 1, 2, and + control if other commands are applied to the first, the second, or to both words respectively, when testing against a word pair, such as first and last name.
Alternatively, you could redirect the output of an external script (handling word combinations) either into a john --stdin or into a file (and use that as a wordlist with JtR). Doing so will obviously slow down the process as the number of possible combinations increase exponentially with the number of input arguments, thus is probably only worth trying on really short word lists.
Here are some Perl scripts that you could adopt to suit your needs (or use as is?):
Two word combinations:
#!/usr/bin/perl
while (<>) {
chop;
$w[$#w + 1] = $_;
}
foreach $a (@w) {
foreach $b (@w) {
print "$a$b\n";
print "$a $b\n";
}
}
Three word combinations:
#!/usr/bin/perl
while (<>) {
chop;
$w[$#w + 1] = $_;
}
foreach $a (@w) {
foreach $b (@w) {
$ab = "$a$b";
$a_b = "$a $b";
foreach $c (@w) {
print "$ab$c\n";
print "$a_b $c\n";
}
}
}
Four word combinations:
#!/usr/bin/perl
while (<>) {
chop;
$w[$#w + 1] = $_;
}
foreach $a (@w) {
foreach $b (@w) {
$ab = "$a$b";
$a_b = "$a $b";
foreach $c (@w) {
$abc = "$ab$c";
$a_b_c = "$a_b $c";
foreach $d (@w) {
print "$abc$d\n";
print "$a_b_c $d\n";
}
}
}
}