Aastramail not working after upgrade to ubuntu 22.04

Looks like there was a setting missing int he main.cf file and caused all the mail to fail being delivered.

Check the mail.log for all the errors.

Then I checked the logs against an local AI and it reported the following :

ERRORS:

Here is a breakdown of what each line means:

  1. Nov 5 09:02:33 siprecorder postfix/smtpd[262528]: fatal: in parameter smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one working instance of: reject_unauth_destination, defer_unauth_destination, reject, defer, defer_if_permit or check_relay_domains
    • What it means: Postfix has checked your configuration file (likely /etc/postfix/main.cf) and found that either smtpd_relay_restrictions or smtpd_recipient_restrictions is defined, but none of the required restriction directives are present or valid. Postfix requires at least one of those listed options (like reject, check_relay_domains, etc.) to be present to know how to handle mail delivery securely. This is a fatal error for the service.
  2. Nov 5 09:02:34 siprecorder postfix/master[1633]: warning: process /usr/lib/postfix/sbin/smtpd pid 262528 exit status 1
    • What it means: Because the smtpd process failed due to the fatal configuration error, the parent master process logs a warning that the child smtpd process exited with a non-zero status code (1), indicating a failure.
  3. Nov 5 09:02:34 siprecorder postfix/master[1633]: warning: /usr/lib/postfix/sbin/smtpd: bad command startup -- throttling
    • What it means: The master process recognizes that smtpd failed to start and has entered a “throttling” mode. This means it will temporarily stop trying to restart smtpd immediately to prevent endless, resource-intensive restart loops while the configuration issue remains unresolved.

The Fix:

The solution is to correct the configuration in /etc/postfix/main.cf.

  1. Check the Configuration: Use a command like grep -E 'smtpd_relay_restrictions|smtpd_recipient_restrictions' /etc/postfix/main.cf to see what you currently have set for these parameters.

  2. Apply a Valid Configuration: Ensure that at least one of the allowed directives is present. For a basic, functional setup, you might want something like this (though your exact needs may vary):

    (Note: Always back up /etc/postfix/main.cf before editing! sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.bak)

Line to update or add:

smtpd_recipient_restrictions =  permit_mynetworks  check_relay_domains  reject_unauth_destination
  1. Test and Reload:
    • Test config: postfix check (This will validate the syntax without restarting).
    • Reload/Restart: sudo systemctl restart postfix or sudo postfix reload.

This should be something that we can apply before the upgrade.