Class SmtpData.

Inherits SmtpCommand. Inherited by SmtpBdat and SmtpBurl.

This is also the superclass for SmtpBdat and SmtpBurl, and does the injection.

SmtpData::SmtpData( SMTP * s, SmtpParser * p )

Constructs a SMTP DATA handler. s must be the SMTP server, as usual, and p may be either null or a parser to be used for parsing DATA. If it's null, this function assumes it's really working on a BDAT/BURL command.

bool SmtpData::addressPermitted( Address * a ) const

Returns true if the authenticated User is permitted to send mail from a (for almost any definition of send mail from).

void SmtpData::checkField( HeaderField::Type t )

Checks that the HeaderField with type t contains only addresses which the authenticated user is explicitly permitted to use. This has to return at once, so we need the complete list of addresses in RAM. We can obtain that list as soon as authentication succeeds, so that should be okay.

This function demands that EVERY address in (e.g.) From is authorised, not that at least one address is OK. Is that what we want? I think so.

void SmtpData::execute()

Does input for DATA and injection for DATA, BDAT and BURL.

Reimplements SmtpCommand::execute().

void SmtpData::makeCopy( bool soft ) const

Writes a copy of the incoming message to the file system. soft is true if the message provoked a temporary delivery failure.

Injectee * SmtpData::message( const EString & body )

Parses body and returns a pointer to the parsed message, including a prepended Received field.

This may also do some of the submission-time changes suggested by RFC 4409.

The prepended Received field uses the transmission information specified by RFC 3848. In general it includes little information if the message came from a logged-in user, much more if not.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.