1

Topic: Editing Default Bounce Messages

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CentOS Linux release 7.2.1511 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? : Yes
- Related log if you're reporting an issue:
====

Hi,

I searched for a topic but could not find the one.

Can you guide how can I modify default bounce messages that postfix sends?

Messages like, user unknown in virtual mailbox and user quota full.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Editing Default Bounce Messages

FYI: http://www.postfix.org/postconf.5.html# … plate_file

ketan.aagja wrote:

Messages like, user unknown in virtual mailbox and user quota full.

Search '_reject_code' in above link.

3

Re: Editing Default Bounce Messages

Apologies Zhang,

Link only contains main.cf parameters and various configurations. I could not find where to edit default warning / failure message templates.

4

Re: Editing Default Bounce Messages

ketan.aagja wrote:

Can you guide how can I modify default bounce messages that postfix sends?

http://www.postfix.org/postconf.5.html# … plate_file

5

Re: Editing Default Bounce Messages

Hi Zhang,

I applied some bounce templates settings in postfix as stated in below link:

https://www.howtoforge.com/configure-cu … e-messages

However this setup only sends bounce emails to internal domain users. This does not send to external users. If I send any unknown user on my iRedMail server it rejects emails by saying:

The error that the other server returned was:
550 5.1.1 <heloothere@mydomain.co.uk>: Recipient address rejected: User unknown in virtual mailbox table

I want to change this message to following like google:

550-5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces.

6

Re: Editing Default Bounce Messages

Why do you want to change it? Isn't it very clear?

7

Re: Editing Default Bounce Messages

Hi Zhang,

Upon facing one of the IT audit, we have received one notification to change email server response for failure delivery to "The email account that you tried to reach does not exist." due to which we need this change.

8

Re: Editing Default Bounce Messages

It doesn't answer the question, why does IT audit require this change?

9

Re: Editing Default Bounce Messages

We have MHRA strict Audit where they are demanding your bounce messages are not clearly indicating that EMAIL ACCOUNT IS NOT EXIST. failure delivery says User unknown in virtualmailbox which does not satisfy MHRA regulatory regulations.

10

Re: Editing Default Bounce Messages

I did a quick search in Postfix source code, seems it's hard-coded, you cannot change it without modifying Postfix source code and recompile it:

- Postfix version: 3.1.3
- Source file: "src/smtpd/smtpd_check.c"
- Code lines (5209 - 5222):

    /*
     * Reject mail to unknown addresses in virtual mailbox domains.
     */
    case RESOLVE_CLASS_VIRTUAL:
    if (*var_virt_mailbox_maps
        && NOMATCH(virt_mailbox_maps, CONST_STR(reply->recipient)))
        return (smtpd_check_reject(state, MAIL_ERROR_BOUNCE,
                       var_virt_mailbox_code,
                   strcmp(reply_class, SMTPD_NAME_SENDER) == 0 ?
                       "5.1.0" : "5.1.1",
                       "<%s>: %s rejected: User unknown%s",
                       recipient, reply_class,
                       var_show_unk_rcpt_table ?
                       " in virtual mailbox table" : ""));

Better ask in Postfix mailing list to get support from Postfix developers.