# Implement SPF:SRS

**URL:** <https://discourse.mailinabox.email/t/implement-spf-srs/1533>\
**Category:** Improvements\
**Created:** [September 30, 2016, 12:58pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533 "2016-09-30T12:58:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![durd](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@durd](https://discourse.mailinabox.email/u/durd)\
**Post date:** [September 30, 2016, 12:58pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/1 "2016-09-30T12:58:25Z")

</div>

Hi all,

I forward my private-domain mail to my gmail using MiaB, which works great and setting up MiaB was supersimple, almost too simple 🙂  
Now I’m not sure if this is the right place for feature requests, but here goes!

One thing I noticed is that Gmails SPF-check fails for pretty much any sender, because, well, the mail IS coming from my MiaB and not directly from the senders smtp-servers 🙂

Now I don’t know how Gmail implements anything, so SRS might not even help.  
Either way, I would think that having the ability to forward emails should entail the implementation of the SRS-part of SPF, Sender Rewriting Scheme - [http://www.openspf.org/SRS](http://www.openspf.org/SRS).  
According to above link there is a lib for Postfix - [http://www.libsrs2.org/](http://www.libsrs2.org/).

I’m sure this won’t be implemented tomorrow, but as SPF and DMARC-implementations are getting more and more restrictive, I feel that this should at least be on a roadmap for MiaB.

Anyway, thanks for a great “product”, really just works out of the box 🙂

Maybe someone has implemented SRS underneath MiaB already or have another idea?

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [September 30, 2016, 3:34pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/2 "2016-09-30T15:34:20Z")

</div>

Hey,

Thanks.

It’s been a while since I’ve thought about SRS. But I think that would be the responsibility of the mail forwarder, which in your cases is the Dovecot sieve process, which handles mail filter rules (e.g. when set in Roundcube).

We can probably fix this by setting

```
sieve_redirect_envelope_from = recipient

```

[http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration](http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration)

If I understand the docs, that’ll put a valid envelope address into the forwarded message.

---

<div class="post-metadata">

**Author:** ![durd](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@durd](https://discourse.mailinabox.email/u/durd)\
**Post date:** [September 30, 2016, 8:49pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/3 "2016-09-30T20:49:01Z")

</div>

Thanks for replying! 🙂

I thought the aliases/forwarding was handled in postfix because virtual-alias-maps.cf.  
I’ll have a look and try that setting, have to find the correct dovecot/sieve-config 🙂

Edit:  
added the setting to 90-sieve.conf but couldn’t see any difference in the mail-headers of my testmail. 😕

---

<div class="post-metadata">

**Author:** ![durd](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@durd](https://discourse.mailinabox.email/u/durd)\
**Post date:** [October 1, 2016, 11:25am UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/4 "2016-10-01T11:25:23Z")

</div>

Just found this from Gmail - [https://support.google.com/mail/answer/175365](https://support.google.com/mail/answer/175365)  
From what I understand, I guess for forwarding to gmail, SRS isn’t such a good idea? 😕

I don’t know, SRS seems like an on/off feature, not an on-for-some off-for-others kind of thing. Even then, that would make MiaB more “advanced” and not very novice-friendly.

I’m also thinking that we might be talking about 2 different things. I set up an alias in MiaB that forwards to my gmail, so no emails actually stay on MiaB. I’m not having mail stored on MiaB and then have a forwarding (redirect in Roundcube-speak) rule in the webmail-client (Roundcube).

So, in a way, I’m utilizing postfix to relay(?) an alias, but then Roundcube redirects should be doing SRS, i guess?  
As you might have noticed, I’m not super knowledgeable around mail/SMTP. I do know some, but far from all.

I do know that my MiaB-box is not an open relay anyway, thanks to pflogsumm which gives a great summary of blocks/rejects 🙂

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [October 1, 2016, 12:10pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/5 "2016-10-01T12:10:50Z")

</div>

Ahhh with an alias, I see.

Anyway, interesting. If Google recommends not changing the envelope from, then that’s that.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [November 30, 2016, 12:58pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/6 "2016-11-30T12:58:24Z")

</div>

This topic was automatically closed after 61 days. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [June 27, 2024, 3:56pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/7 "2024-06-27T15:56:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [June 27, 2024, 3:59pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/8 "2024-06-27T15:59:50Z")

</div>

@JoshData I have reopened this topic as things have certainly changed over the past 8 years.

Today it is not possible to forward emails to gmail WITHOUT implementing SRS unlike what you concluded in October 2016.

Can we consider implementing this so that we can forward from the admin area directly with an alias without needing to create a sieve rule in Roundcube, which seemingly fails more and more?

[https://doc.dovecot.org/configuration\_manual/sieve/configuring\_auto\_forward\_sender\_address/](https://doc.dovecot.org/configuration_manual/sieve/configuring_auto_forward_sender_address/)

---

<div class="post-metadata">

**Author:** ![mokiejovis](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/mokiejovis/32/1999_2.png) [@mokiejovis](https://discourse.mailinabox.email/u/mokiejovis)\
**Post date:** [June 28, 2024, 5:26pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/9 "2024-06-28T17:26:29Z")

</div>

Seconding this. I’ve struggled for years to get message forwarding working correctly and briefly toyed with setting up PostSRSd with essentially no success. The only thing I’ve been able to do to get forwarding to work is by [making use of Postfix’s generic map](https://discourse.mailinabox.email/t/solved-what-is-the-correct-way-to-forward-mail/11943/5), which, while functional, is certainly not easy for the average user to set up or keep functional.

Either the external alias forwarding should be updated to work correctly with SRS, or the functionality should be removed entirely.

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [June 28, 2024, 5:48pm UTC](https://discourse.mailinabox.email/t/implement-spf-srs/1533/10 "2024-06-28T17:48:21Z")

</div>

I’m not sure what is being suggested exactly, but anything to fix SRS is welcome.
