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:firstname.lastname@example.org 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 "email@example.com", 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?