1

Topic: External mail forwarding to spam gateway

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version:Ubuntu server 11.04
- iRedMail version and backend (LDAP/MySQL):PRO LDAP 1.6.2
- Any related log? Log is helpful for troubleshooting.
====

Hi Zhang,

I have tested server for external and internal mail flow  before putting into production.it is fine and using your forum all small issues got resolved.
Now as per our current setup,I would like to forward all external domain mails to our spam gateway from IRM server .How can it be  done.

thanks in advance Zhang.

2

Re: External mail forwarding to spam gateway

Sorry, what do you mean "external domain mails"? Emails sent out by your mail users?
in iRedMail, both inbound and outbound emails will be injected to Amavisd-new for spam/virus scanning by default, it's configured in Postfix with below setting:

content_filter=smtp-amavis:[127.0.0.1]:10024

You can try updating this setting to use your spam gateway if it can handle it the same way.

3

Re: External mail forwarding to spam gateway

Hi Zhang,
Thanks for your prompt response as usual.

Actually I  mean all local mails (my domain.com) will be delivered locally but other domain mails (no local domain like yahoo,hot mails,rediff etc) will go to spam gateway and vice versa. SMTP Gateway will receive all mails from outside and send to the mail server.

How can sending all non local mail to spam gateway will be achieved in IRM.

Regards,
Santosh

4

Re: External mail forwarding to spam gateway

Reference: http://www200.pair.com/mecham/spam/bypassing.html

5

Re: External mail forwarding to spam gateway

Hi Zhang,

Sorry,it looks like my answer was clear.I want to set up two IRM box as below.

1. one IRM box - will act as mail gateway which will scan mail for spam and viruses and forward to mail box server and validate the valid recipient from mail box server.

2.Another box will act as mail box server which will receive clean mails from mail gateway and send non local mails to mail gateway.

I have purchased iRedadmin PRO LDAP 1.6.2 also.I have only for one domain.

Please help me to achieve it so that I can make my server live.

Thanks and advance.

Regards.
Santosh

6

Re: External mail forwarding to spam gateway

Let's take below for example:
*) spam gateway on 192.168.1.100
*) normal iredmail server on 192.168.1.200

1) Set a iRedMail server as usual, it will act as spam gateway server and has IP address  192.168.1.100. Tuning Amavisd settings on this gateway server as below:

*) Make Amavisd-new listen on 192.168.1.100 instead of 127.0.0.1, accept service request from internal network.

# Listen on interface
$inet_socket_bind = '192.168.1.100';

# we only allow this IP address to connect
@inet_acl = qw(192.168.1.200);

# where we send mail after processing (the Postfix box)
$forward_method = 'smtp:192.168.1.200:10025';
$notify_method = $forward_method;    # notifications go to the same place

Restarting Amavisd service to make it work.

2) Setup a mail box server as usual. Tune Postfix settings as below:


*) In master.cf, instead of:

content_filter=smtp-amavis:[127.0.0.1]:10024

it would be:

content_filter=smtp-amavis:[192.168.1.100]:10024 # where we send mail for processing

instead of this in master.cf:

127.0.0.1:10025      inet    n       -       n       -       -       smtpd
        -o content_filter=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        <other stuff>

it would be more like this:

192.168.1.200:10025      inet    n       -       n       -       -       smtpd
        -o content_filter=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8,192.168.1.100
        <other stuff>

Make sure there is not a firewall of some type blocking communication between the two machines.

Restart Postfix service to make it work.

7

Re: External mail forwarding to spam gateway

Again Thanks Zhang for the step by step answer to my question.I will try above steps and get back if any issues.

One more request Zhang.

In my current set up (Postfix+Cyrus-imap) and Symantec Brightmail gateway , i am using Postfix transport fle to forward all outgoing non local domain mails to Symantec gateway.How can I do the same set up with IRM mail box server.I want to use Symantec gateway for one more year as live subscription is balance for one year.

Please find below my transport file for reference.

mail.mydomain.com         :
mydomain.com          :

*                      :[172.30.64.2]

172.30.64.2 is  Symantec brightmail gateway.

Also see local and non delivery mail log also

Local delivery

Jan 28 12:34:34 ts-mx postfix/pipe[6123]: 968F354027: to=<santoshk@mydomain.com>, orig_to=<action@mydomain.com>, relay=cyrus, delay=1, status=sent (ts-mx.mydomain.com)


Remote Delivery

Jan 27 23:01:34 ts-mx postfix/smtp[27782]: 9BE91E6304: to=<santoshk@quickfixsystem.com>, relay=172.30.64.2[172.30.64.2], delay=0, status=sent (250 OK 59/92-18583-25DD22F4)

Note: I bought valid active license for iRedadmin Pro 1.6.2 on Nov 11 but my post is moved to iRedmail support from iRedmail Pro support.no idea why !!!

Thanks Zhang in advance.

8

Re: External mail forwarding to spam gateway

santoshkrg wrote:

Please find below my transport file for reference.

iRedMail uses Postfix as MTA too, so you can do it the same way if you want. iRedMail supports per-domain and per-user transport by default.

santoshkrg wrote:

Note: I bought valid active license for iRedadmin Pro 1.6.2 on Nov 11 but my post is moved to iRedmail support from iRedmail Pro support.no idea why !!!

Thanks very much for your purchase to support iRedMail project.
The post is iRedMail related technical issue/question, not iRedAdmin-Pro, so i moved it to iRedMail support forum for better organization. smile

9

Re: External mail forwarding to spam gateway

Thank you so much so much Zhang for the clarification.

But one more doubt

I installed IRM on Deiban and ubuntu both but didn't find the transport file in postfix directory.Is there any location for transport file.

Using transport file for for non local domain forwarding will effect in any functionality of iRedadmin PRO LDAP  or performance of IRM mail box server.