We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Forwarding mail addresses
-
- Posts: 1
- Joined: Mon Apr 06, 2015 2:08 pm
Re: Forwarding mail addresses
Aight people listen up. I think I found the cause of the issue why "Do not store forwarded email" isn't working properly.
If we check the fwd_only file in in $HOMEDIR/$user/conf/mail/$domain/fwd_only, we see it only holds 1 entry max. If we add another forward only account in the GUI, we see that LAST entry. Now after some debugging, I found out that if you add or edit something in the GUI, the following command is called:
v-add-mail-account-fwd-only USER DOMAIN ACCOUNT
Now if we open this file in /usr/local/vesta/bin/v-add-mail-account-fwd-only we see the following line somewhere near the end:
$account" > $HOMEDIR/$user/conf/mail/$domain/fwd_only
Aha! It overwrites the file instead of appending the new account. All we need to do is change > to >>. We can do this with the following command:
sed -i 's/echo "$account" > $HOMEDIR\/$user\/conf\/mail\/$domain\/fwd_only/echo "$account" >> $HOMEDIR\/$user\/conf\/mail\/$domain\/fwd_only/g' /usr/local/vesta/bin/v-add-mail-account-fwd-only
Eh voila, email forwarding only fixed (at least for me). Try it out and see if it works. And I hope the developers can change this in the real code :)
P.S.: This might be why it seemed to work for some people who only test with 1 account (cause yeah, it works for one account, just not multiple :) )
If we check the fwd_only file in in $HOMEDIR/$user/conf/mail/$domain/fwd_only, we see it only holds 1 entry max. If we add another forward only account in the GUI, we see that LAST entry. Now after some debugging, I found out that if you add or edit something in the GUI, the following command is called:
v-add-mail-account-fwd-only USER DOMAIN ACCOUNT
Now if we open this file in /usr/local/vesta/bin/v-add-mail-account-fwd-only we see the following line somewhere near the end:
$account" > $HOMEDIR/$user/conf/mail/$domain/fwd_only
Aha! It overwrites the file instead of appending the new account. All we need to do is change > to >>. We can do this with the following command:
sed -i 's/echo "$account" > $HOMEDIR\/$user\/conf\/mail\/$domain\/fwd_only/echo "$account" >> $HOMEDIR\/$user\/conf\/mail\/$domain\/fwd_only/g' /usr/local/vesta/bin/v-add-mail-account-fwd-only
Eh voila, email forwarding only fixed (at least for me). Try it out and see if it works. And I hope the developers can change this in the real code :)
P.S.: This might be why it seemed to work for some people who only test with 1 account (cause yeah, it works for one account, just not multiple :) )
Re: Forwarding mail addresses
It looks YoloDude87 is right.
Are you admins planning to introduce this fix in next release?
thanks
Are you admins planning to introduce this fix in next release?
thanks
-
- Posts: 5
- Joined: Thu Feb 20, 2014 1:42 am
Re: Forwarding mail addresses
Is there any update on this? It looks like this is still a problem.
Re: Forwarding mail addresses
I'm on version: 0.9.8, release 15.
File /usr/local/vesta/bin/v-add-mail-account-fwd-only now has this code:
$account" > $HOMEDIR/$user/conf/mail/$domain/fwd_only
File /usr/local/vesta/bin/v-add-mail-account-fwd-only now has this code:
$account" > $HOMEDIR/$user/conf/mail/$domain/fwd_only
Re: Forwarding mail addresses
still doesn't forward email.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Forwarding mail addresses
Create bug https://bugs.vestacp.com/arafatx wrote:still doesn't forward email.
Re: Forwarding mail addresses
Well, currently I'm able to forward mail within my mail in roundcube not the external email like Gmail. So, this is my temporary solution without having to open every email that I created. Example, in a business hosting we would have [email protected], [email protected], [email protected].. etc that would be time consuming to check every mail each day.tjebbeke wrote:Create bug https://bugs.vestacp.com/arafatx wrote:still doesn't forward email.