/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "submission-common.h"
#include "ioloop.h"
#include "array.h"
#include "str.h"
#include "llist.h"
#include "istream.h"
#include "ostream.h"
#include "mail-storage.h"
#include "smtp-reply.h"
#include "smtp-client.h"
#include "smtp-client-connection.h"
#include "submission-commands.h"
/* The command handling of the submission proxy service aims to follow the
following rules:
- Attempt to keep pipelined commands pipelined when proxying them to the
actual relay service.
- Don't forward commands if they're known to fail at the relay server. Errors
can still occur if pipelined commands fail. Abort subsequent pending
commands if such failures affect those commands.
- Keep predictable errors consistent as much as possible; send our own reply
if the error condition is clear (e.g. missing MAIL, RCPT).
*/
{
return FALSE;
i_unreached();
return FALSE;
"4.4.0", "Lost connection to relay server");
return FALSE;
/* RFC 4954, Section 6: 530 5.7.0 Authentication required
This response SHOULD be returned by any command other than AUTH,
EHLO, HELO, NOOP, RSET, or QUIT when server policy requires
authentication in order to perform the requested action and
authentication is not currently in force. */
case 530:
i_error("Relay server requires authentication: %s",
"Internal error occurred. "
"Refer to server log for more information.");
return FALSE;
default:
break;
}
if (!smtp_reply_has_enhanced_code(reply)) {
}
return TRUE;
}