Get rid of a struct and make dsn parameters first class members of
envelope structure.

Introduce new delivery_type for dsn.