Allow SMTP only client?

Discussion in 'Installation/Configuration' started by snowfly, Mar 17, 2013.

  1. snowfly

    snowfly Member

    With ISPConfig is it possible to setup a mailbox that only allows SMTP only and forwards incoming mail externally?
    Currently running (soon to upgrade to

    We have clients that want to:
    1. Have their domain email ([email protected]) forwarded into their gmail ([email protected])
    2. Use authenticated SMTP via our ISPConfig mail server, to send outgoing mail

    The reason for '2' is because when sending mail via gmail smtp, Google adds a "on behalf of" message to outgoing mails from other domains. So the clients wish to use our SMTP server.

    I tried to acheive this by setting the following;

    A) Add Mailbox in ISPConfig with "Send copy to" set to gmail address
    This works, copies incoming mail to gmail, allows user to use SMTP for outgoing mail.
    BUT - the INBOX on our ISPConfig mail server fills up with their unread mail, as they read mail on gmail. Solution?

    B) Use Remote API to set 'disabledeliver' = 'y', this has no effect so no use. (also setting 'disablesmtp' = 'y' has no effect)

    C) Use Remote API to set 'postfix' = 'n', this stops both incoming and outgoing mail, so no use.

    Is there another suggestion or approach we can take to meet the requirements of SMTP mailbox only, with mail delivered into a gmail mailbox, and no unread mail pilled up in the local INBOX?

    If there is absolutely no way of acheiving this in ISPConfig, then as a last resort we would have to implement option (A) above, and write some sort of script that empties the INBOX's of these types of mailboxes we setup, with "copy to" gmail mailboxes.
    This at least would allow users to use our SMTP, have mail delivered into the Gmail, and now have our mail server fill up with unread mail that will "Never" be checked.

  2. Parsec

    Parsec New Member

    You most probably could setup a system whereby the email is forwarded but not kept locally while still retaining the ability for them to use the outgoing smtp.. but it's definitely much simpler just to automatically remove old mail they don't pickup. Just use "find" in a simple script and run it daily with a cron. Script eg:


    find /var/vmail/* -mtime +2 -exec rm -f () \;
    find /var/vmail/* -mtime +2 -exec rm -f () \;

    ...etc etc

    Run it via cron once a day and it will delete anything over 2 days old in that directory. I would leave a day or two's mail in case one day they phone up and say "You wouldn't have a copy of my mail from yesterday would you, I accidentally deleted it in my gmail". (You become a God to them when you answer yes to such questions).

Share This Page