I'm having difficulties configuring smtpd as a backup mail server. smtpd is running on my main mail server and works a treat. (Good riddance, sendmail.)

I've read the man pages and understood them the best I can, and tried various configuration options, all to no avail. Mails to known valid users on the backup server continue to be rejected with 550 responses. The goal, of course, is for this backup server to accept these mails and relay them to the main mail server host.

This is on 5.3-current with smtpd 5.3.3.

Here is my smtp.conf (in its entirety):

   listen on all

   table aliases db:/etc/mail/aliases.db
   table domains file:/etc/mail/domains
   table secrets db:/etc/mail/secrets.db

   # Relay to main mail server via TLS
   accept for domain <domains> relay via \
        tls+auth://[email protected] auth <secrets>

   accept for local alias <aliases> deliver to mbox

Here is the debug output from smtpd for one of the rejected messages:

  # smtpd -d -v
  info: OpenSMTPD 5.3.3 starting
  debug: bounce warning after 4h
  debug: using "fs" queue backend
  debug: using "ramqueue" scheduler backend
  debug: using "ram" stat backend
  info: startup [debug mode]
  debug: init server-ssl tree
  debug: init client-ssl tree
  debug: parent_send_config_ruleset: reloading
  debug: parent_send_config_mfa: reloading
  debug: parent_send_config: configuring smtp
  debug: mfa ready
  debug: queue: done loading queue into scheduler
debug: smtp: listen on IPv6:fe80::224:1dff:fe86:2895%re0 port 25 flags 0x0 cert ""
  debug: smtp: listen on 99.132.212.18 port 25 flags 0x0 cert ""
  debug: smtp: listen on 127.0.0.1 port 25 flags 0x0 cert ""
  debug: smtp: listen on IPv6:fe80::1%lo0 port 25 flags 0x0 cert ""
  debug: smtp: listen on IPv6:::1 port 25 flags 0x0 cert ""
  debug: smtp: will accept at most 500 clients
  debug: smtpd: scanning offline queue...
  debug: smtpd: offline scanning done
  debug: smtp: new client on listener: 0x81a09170
smtp-in: New session 000000004aa75c26 from host mail-la0-f48.google.com [209.85.215.48] smtp-in: Failed command on session 000000004aa75c26: "RCPT TO:<[email protected]>" => 550 Invalid recipient
  smtp-in: Closing session 000000004aa75c26
  debug: smtp: 0x85d02000: deleting session: done

In this case, the recipient 'george' is a local user on the backup server host. I cannot understand why the mail has been rejected in this case.

I've also tried various options using 'relay backup' without success. The man page does not give an example for backup servers. So, I'm not sure how to proceed.

Many thanks in advance for any guidance you can offer.

Reply via email to