HEX
Server: Apache/2
System: Linux nexus-01 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User: aglcoke (1118)
PHP: 8.2.31
Disabled: mail,exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/include/dovecot/smtp-dovecot.h
#ifndef SMTP_DOVECOT
#define SMTP_DOVECOT

#include "smtp-reply.h"

#define SMTP_PROXY_REDIRECT_CODE         550
#define SMTP_PROXY_REDIRECT_ENH_CODE     SMTP_REPLY_ENH_CODE(5, 2, 900)
#define SMTP_PROXY_REDIRECT_ENH_CODE_STR "5.2.900"

struct smtp_reply;
struct smtp_server_cmd_ctx;
struct smtp_server_recipient;

struct smtp_proxy_redirect {
	const char *username;
	const char *host;
	struct ip_addr host_ip;
	in_port_t port;
};

bool smtp_reply_code_is_proxy_redirect(unsigned int code, const char *enh_code);
bool smtp_reply_is_proxy_redirect(const struct smtp_reply *reply);

int smtp_proxy_redirect_parse(const char *resp, const char **destuser_r,
			      const char **host_r, struct ip_addr *ip_r,
			      in_port_t *port_r, const char **error_r);

void smtp_server_reply_redirect(struct smtp_server_cmd_ctx *cmd,
				in_port_t default_port,
				const struct smtp_proxy_redirect *predir);
void smtp_server_recipient_reply_redirect(
	struct smtp_server_recipient *rcpt, in_port_t default_port,
	const struct smtp_proxy_redirect *predir);

#endif