355: def process_mail_from sender
356: if (@@parms[:starttls]==:required and !@state.include?(:starttls))
357: send_data "550 This server requires STARTTLS before MAIL FROM\r\n"
358: elsif (@@parms[:auth]==:required and !@state.include?(:auth))
359: send_data "550 This server requires authentication before MAIL FROM\r\n"
360: elsif @state.include?(:mail_from)
361: send_data "503 MAIL already given\r\n"
362: else
363: unless receive_sender sender
364: send_data "550 sender is unacceptable\r\n"
365: else
366: send_data "250 Ok\r\n"
367: @state << :mail_from
368: end
369: end
370: end