---
name: "Qpsmtpd::DSN"
section: "3pm"
platform: "linux"
package: "qpsmtpd"
version: "0.94-8"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Qpsmtpd::DSN"
---

# Qpsmtpd::DSN(3pm)

Enhanced Mail System Status Codes - RFC 1893

## NAME

Qpsmtpd::DSN - Enhanced Mail System Status Codes - RFC 1893

## DESCRIPTION

The **Qpsmtpd::DSN** implements the *Enhanced Mail System Status Codes* from RFC 1893.

## USAGE

Any **qpsmtpd** plugin can access these status codes. All sub routines are used the same way:\
  use Qpsmtpd::DSN;\
  ...;\
  return Qpsmtpd::DSN-\>**relaying\_denied()**;

or

```
 return Qpsmtpd::DSN->relaying_denied("Relaying from $ip denied");
```

or

```
 return Qpsmtpd::DSN->relaying_denied(DENY,"Relaying from $ip denied");
```

If no status message was given, it will use the predefined one from the  RFC. If the first argument is numeric, it will use this as a return code,  else the default return code is used. See below which default return code is used in the different functions.

The first example will return  *(DENY, "Relaying denied");* the others  *(DENY, "Relaying from $ip denied");* which will be returned to qpsmtpd.

In those sub routines which don't start with *addr\_, sys\_, net\_, proto\_,*  *media\_, sec\_* I've added a default message which describes the status better than the RFC message.

## ADDRESS STATUS

- addr\_unspecified

  X.1.0 default: DENYSOFT

- no\_such\_user, addr\_bad\_dest\_mbox

  X.1.1 default: DENY

- addr\_bad\_dest\_system

  X.1.2 default: DENY

- addr\_bad\_dest\_syntax

  X.1.3 default: DENY

- addr\_dest\_ambigous

  X.1.4 default: DENYSOFT

- addr\_rcpt\_ok

  X.1.5 default: OK

- addr\_mbox\_moved

  X.1.6 default: DENY

- addr\_bad\_from\_syntax

  X.1.7 default: DENY

- addr\_bad\_from\_system

  X.1.8 default: DENY

## MAILBOX STATUS

- mbox\_unspecified

  X.2.0 default: DENYSOFT

- mbox\_disabled

  X.2.1 default: DENY ...but RFC says:\
      The mailbox exists, but is not accepting messages.  This may\
      be a permanent error if the mailbox will never be re-enabled\
      or a transient error if the mailbox is only temporarily\
      disabled.

- mbox\_full

  X.2.2 default: DENYSOFT

- mbox\_msg\_too\_long

  X.2.3 default: DENY

- mbox\_list\_expansion\_problem

  X.2.4 default: DENYSOFT

## MAIL SYSTEM STATUS

- sys\_unspecified

  X.3.0 default: DENYSOFT

- sys\_disk\_full

  X.3.1 default: DENYSOFT

- sys\_not\_accepting\_mail

  X.3.2 default: DENYSOFT

- sys\_not\_supported

  X.3.3 default: DENYSOFT\
             Selected features specified for the message are not\
             supported by the destination system.  This can occur in\
             gateways when features from one domain cannot be mapped onto\
             the supported feature in another.

- sys\_msg\_too\_big

  X.3.4 default DENY

## NETWORK AND ROUTING STATUS

- net\_unspecified

  X.4.0 default: DENYSOFT

- net\_directory\_server\_failed, temp\_resolver\_failed

  X.4.3 default: DENYSOFT

- net\_system\_congested

  X.4.5 default: DENYSOFT

- net\_routing\_loop, too\_many\_hops

  X.4.6 default: DENY, but RFC says:\
     A routing loop caused the message to be forwarded too many\
     times, either because of incorrect routing tables or a user\
     forwarding loop. This is useful only as a persistent\
     transient error.

  Why do we want to DENYSOFT something like this?

## MAIL DELIVERY PROTOCOL STATUS

- proto\_unspecified

  X.5.0 default: DENYSOFT

- proto\_invalid\_command

  X.5.1 default: DENY

- proto\_syntax\_error

  X.5.2 default: DENY

- proto\_rcpt\_list\_too\_long, too\_many\_rcpts

  X.5.3 default: DENYSOFT

- proto\_invalid\_cmd\_args

  X.5.4 default: DENY

- proto\_wrong\_version

  X.5.5 default: DENYSOFT

## MESSAGE CONTENT OR MESSAGE MEDIA STATUS

- media\_unspecified

  X.6.0 default: DENYSOFT

- media\_unsupported

  X.6.1 default: DENY

- media\_conv\_prohibited

  X.6.2 default: DENY

- media\_conv\_unsupported

  X.6.3 default: DENYSOFT

- media\_conv\_lossy

  X.6.4 default: DENYSOFT

## SECURITY OR POLICY STATUS

- sec\_unspecified

  X.7.0 default: DENYSOFT

- sec\_sender\_unauthorized, bad\_sender\_ip, relaying\_denied

  X.7.1 default: DENY

- sec\_list\_dest\_prohibited

  X.7.2 default: DENY

- sec\_conv\_failed

  X.7.3 default: DENY

- sec\_feature\_unsupported

  X.7.4 default: DENY

- sec\_crypto\_failure

  X.7.5 default: DENY

- sec\_crypto\_algorithm\_unsupported

  X.7.6 default: DENYSOFT

- sec\_msg\_integrity\_failure

  X.7.7 default: DENY
