HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Allow SMTP only client? (http://www.howtoforge.com/forums/showthread.php?t=60997)

snowfly 17th March 2013 22:53

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

We have clients that want to:
1. Have their domain email (sales@myshop.com) forwarded into their gmail (myshop@gmail.com)
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.

Thanks

Parsec 18th March 2013 06:19

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:

#!/bin/sh

find /var/vmail/domain.name/mailbox1/new/* -mtime +2 -exec rm -f () \;
find /var/vmail/domain.name/mailbox2/new/* -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).


All times are GMT +2. The time now is 16:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.