I'm johnny-come-lately on this, and Peter nearly nailed it:

1) If you remove DOMAIN-X.com from *rcpthosts*, you no longer accept mail for it at all -- so it probably needs to remain there (or in *morercpthosts*)
2) You should remove the domain from *virtualdomains*
3) If present, you must also remove the domain from *locals*
(All files located in */var/qmail/control*)

Having done the above, the QMT knows to accept mail for DOMAIN-X.com, but not where to deliver it (you took that out!)... so now you go into smtproutes and tell it where to forward the mail...

All sounds good -- except you're probably breaking your own SPF rules, so make sure the IP address of this server (the QMT server) is in the SPF record as a valid sender for the domain, even though the only place it will actually send TO is the Office365 server.

Good luck!

Dan McAllister
IT4SOHO
QMT Project DNS/Mirror Admin

On 11/6/2013 4:56 AM, Peter Peltonen wrote:

Hi,

On Wed, Nov 6, 2013 at 1:14 AM, Eric Shubert <e...@shubes.net <mailto:e...@shubes.net>> wrote:

    On 11/05/2013 01:48 PM, Peter Peltonen wrote:

        Hi,

        I have a virtual domain on a toaster which mails go nowadays to
        Office365 (-> MX is pointint there).

        I would still need to offer IMAP service for this domain, but
        if an
        email is sent through this toaster to that virtual domain, it
        should not
        be delivered locally to the toaster inbox, but it should sent to
        Office365 (= treated as a message that should be sent to the
        default
        smtp smarthost defined in smtproutes).

        How can I achieve this, do I just remove the domain from
        rcpthosts?

        Regards,
        Peter


    Wouldn't you simply add a line in smtproutes for that domain to be
    sent to the Office365 server?


This did not work. What I tried in smtproutes:

myvirtualdomain.dom:office365.smtp.server.dom
:mydefaultsmtp.dom

I think the toaster does local delivery before checking the contents of smtproutes...

Removing the domain from rcpthosts and virtualdomains file solved the situation: I still can login with webmail to the old account and sending messages using the toaster as the smtp server delivers to office365 and not to the toaster.

Regards,
Peter








-- -Eric 'shubes'


    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    qmailtoaster-list-unsubscr...@qmailtoaster.com
    <mailto:qmailtoaster-list-unsubscr...@qmailtoaster.com>
    For additional commands, e-mail:
    qmailtoaster-list-h...@qmailtoaster.com
    <mailto:qmailtoaster-list-h...@qmailtoaster.com>




--

PLEASE TAKE NOTE OF OUR NEW ADDRESS
===================================
IT4SOHO, LLC
33 - 4th Street N, Suite 211
St. Petersburg, FL 33701-3806

CALL TOLL FREE:
  877-IT4SOHO

877-484-7646 Phone
727-647-7646 Local
727-490-4394 Fax

We have support plans for QMail!

Reply via email to