0

With sendmail 8.14, when there is no user at a given domain, the error that sendmail seems to produce is as follow:

550 5.1.1 <info@example.su>... User unknown

However, if you use the error:nouser within virtusertable, the message is as follows:

553 5.3.0 <info@example.su>... >info<@example.su.

Using the mostly-recommended error:nouser No such user in virtusertable, as per https://www.sendmail.com/sm/open_source/tips/virtual_hosting/, results in the following:

553 5.3.0 <info@example.su>... No such user

Why do the status codes differ?

Do they make any difference?

Why is the recommended way to stop delivery to a user differs from the default behaviour in the complete absence of a user?

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
cnst
  • 12,948
  • 7
  • 51
  • 75

2 Answers2

3

The 550 and 553 error codes should all be treated the same by the sending server as will any of the 500 series codes. These all indicate a permanent error condition.

The 550 indicates the requested action (add recipient) was not completed. The 553 error indicates that the mailbox name is invalid. In either case the recipient was not accepted.

BillThor
  • 27,354
  • 3
  • 35
  • 69
2

Use error:nouser 550 ... or error:5.1.1:550 ... as virtusertable value as suggested in virtusertable section of cf/README.

info@example.com   error:nouser 550 No such user here
info@example.net   error:5.1.1:550 No such user here

RFC5321 describes (subtle) difference between the two error codes.

550  Requested action not taken: mailbox unavailable (e.g., mailbox
   not found, no access, or command rejected for policy reasons)
553  Requested action not taken: mailbox name not allowed (e.g.,
   mailbox syntax incorrect)

Most likely in (almost) all cases the difference between 550 and 553 will not harm you BUT fix it for a peace of mind when you spotted it :-)
Trailing text explanation is for humans so it should not make difference.


Explanation 1

553 5.3.0 <info@example.su>... >info<@example.su.

Sendmail seems to be unprepared to predictably handle error:WORD without message returned by virtusertable. [I have checked sendmail-8.15.1 and sendmail-8.14.4]

sendmaill-8.15.1/cf/m4/proto.m4

1128 R< error : $-.$-.$- : $+ > $*   $#error $@ $1.$2.$3 $: $4
1129 R< error : $- $+ > $*   $#error $@ $(dequote $1 $) $: $

Explanation 2

553 5.3.0 <info@example.su>... No such user

error:nouser No such user here as virtusertable value (missing smtp reply code) seems to produce 553 reply code

IMHO you may report it a bug in sendmail website Virtual Hosting page.

AnFi
  • 5,883
  • 1
  • 12
  • 26