[IMGate] Re: Exporting imail domains

2006-12-08 Thread Todd

Len,

Wanted to say Thank You.

Been a while since  you posted the info and I just got around to reading up 
on the Unix commands to figure this out.  Its working like a charm.  I now 
have both relay_recipients and transport files automatically updating.

Thank again,

Todd



- Original Message - 
From: Len Conrad [EMAIL PROTECTED]
To: IMGate@mgw2.MEIway.com
Sent: Wednesday, September 20, 2006 5:17 AM
Subject: [IMGate] Re: Exporting imail domains



I didn't see a reply on this.  Anyone know how to export the list of 
domains
automatically from IMail to a formatted file that I can use as a
transport.map?.

 Did you read the README?  it points you to here:

 http://www.smartbusiness.com/imail/

I have the IMail users exporting to my postfix box and it works great. 
Just
not sure how to strip it down to just the domains.

 cut -d @ -f  infile  outfile

 ... will transform  [EMAIL PROTECTED] into domain.tld

 echo [EMAIL PROTECTED] | cut -d @ -f2
 domain.tld

 Len




 

---
[This E-mail scanned for viruses by Declude EVA]





[IMGate] Ignoring transport and relay_recipient

2007-10-05 Thread Todd
We have a couple domains that we wash email for then forward from our IMail
server to their Exchange servers.  Their email does not go through the
IMGate server currently but goes directly to our IMail server bypassing the
IMGate mx because I am using relay_recipeints and transport maps.  These
maps are exported directly from my IMail server every 30 min to keep them up
to date. Since no email accounts exist on our IMail server for the domains
we forward there are no associated records in the transport and
relay_recipient maps.  
 

Is there a place that I can list their domains in the Postfix system so that
it ignores the transport map and relay_recipients restrictions, processes
emails and sends them on to our  IMail server.  

 

The relay_recipeints entries are like this

[EMAIL PROTECTED]   OK

 

Transport map listing are 

domainxyz.com smtp:[111.222.333.444]

 

mail.cf contains 

transport_maps = hash:/etc/postfix/transport

relay_domains = hash:/etc/postfix/transport

relay_recipients = hash:/etc/postfix/ relay_recipients

 

 

Thanks,

 

 

Todd Hunter

 

 






[IMGate] Re: Ignoring transport and relay_recipient

2007-10-05 Thread Todd
Thanks Len,

Ok so I cant get around the transport map.  I would think the next logical
thing would be to try and add the domains I want to the transport map after
its exported from IMail.  Or is there another way to do this?

Not being well versed in unix commands is there a way that I can modify the
following script to place something like his in the transport map -

domainabc.com smtp:[111.222.333.444]
domainefg.com smtp:[111.222.333.444]
domainhij.com smtp:[111.222.333.444]



ImailUsers.exe
sed s/$/ OK/ imailusers.txt relay_recipients_unsorted.txt
sort relay_recipients_unsorted.txt relay_recipients_sorted.txt
uniq -i relay_recipients_sorted.txt  relay_recipients
sed s/$/ smtp:[66.150.139.80]/ imailusers.txt  domaina.txt
cut -d @ -f2 domaina.txt  domainb.txt
sort domainb.txt  domainc.txt
uniq -i domainc.txt  transport


Todd




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Len Conrad
Sent: Friday, October 05, 2007 12:34 PM
To: IMGate@mgw2.MEIway.com
Subject: [IMGate] Re: Ignoring transport and relay_recipient


Is there a place that I can list their domains in the Postfix system so
that
it ignores the transport map

there's no way to bypass transport.map. It's part of the domain 
resolution process of transport.map, hosts, DNS

and relay_recipients restrictions

whitelist the domain before relay_recipients, exposing postfix to 
bounced (spam) msgs to bad Imail recipients and postfix forced to 
create and try to deliver non-delivery msgs.

Len










[IMGate] Re: Ignoring transport and relay_recipient

2007-10-05 Thread Todd

Btw  I understand about the bounces and bad IMail recipients.  When I was
running without relay recipients it was Ugly and the utilization was so much
higher.  But one of the domains we wash for is the biggest recipient/target
for spam on our system.  I would really like to offload some of that from
our IMail server to the IMGate box.

Todd



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Len Conrad
Sent: Friday, October 05, 2007 12:34 PM
To: IMGate@mgw2.MEIway.com
Subject: [IMGate] Re: Ignoring transport and relay_recipient


Is there a place that I can list their domains in the Postfix system so
that
it ignores the transport map

there's no way to bypass transport.map. It's part of the domain 
resolution process of transport.map, hosts, DNS

and relay_recipients restrictions

whitelist the domain before relay_recipients, exposing postfix to 
bounced (spam) msgs to bad Imail recipients and postfix forced to 
create and try to deliver non-delivery msgs.

Len










[IMGate] Re: Ignoring transport and relay_recipient

2007-10-05 Thread Todd

I went with your suggestion and added a second transport map with the washed
domains.  I also did the same for the relay recipients adding a 2nd map with
wildcards. 

The gateway is now processing email for the washed domains and everything is
working good.  

I plan in the future to get email lists from their Exchange servers so that
I can build valid relay recipient maps.  With this system of multiple maps I
can have them upload their lists whenever it changes and the system will be
automated. 

Thanks again for the help.

Todd

 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Len Conrad
Sent: Friday, October 05, 2007 1:58 PM
To: IMGate@mgw2.MEIway.com
Subject: [IMGate] Re: Ignoring transport and relay_recipient


   I would think the next logical
thing would be to try and add the domains I want to the transport map after
its exported from IMail.  Or is there another way to do this?


you can have mutlitple files input to

transport_maps =
   hash:/path/to/file1
   hash:/path/to/file2

they are searched in order, first match wins.

I would recommend the multi file approach. some exported files are 
untouched, and other files are created/modified.


What you export from Imail is [EMAIL PROTECTED]


Not being well versed in unix commands

I found a new one yesterday, by accident, which might help you here.

pkg_add -r rpl

rpl, replace, is a nice command with a non-mathematical/non-nerdy 
manner that is simpler than sed or perl.

  is there a way that I can modify the
following script to place something like his in the transport map -

domainabc.com smtp:[111.222.333.444]
domainefg.com smtp:[111.222.333.444]
domainhij.com smtp:[111.222.333.444]

... is nothing but standard formatting for transport.map.

ImailUsers.exe
sed s/$/ OK/ imailusers.txt relay_recipients_unsorted.txt
sort relay_recipients_unsorted.txt relay_recipients_sorted.txt

sort -f  relay_recipients_unsorted.txt | uniq 
-i   relay_recipients.txt.sorted


sed s/$/ smtp:[66.150.139.80]/ imailusers.txt  domaina.txt

that appears to be attempting to append  smtp:[66.150.139.80] to a 
transport.map line.


here's another way with PERL

perl -pi.bak -e 's/\[domain\.tld\]/[ip.ad.re.ss]/ig' /path/to/file

 outputs file with replacements, and file.back before replacements.


Len