Include forward mail adres when forwaring mail

jaapsh

Verified User
Joined
Apr 13, 2016
Messages
10
Hi!

We are using a DA server to forward emails from suppliers to an invoicing robot. This invoicing robot requires it's own email using for 'sent to'

For example:
[email protected] sents email to [email protected]
[email protected] forwards this email to [email protected], [email protected] using the default E-Mail Forwarder.

[email protected] will reject this email because it is sent to [email protected] :(
Is it possible to forwards emails AND replace the sent to address to [email protected]?
 
Thanks! Trying to get this working. Not as easy as I thought.

I'm running custombuild 2.0. Enabled the custombuild 2.0 plugin. Enabled pigeonhole. Updated Dovecot and Roundcube.
Unfortunately Dovecot refused to start. I had to outcomment some lines in /etc/dovecot/conf.d/90-sieve.conf in order to get Dovecot starting again.

#protocol sieve {
# managesieve_max_line_length = 65536
# managesieve_implementation_string = Dovecot Pigeonhole
# managesieve_max_compile_errors = 5
# managesieve_logout_format = bytes=%i/%o
# log_path = /var/log/dovecot-sieve-errors.log
# info_log_path = /var/log/dovecot-sieve.log
#}

Any idea what mistake I'm making? Kind of new to this stuff. ;-)
 
In order to build dovecot with Sieve

Code:
cd /usr/local/directadmin/custombuild
./build update
./build set pigeonhole yes
./build set dovecot_conf yes
./build dovecot
./build dovecot_conf
./build roundcube

Please let me know your results.
 
The default options do not work. I think i might need a custom script for Sieve in order to rewrite the 'to' address.
Googeling now. But if you might happen to have examples ;-)
 
Last edited:
For users reading this. I succeeded in doing this.

I'm rewriting the 'to' address using Exim now. Use the sieve plugin for dovecot in Roundcube (filters in settings)
If you just use the DA forwarding tool the address will not be rewritten.

#EDIT#47:
# REWRITE CONFIGURATION
# There is no rewriting specification in this exim.conf file. If your
# configuration requires one, it would go here

.include_if_exists /etc/exim.authenticators.post.conf

begin rewrite
[email protected] "Name <[email protected]>" tw

cheers!
 
Last edited:
Back
Top