[Dovecot] Pigeon Sieve, redirect action and SPF

Nikita Koshikov koshikov at gmail.com
Fri Jul 29 09:53:22 EEST 2011


On Thu, 28 Jul 2011 20:43:45 +0200
Stephan Bosch wrote:

> On 07/26/2011 08:37 AM, Nikita Koshikov wrote:
> > I have raised this problem earlier here (http://www.mail-archive.com/dovecot@dovecot.org/msg20945.html), but seems it stuck at that point.
> >
> > The simple way, is to use redirecting user mail_from, so messages will appear like originated from redirecting smtp server.
> 
> Yes. I read a bit about this though, and obviously this breaks bounce 
> processing.
> 
> 
> > The right way for redirecting messages with sieve is to use SRS mechanism. And this should be configured on SMTP server.
> 
> Right.
> 
> > The problem is when sieve exec sendmail_path smtp server has no clue about "redirect" recipient( user who wrote the sieve script) and srs can't be configured. So adding one more header when redirecting sieve message with original sender will be half of the work - another part it to set up smtp for understanding this header and construct new 'mail from:' address in appropriative way(something like srs0_forward_user-fuzzy_staff-orig.address at forwarded_domain. Exact format should be determine.). Maybe this will be hard to setup, but we at least have something(original sender address and forwarded one) and this is another story.
> 
> Would the header name need to be configurable, or is 
> X-Sieve-Redirected-From good for all purposes?
> 
> Regards,
> 
> Stephan.
> 
> 
I saw this

X-ResentFrom:
X-SRS-Rewrite:
X-Forwarded-(To/For):

So the name is not significant. If it's not so difficult to code - than configurable header of course is better. But it's only a matter of taste. 

One thing to note for implementing:
It will be much more simple for setting up srs, if sieve will export to environment some variables indicating need for rewrite. And than we will be able to write wrapper for sendmail_path that will selectively choose what should we do:
For example, I don't want srs to happen if user is forwarding for local domain mailbox, or if action that trigger mail sending is - "out of office reply".
So, wrapper will analyze need srs or no, and after all invoke srs binary for signing, or just call pure mta.


More information about the dovecot mailing list