return 0;
}
- if (!mail_user_set_get_postmaster_address(user->set, &postmaster_addr,
- &error)) {
+ if (!mail_user_get_postmaster_address(user, &postmaster_addr, &error)) {
i_error("msgid=%s: Invalid postmaster_address - can't send rejection: %s",
orig_msgid == NULL ? "" : str_sanitize(orig_msgid, 80), error);
return -1;
with ENOENT. This way it avoids unnecessary disk IO to the home. */
int mail_user_home_mkdir(struct mail_user *user);
+/* Obtain the postmaster address to be used for this user as an RFC 5322 (IMF)
+ address. Returns false if the configured postmaster address is invalid in
+ which case error_r contains the error message. */
+static inline bool
+mail_user_get_postmaster_address(struct mail_user *user,
+ const struct message_address **address_r,
+ const char **error_r)
+{
+ return mail_user_set_get_postmaster_address(user->set, address_r,
+ error_r);
+}
+
+/* Obtain the postmaster address to be used for this user as an RFC 5321 (SMTP)
+ address. Returns false if the configured postmaster address is invalid in
+ which case error_r contains the error message. */
+static inline bool
+mail_user_get_postmaster_smtp(struct mail_user *user,
+ const struct smtp_address **address_r,
+ const char **error_r)
+{
+ return mail_user_set_get_postmaster_smtp(user->set, address_r,
+ error_r);
+}
+
#endif