Forwarding emails to external mailbox

Discussion in 'General' started by Detlef, Jun 16, 2021.

  1. Detlef

    Detlef New Member

    This is my first post and I hope I am posting into the correct place.
    Long time user of ISPConfig but always found answers to my questions without posting myself.
    Here is my situation:
    We'd like to forward incoming messages to an external mailbox.
    I have tried both "Send copy to:" in the ISPConfig panel and with the ISPConfig roundcube forward plugin.
    But both methods are actually trying to resend the incoming message with the original sender address in the from field.
    Of course our ESP does not allow to send message originating from @gmail.com or outlook.com by our server.
    Any chance I can configure the server to use the receiving mailbox as from address when automatically forwarding messages?
    Our server is running on Debian 9 with ISPConfig 3.2.4
    For the installation I used the perfect server tutorials accordingly.
    Thank you very much for your consideration.
     
  2. recin

    recin Member

    I'm interested in this too.
    From what i have seen, something called SRS is needed but I didn't try to implement it yet
     
  3. Detlef

    Detlef New Member

    Thank you very much for your hint.
    Looking into SRS or postsrsd for this matter, I found an older post discussing this issue.
    But it also seems that Postsrsd is not straight forward with ISPConfig or in general.
    After installing it some reported that ISPConfig "Send outgoing BCC to" won't work anymore.
    And that PostSRSd will rewrite all emails. Not sure what problem this might cause.

    Hope somebody more knowledgeable than me will see this post and can give some advise.
    Wish I could post some links to the posts mentioned above but my account does not match the minimum requirements (yet).

    Edit: Typo
     
  4. atle

    atle Member HowtoForge Supporter

    You need SRS to make sure the mail fulfill the SPF settings of the sender domain. SRS however is prone to give your server a poor reputation. Lets say a mail is sent from [email protected] to [email protected] and [email protected] forwards the mail to [email protected]. Gmail will see the mail delivered from server bar.com and if foo.com has a SPF settings that dont include bar.com Gmail will either reject the mail or increase its spam rating. Furthermore Gmail will consider your server bar.com as a source of spam. With SRS, bar.com will change the source address [email protected] to something like "s%[email protected]" and the mail will be forwarded to Gmail. Gmail will see the source address from bar.com and hence will compare it to the SPF of bar.com, all is good. Except, if the mail is spam, Gmail will consider your server as a source of spam, not the server that actually sent the spam. Hence, with SRS it is important that your server scan outgoing mail for spam as well. Regardless, if you enable SRS on a shared server, there is a risk your server will get a poor reputation. I have bad experience of this in particular when in comes to Microsoft services, outlook, hotmail, live and whatever.

    There are however articles in the forum that gives you information about how to implement SRS with Postfix. I cant find them right now, but will see if I did take any notes about it at the time I investigated SRS for ISPConfig.
     
  5. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

  6. Detlef

    Detlef New Member

    Thank you both very much for your time and help.

    Poor reputation is the last we want for our server.
    Given that we are using an SmartHost to relay all outgoing messages I would not want to go that risk.
    Since this is only for one specific user, I will create an account with another mail domain hosted at google and fetch messages from our server.
    From there I can distribute incoming messages according to their labels.
    More like "going around my elbow to get to my thumb" but will accomplish what I need.
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    FWIW, I used postsrsd with amavis with good success, but it has been problematic with rspamd. If using postsrsd, be sure to set SRS_EXCLUDE_DOMAINS (I used this script in a cronjob). On all my rspamd systems I have disabled opensrs and enabled ARC signing (soon to be the default ISPConfig configuration), which should work very well for gmail and microsoft at least (and anyone which checks the ARC signatures, eg. all rspamd systems).
     
  8. atle

    atle Member HowtoForge Supporter

Share This Page