Is an automorphism of a finite group inner when it preserves conjugacy of elements and subgroups? If $G$ is a finite group, and $\phi \in \operatorname{Aut}(G)$ is an automorphism of $G$ that 


*

*sends each element $g \in G$ to a conjugate of itself, i.e. there exists an $h_g \in G$ depending on $g$ such that $\phi(g) = h_ggh_g^{-1}$.

*sends each subgroup $H \le G$  to a conjugate of itself, i.e. there exists an $h_H\in G$ depending on $H$ such that $\phi(H) = h_HHh_H^{-1}$.
Of course if $\phi$ is inner—that is, there is an element $h_\phi$ depending only on $\phi$ such that $\phi(g) = h_\phi gh_\phi^{-1}$ for all $g \in G$—then $\phi$ clearly satisfies 1. and 2. I was surprised to discover that there finite groups $G$ and non-inner automorphisms $\phi \in \operatorname{Aut}(G)$ for which at least one of 1. or 2. holds.
Are there finite groups $G$ and automorphisms $\phi\in\operatorname{Aut}(G)$ for which both 1. and 2. hold, but $\phi$ is not inner?

Edit: Here is an example of "1. but not 2." It comes from GroupProps, although the language there goes a little over my head, so any errors in recounting it are mine. Consider $\mathbb{Z}/8\mathbb{Z}$ and its automorphism group $(\mathbb{Z}/8\mathbb{Z})^\times$. I will write elements of $\mathbb{Z}/8\mathbb{Z}\rtimes(\mathbb{Z}/8\mathbb{Z})^\times$ as $(g,h)$, e.g. $(4,5)$. The proposed automorphism $\phi$ has $(g,1) \mapsto (g,1)$, $(g,7)\mapsto(g,7)$, but $(g,3)\mapsto(g+4,3)$ and $(g,5) \mapsto(g+4,5)$.
It's not hard to check that $\phi$ is an automorphism, so I'll leave it to you. It also satisfies 1.: $(2,1)$ conjugates $(g,3)$ to $(g+4,3)$, and $(1,1)$ conjugates $(g,5)$ to $(g+4,5)$. I claim that it does not send the subgroup $(0,(\mathbb{Z}/8\mathbb{Z})^\times)$ to a conjugate. If it did, $(h,k)$ conjugates $(0,g)$ to $(h-g\cdot h,g)$, so $h$ must be $0$ or $4$, both of which are fixed under multiplication by $3$ or $5$. 
 A: The script below is a GAP-script that should identify the existence of such automorphism $\varphi$ for a given group $G$. Note that I've done this in a hurry, so I can't guarantee the correctness.
SatisfiesCriteria := function(G)
    local A,phi,Conj,Subs,C,H;
    A := AutomorphismGroup(G);
    Conj := ConjugacyClasses(G);
    Subs := ConjugacyClassesSubgroups(G);
    for phi in A do
        # Is phi not inner?
        if IsInnerAutomorphism(phi) then
            continue;
        fi;

        # Is phi class-preserving?
        if ForAny(Conj, C -> not Image(phi,Representative(C)) in C) then
            continue;
        fi;

        # Is phi subgroup-class-preserving?
        if ForAny(Subs, H -> not Image(phi,Representative(H)) in H) then
            continue;
        fi;
        return phi;
    od;
    return fail;
end;

The script seems to find such automorphism for SmallGroup(32,44). In particular, this group is isomorphic to the finitely presented group 
<fp group of size 32 on the generators [ F1, F2, F3, F4, F5 ]>

with relators
[ F1^2, F2^-1*F1^-1*F2*F1*F4^-1, F3^-1*F1^-1*F3*F1*F5^-1, 
  F4^-1*F1^-1*F4*F1*F5^-1, F5^-1*F1^-1*F5*F1, F2^2*F5^-1, F3^-1*F2^-1*F3*F2, 
  F4^-1*F2^-1*F4*F2*F5^-1, F5^-1*F2^-1*F5*F2, F3^2, F4^-1*F3^-1*F4*F3, 
  F5^-1*F3^-1*F5*F3, F4^2*F5^-1, F5^-1*F4^-1*F5*F4, F5^2 ]

and the automorphism is given by
[ F1, F2, F3, F4, F5 ] -> [ F1, F2*F4, F3, F4*F5, F5 ]

Note: the example from GroupProps you mention is SmallGroup(32,43) in GAP. If we leave out the condition of being subgroup-class-preserving, then the above script indeed finds a non-inner automorphism that is class-preserving, though I haven't checked if it's the same one.
Note 2: In On groups with a class-preserving outer automorphism by Brooksbank and Mizuhara, the following is said:

In 1947, Wall showed that, for each integer $m$ divisible by 8, the general linear group $\operatorname{GL}(1,\mathbb{Z}/m)$, of order $m \cdot \varphi(m)$ has a nearly inner automorphism that is not inner
  inner [Wa]. These include a smallest example of such groups, namely $\operatorname{GL}(1,\mathbb{Z}/8)$
  of order $32$. (There are actually two non-isomorphic groups of order $32$ having this property.)

These two non-isomorphic groups would then be SmallGroup(32,43) and SmallGroup(32,44).
