User Tools

Site Tools


sendmail

This is an old revision of the document!


Sendmail

How to create .cf file from .mc

It is always best practice to build .cf file from .mc

m4 sendmail.mc > /etc/sendmail.cf

Rebuild aliases

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

Error Code 126

Following messages you see in log and mail.

  • DSN: unknown mailer error 126
  • stat=unknown mailer error 126
  • runscript.sh: Permission denied
  • 554 5.3.0 unknown mailer error 126

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.

How to change outbound IP

to change outgoing IP on your sendmail server.
change following variable.

| sendmail.cf
O ClientPortOptions=Family=inet, Address=192.168.1.22

NOTE : change 192.168.1.22 with your IP.

sendmail.1305246941.txt.gz · Last modified: 2020/08/10 02:29 (external edit)