1

Topic: Forwardings table in MySQL

In

forwardings

MySQL table we have

| id |address | forwarding | domain | dest_domain | is_maillist | is_list | is_forwarding | is_alias | active | 


Every new mail has following record

|0|postmaster@mydomain.com|postmaster@mydomain.com|mydomain.com|mydomain.com|0|0|1|0|1|

Let say I change

forwarding

to other email, like

 postmaster@mydomain2.com

In this case all new mail which coming to  postmaster@mydomain.com will forwards to  postmaster@mydomain2.com, but in the same time user could have access to old mail in postmaster@mydomain.com? Am I right ?

----

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

2

Re: Forwardings table in MySQL

koval.roma wrote:

In this case all new mail which coming to  postmaster@mydomain.com will forwards to  postmaster@mydomain2.com, but in the same time user could have access to old mail in postmaster@mydomain.com? Am I right ?

WRONG.

Please read our tutorial carefully: https://docs.iredmail.org/sql.user.mail.forwarding.html
Search "save a copy".

3

Re: Forwardings table in MySQL

Hello ZhangHuangbin,

Thank you for your reply. Maybe I was not clear.

I've read this statement

To save a copy of forwarded email in mailbox, please add your own email address as a forwarding destination like below


Default table has this record:

|0|postmaster@mydomain.com|postmaster@mydomain.com|mydomain.com|mydomain.com|0|0|1|0|1|

I change it to

|0|postmaster@mydomain.com|postmaster@mydomain2.com|mydomain.com|mydomain2.com|0|0|1|0|1|
 

After this, mail sending to postmaster@mydomain.com will be forward to postmaster@mydomain2.com.

Mail which is inside postmaster@mydomain.com before manipulation with MySQL still store there.
New mail which is coming to postmaster@mydomain.com will not store in  postmaster@mydomain.com, but will store in  postmaster@mydomain2.com

Why I am wrong?

4

Re: Forwardings table in MySQL

If you want to SAVE A COPY in postmaster@mydomain.com, just keep (or re-create) the "default" record:

|0|postmaster@mydomain.com|postmaster@mydomain.com|mydomain.com|mydomain.com|0|0|1|0|1|

The document has a sample SQL command, i suppose it's clear enough.
https://docs.iredmail.org/sql.user.mail.forwarding.html