Codes
Namespace: global/code
Predefined codes for SMTP responses.
fn
code
fn code(code: int, enhanced: String, text: String) -> Result<Code>
- Description
A SMTP code with the code and message as parameter and an enhanced code.
fn
c554_7_1
fn c554_7_1() -> Code
- Description
- Example
Return a relay access denied code.
#{
mail: [
// Will send "554 5.7.1 Relay access denied" to the client.
rule "anti relay" || { state::deny(code::c554_7_1()) }
]
}
fn
c550_7_20
fn c550_7_20() -> Code
- Description
- Example
Return a DKIM Failure code. (RFC 6376) DKIM signature not found.
#{
mail: [
// Will send "550 5.7.20 No passing DKIM signature found" to the client.
rule "deny with code" || { state::deny(code::c550_7_20()) }
]
}
fn
c550_7_21
fn c550_7_21() -> Code
- Description
- Example
Return a DKIM Failure code. (RFC 6376) No acceptable DKIM signature found.
#{
mail: [
// Will send "550 5.7.21 No acceptable DKIM signature found" to the client.
rule "deny with code" || { state::deny(code::c550_7_21()) }
]
}
fn
c550_7_22
fn c550_7_22() -> Code
- Description
- Example
Return a DKIM Failure code. (RFC 6376) No valid author matched DKIM signature found.
#{
mail: [
// Will send "550 5.7.22 No valid author-matched DKIM signature found" to the client.
rule "deny with code" || { state::deny(code::c550_7_22()) }
]
}
fn
c550_7_23
fn c550_7_23() -> Code
- Description
- Example
Return a SPF Failure code. (RFC 7208) Validation failed.
#{
mail: [
// Will send "550 5.7.23 SPF validation failed" to the client.
rule "deny with code" || { state::deny(code::c550_7_23()) }
]
}
fn
c550_7_24
fn c550_7_24() -> Code
- Description
- Example
Return a SPF Failure code. (RFC 7208) Validation error.
#{
mail: [
// Will send "550 5.7.24 SPF validation error" to the client.
rule "deny with code" || { state::deny(code::c550_7_24()) }
]
}
fn
c550_7_25
fn c550_7_25() -> Code
- Description
- Example
Return a reverse DNS Failure code.
#{
mail: [
// Will send "550 5.7.25 Reverse DNS validation failed" to the client.
rule "deny with code" || { state::deny(code::c550_7_25()) }
]
}
fn
c500_7_26
fn c500_7_26() -> Code
- Description
- Example
Return a multiple authentication failures code.
#{
mail: [
// Will send "500 5.7.26 Multiple authentication checks failed" to the client.
rule "deny with code" || { state::deny(code::c500_7_26()) }
]
}
fn
c550_7_27
fn c550_7_27() -> Code
- Description
- Example
Return a Null MX cod. (RFC 7505) The sender address has a null MX record.
#{
mail: [
// Will send "550 5.7.27 Sender address has null MX" to the client.
rule "deny with code" || { state::deny(code::c550_7_27()) }
]
}
fn
c556_1_10
fn c556_1_10() -> Code
- Description
- Example
Return a Null MX cod. (RFC 7505) The recipient address has a null MX record.
#{
mail: [
// Will send "556 5.1.10 Recipient address has null MX" to the client.
rule "deny with code" || { state::deny(code::c556_1_10()) }
]
}
fn
c451_7_1
fn c451_7_1() -> Code
- Description
- Example
Return a greylisting code (https://www.rfc-editor.org/rfc/rfc6647.html#section-2.1)
#{
mail: [
// Will send "451 4.7.1 Sender is not authorized. Please try again." to the client.
rule "deny with code" || { state::deny(code::c451_7_1()) }
]
}
fn
c451_3_0
fn c451_3_0() -> Code
- Description
- Example
Multiple destination domains per transaction is unsupported code.
#{
mail: [
// Will send "451 4.3.0 Multiple destination domains per transaction is unsupported. Please try again." to the client.
rule "deny with code" || { state::deny(code::c451_3_0()) }
]
}
fn
c550_1_1
fn c550_1_1() -> Code
- Description
- Example
Multiple destination domains per transaction is unsupported code.
#{
mail: [
// Will send "550 5.1.1 No passing DKIM signature found" to the client.
rule "deny with code" || { state::deny(code::c550_1_1()) }
]
}