It is always best practice to build .cf file from .mc
m4 sendmail.mc > /etc/sendmail.cf
when you modify /etc/mail/aliases.
Possibly you see following message.
alias database /etc/mail/aliases.db out of date
Simply run following and will fix it.
newaliases
OR
run 'make' in /etc/mail to update all databases
OR
sendmail -bi
Following messages you see in log and mail.
It is because script you call to catch email OR execute when received has permission issue.
Simply set permission on that script to “Sendmail Default User” could be 'daemon' or 'mailnull'.
the names i have used those are i came across till now. so chances are there you see something diff.
Whole path need to be executable by that user.
to change outgoing IP on your sendmail server.
change following variable.
O ClientPortOptions=Family=inet, Address=192.168.1.22
NOTE : change 192.168.1.22 with your IP.
Check if you want to delete all mail.
mailq OR sendmail -bp
Now if you want to delete everything in queue just delete everything inside mqueue folder.
In CentOS it is located at /var/spool/mqueue/
rm -rf /var/spool/mqueue/*
If there is too many files to remove you better use option like xargs with find.
find /var/spool/mqueue -name * -print0 |xargs -0 -r -n100 rm