Mapping one domain to another (mysql)

2012-08-06 Thread email builder
I was trying to find a SQL example how to alias email that is addressed to everyone at a secondary domain to my primary domain.  I mean: I have many virtual users set up for example.com, I added a new domain, example-2.com and I want any email going to example-2.com to be delivered to example.c

Re: Mapping one domain to another (mysql)

2012-08-06 Thread email builder
> I was trying to find a SQL example how to alias email that is addressed > to everyone at a secondary domain to my primary domain.  I mean: > > I have many virtual users set up for example.com, I added a new domain, > example-2.com and I want any email going to example-2.com to be delivered t

Re: Mapping one domain to another (mysql)

2012-08-06 Thread email builder
> So I came up with this: > > query = select if ('%d' = 'example-2.com', IFNULL((select dest > from aliases where addr = '%u...@example.com'), (select addr from users > where addr = '%u...@example.com')), (select dest from aliases where addr = > '%s')) > > This seems to work in all cases exc

Re: Mapping one domain to another (mysql)

2012-08-06 Thread email builder
>> So I came up with this: >> >> query = select if ('%d' = 'example-2.com', IFNULL((select > dest >> from aliases where addr = '%u...@example.com'), (select addr from > users >> where addr = '%u...@example.com')), (select dest from aliases where > addr = >> '%s')) >> >> This seems to

postfix-users@postfix.org

2012-08-06 Thread vishesh kumar
Thanks Wietse On Wed, Aug 1, 2012 at 6:46 PM, Wietse Venema wrote: > vishesh kumar: > > Hi Members, > > > > I have multiple virtual domain hosted on postfix mail server . My > > requirement is to block mail coming from gmail/yahoo account to @ > > linuxmantra.com accounts. What you suggest for m

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Benny Pedersen
Den 2012-08-05 22:36, Patrick Ben Koetter skrev: As I understand it the client you want to connect to your server is not capable to do SMTP AUTH. Will you be able to identify the client by its static IP? static ip is as foolproff as pop before smtp (NAT can still accur on static remote ip)

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Benny Pedersen
Den 2012-08-05 22:39, Adam NEVERT skrev: The question and debate is close for me. so it works now ? dont let your choices being fooled by list members here

Re: Mapping one domain to another (mysql)

2012-08-06 Thread Benny Pedersen
Den 2012-08-06 12:03, email builder skrev: This causes a bounce instead of reject. Do I have to add a clause for this to my query? I start to feel like I'm doing things Postfix should be doing. There must be a more simple way to do this? postfixadmin have domain-alias support fits 100% to su

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Benny Pedersen
Den 2012-08-06 07:02, Adam NEVERT skrev: And my last question WHICH IS NOT LINKED TO MY PREVIOUS QUESTIONS, is it possible to force postfix to create a _from_ line in an email before sending it if the client didn't create it ? From: header is part of body content, thats why sender is to make s

Re: post screen - temp whitelist TTL

2012-08-06 Thread Stan Hoeppner
On 8/5/2012 10:53 PM, /dev/rob0 wrote: > On Sun, Aug 05, 2012 at 07:48:56AM -0500, Stan Hoeppner wrote: >> On 8/4/2012 10:08 AM, /dev/rob0 wrote: >> postscreen_client_connection_count_limit = 10 >>> >>> I'm not sure why you did this. Some MTAs, notably qmail, are >>> likely to assault you wit

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Viktor Dukhovni
On Mon, Aug 06, 2012 at 02:39:10PM +0200, Benny Pedersen wrote: > >And my last question WHICH IS NOT LINKED TO MY PREVIOUS QUESTIONS, is > >it possible to force postfix to create a _from_ line in an email > >before sending it if the client didn't create it ? > > From: header is part of body conte

Re: Mapping one domain to another (mysql)

2012-08-06 Thread Tom Hendrikx
On 8/6/12 2:28 PM, Benny Pedersen wrote: > Den 2012-08-06 12:03, email builder skrev: > >> This causes a bounce instead of reject. Do I have to add a clause for >> this to my query? I start to feel like I'm doing things Postfix should >> be doing. There must be a more simple way to do this? > > p

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Noel Jones
On 8/6/2012 9:18 AM, Viktor Dukhovni wrote: >>> it possible to force postfix to create a _from_ line in an email >>> before sending it if the client didn't create it ? > > Postfix will add a missing "From:" header when: > > always_add_missing_headers = yes > > http://www.postfix.org/

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Benny Pedersen
Den 2012-08-06 17:02, Noel Jones skrev: http://www.postfix.org/postconf.5.html#always_add_missing_headers http://www.postfix.org/postconf.5.html#local_header_rewrite_clients The docs seem to say missing headers are added if EITHER always_add_missing_headers=yes OR the client ma

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Noel Jones
On 8/6/2012 10:19 AM, Benny Pedersen wrote: > Den 2012-08-06 17:02, Noel Jones skrev: >>> http://www.postfix.org/postconf.5.html#always_add_missing_headers >>> >>> http://www.postfix.org/postconf.5.html#local_header_rewrite_clients >>> > >> The docs seem to say missing headers are added if

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Adam NEVERT
On Mon, Aug 06, 2012 at 02:39:10PM +0200, Benny Pedersen wrote: And my last question WHICH IS NOT LINKED TO MY PREVIOUS QUESTIONS, is it possible to force postfix to create a _from_ line in an email before sending it if the client didn't create it ? From: header is part of body content, thats

Re: Unauthenticated user and domain restriction

2012-08-06 Thread Viktor Dukhovni
On Mon, Aug 06, 2012 at 10:02:05AM -0500, Noel Jones wrote: > On 8/6/2012 9:18 AM, Viktor Dukhovni wrote: > > >>> it possible to force postfix to create a _from_ line in an email > >>> before sending it if the client didn't create it ? > > > > Postfix will add a missing "From:" header when: > >

Re: Mapping one domain to another (mysql)

2012-08-06 Thread email builder
>>> This causes a bounce instead of reject. Do I have to add a clause for >>> this to my query? I start to feel like I'm doing things Postfix > should >>> be doing. There must be a more simple way to do this? >> >> postfixadmin have domain-alias support fits 100% to subject, makes sense >>

mysql query suppressed?

2012-08-06 Thread email builder
I read in http://www.postfix.org/mysql_table.5.html for the %d substitution in the query if the lookup is not a full email address with domain, the entire query is not even executed? Is this right? If that's the case, you can't do complex queries like: select IF('%d' = 'example.com', . Eve

Re: mysql query suppressed?

2012-08-06 Thread Reindl Harald
Am 06.08.2012 22:54, schrieb email builder: > I read in http://www.postfix.org/mysql_table.5.html for the %d substitution > in the query if the lookup is not a full email address with domain, the > entire query is not even executed? Is this right? > > If that's the case, you can't do complex q

Re: mysql query suppressed?

2012-08-06 Thread email builder
> Am 06.08.2012 22:54, schrieb email builder: >> I read in http://www.postfix.org/mysql_table.5.html for the %d substitution >> in the query if the lookup is not a full email address with domain, the >> entire >> query is not even executed? Is this right? >> >> If that's the case, you can't