I am using the following command to find log entries that are the result of a log in to the email server:
egrep '_login[^ ]' /var/log/exim_mainlog
That works fine to find entries that contain content like this:
P=esmtpa A=courier_login:email@example.com S=1573 id=f1cd08396,...
But what I need to do is to change my grep statement, so that it finds single word logins that do not use the @ sign, like so:
P=esmtpa A=courier_login:name S=1573 id=f1cd08396,...
Where the log in before was "firstname.lastname@example.org", but in the second log entry, the log in used was only "name".
Is this possible using grep or egrep, perhaps in some kind of a compound statement?