Quantcast
Channel: iRedMail — iRedMail Support
Viewing all articles
Browse latest Browse all 43395

Re: Forward of emails and SPF

$
0
0

As solution I decided to modify the dovecot-sieve to send from recipient address when doing REDIRECT command... in MUA it would be wrong, but if my user decides to forward his email, it should be sent with envelope MAIL FROM of this user not the original sender. Possible errors/bouces should be delivered to the original  recipient and not to confuse sender.

If anyone is interested in this, AND KNOWS WHAT IS DOING, here is the quick HOWTO:

1) download sources of dovecot-core

apt-get source dovecot-core

2) modify the sources:
Look for the file pigeonhole/src/lib-sieve/cmd-redirect.c and go to the line around 338

smtp_handle = sieve_smtp_open(senv, ctx->to_address, sender, &f);

and change it to:

smtp_handle = sieve_smtp_open(senv, ctx->to_address, recipient, &f);

3) rebuild the package:

debina/rules binary

4) update the files:
get the dovecot sieve library with the above modification:

pigeonhole/src/lib-sieve/.libs/libdovecot-sieve.so.0.0.0

and copy it to your iRedMail server as:

/usr/lib/dovecot/libdovecot-sieve.so.0.0.0

5) restart dovecot service

service dovecot restart

6) put package owning the file on hold:

echo "dovecot-sieve hold" | dpkg --set-selections

Note: the package will not update automatically! You need to redo this change everytime the package gets updated!

Now, when your user sets redirection in the roundcube sieve rules, all emails are resend as if they would be send from your user...


Viewing all articles
Browse latest Browse all 43395

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>