Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: rshiras on July 24, 2009, 06:59:38 AM

Title: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: rshiras on July 24, 2009, 06:59:38 AM
I have searched the FAQ on Email, and tried putting in an external server a.b.c.d just to see if it works anyway, but no joy.
# db domains setprop test.com MailServer a.b.c.d
# signal-event email-update

I want my SME 7.4 server to process e-mail through spamassassin and clamav and then forward it to an EXTERNAL exchange server.  I want to do this only with some of the domains.

I have done searches on the wiki and the forums, and I am chagrined to have to post this because I know the answer is there somewhere.  Lots of posts almost hit the mark.  I hope it gets spelled out here for this humble newbie....
Title: Re: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: janet on July 24, 2009, 12:44:50 PM
rshiras

The email FAQ refers to delegation to INTERNAL mail servers
Just setup your external exchange server to receive mail directly

Alternatively just forward email on a per user basis
Title: Re: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: rshiras on July 24, 2009, 04:32:22 PM
Mary,
As always your replies are inspirational.  You have really saved me on other occasions!  The reason I put EXTERNAL in caps is to emphasize the fact that I have read the FAQ and I do realize that the forwarding in the FAQ is about INTERNAL servers. 
Forwarding on a per user basis would not work in my case because of the multi-domain issue.  I am looking for the solution, not a work-around.  I am quite sure someone has figured out a way to forward a single domain to an external server, and I am quite sure they will see this post and be kind enough to provide the solution.
Title: Re: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: janet on July 25, 2009, 01:27:19 AM
rshiras

sme by default does not allow relaying, which  appears to be what you want to do

I do not see why you cannot forward by user, that is quite valid. You can enter user@domain pseudonyms and these can then forward to unique usernames, who are then configured to deliver to an external address. The messages will have been filtered at that stage.

The other alternative is to have a sme gateway server at the other location where the exchange server is
Title: Re: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: rshiras on July 25, 2009, 01:45:24 AM
OK well that is good information.  I was thinking of putting another SME server there anyway.
Title: Re: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: mmccarn on July 25, 2009, 03:46:58 PM
I have configured a SME server as desired by rshiras in the past, as a spam and virus filter that then passes email to an "Internal" mail server that is off-site (although this was done either using SME 6.x or a very early SME 7.x).

rshiras:

In the worst-case scenario, if everything is already configured correctly and your SME logs are indicating that email cannot be delivered to a non-local IP address, you should be able to solve this by adding the public IP of the Exchange Server as a "Local Network" with netmask 255.255.255.255 and with the same gateway your SME is already using (bearing in mind that this allows access to all of SME's "local" services from that IP address), but this should not be necessary.
Title: Re: Forward to EXTERNAL server after clamav and spamassassin processes
Post by: Knuddi on July 26, 2009, 11:23:29 PM
I think your "problem" is solved by changing smptroutes (/var/qmail/control/smtproutes) to forward mail for a certain domain to a new and external server.

You would obviously need to create/modify a template but I have done it this way.

Rgds,
Jesper