Bobcares

Quick Fixes for Sendmail Process Failed with Error Code 67

by | Aug 14, 2024

When a process failed with error code 67 in Sendmail, it means the specified address is unknown or does not exist. In this article, we’ll see how we can fix this issue quickly. At Bobcares, with our Server Management Service, we can handle your issues.

Overview
  1. Process Failed with Error Code 67 in Sendmail: More About
  2. Causes & Fixes for the Error
  3. Things to Remember
  4. A Sample Scenario
  5. Conclusion

Process Failed with Error Code 67 in Sendmail: More About

Sendmail is a popular mail transfer agent (MTA) used to send emails from a server. The error code 67 in the sendmail process usually indicates that the supplied address is unknown or does not exist. This code is defined in the system’s exit codes, specifically in /usr/include/sysexits.h, and is related with the messages “addressee unknown” or “user specified did not exist”.

Causes & Fixes for the Error

1. Non-Existent Local User:

Cause: The email is being sent to a local user who doesn’t exist on the system.

Fix: Verify the email address and check if the user exists using the /etc/passwd file or the getent passwd command.

2. Misconfigured Mail Transfer Agent (MTA):

Cause: The MTA settings are incorrect, causing issues with local deliveries.

Fix: Review and correct the configuration files for sendmail (e.g., /etc/mail/sendmail.cf or /etc/mail/sendmail.mc).

3. Incorrect Syntax:

Cause: Using the wrong command syntax when invoking sendmail.

Fix: Ensure the command syntax is correct, such as sendmail -s testing user@localhost, and that the recipient is valid.

4. Mail Logs Not Providing Information:

Cause: Sendmail may not process the mail request correctly due to bad data or configuration issues, and logs may be empty.

Fix: Check mail logs (e.g., /var/log/mail.log). If logs are empty, increase logging verbosity or check other related logs.

5. Spam Filtering Issues:

Cause: Spam filters may block the mail, especially if the recipient’s inbox doesn’t exist.

Fix: Temporarily disable spam filtering for testing or ensure the recipient’s inbox is correctly set up.

Things to Remember

When fixing Error Code 67 in Sendmail, keep the following points in mind:

1. Backup Configurations: We must always back up the existing configuration files before making any changes. This allows us to revert if something goes wrong.

2. Verify User Existence: ALso, ensure the local user exists on the system by checking /etc/passwd or using the getent passwd command.

3. Check Email Addresses: Double-check the syntax and validity of the email addresses being used.

4. Review MTA Configuration: We should carefully review the Mail Transfer Agent (MTA) settings in files like /etc/mail/sendmail.cf and /etc/mail/sendmail.mc for any misconfigurations.

5. Test Syntax: Test the sendmail command with correct syntax before executing on live data. Use a valid local email address for testing.

6. Examine Logs: Always check mail logs (e.g., /var/log/mail.log) for any clues. Increase logging verbosity if necessary to get more detailed information.

7. Consider Spam Filters: Be aware of any spam filters that might be affecting email delivery, and temporarily disable them if necessary to isolate the issue.

8. Minimal Changes: Make one change at a time and test the result before moving on. This helps in identifying the exact cause of the issue.

9. Network and DNS Checks: If applicable, ensure that the network and DNS settings are correct, as they can also affect mail delivery.

A Sample Scenario

We receive Error Code 67 while trying to send an email to user@example.com using Sendmail. The error suggests that the recipient might not exist on the local system.

How to Fix it?

1. Backup Configuration Files: Create a backup of the Sendmail configuration files using the following command:

cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.bak
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.bak

2. Verify Local User Existence: Check if the user exists on the local system.

getent passwd | grep user

If the user is not found, confirm the correct email address or create the local user if necessary.

3. Review MTA Configuration: Open and review the Sendmail configuration files for errors related to local delivery.

vi /etc/mail/sendmail.cf

Look for any misconfigurations related to local mail delivery and correct them.

4. Test Command Syntax: Test sending a simple email with correct syntax.

echo "This is a test email." | sendmail -s "Test" user@localhost

Ensure the command is correctly formatted and the email address is valid.

5. Examine Mail Logs: Check the mail logs for any related errors.

tail -f /var/log/mail.log

Look for any specific errors or warnings that could indicate the cause of the issue.

6. Consider Spam Filters: Temporarily disable spam filtering to rule out interference.

service spamassassin stop

Test sending the email again to see if the issue persists.

7. Document Changes: Document each step we took, the commands we used, and the results.

This documentation will help if us need to troubleshoot further or report the issue.

8. Revert if Needed: If a change doesn’t resolve the issue, revert to the backed-up configuration.

cp /etc/mail/sendmail.cf.bak /etc/mail/sendmail.cf

9. After making these changes, send another test email to verify that the error is resolved. If successful, the issue should be fixed.

[Need to know more? Get in touch with us if you have any further inquiries.]

Conclusion

To fix Error Code 67 in Sendmail, follow these steps:

i. Check the local user to ensure they exist.

ii. Review and correct any settings in the MTA configuration.

iii. Test the command syntax to ensure it’s correct.

iv. Check the mail logs for errors or clues.

v. Consider spam filters as a possible cause.

We must always back up the configuration files before making changes and document each step. This steps from our Techs will help us solve the problem efficiently and make it easier to troubleshoot if needed.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.