Re: check_recipient_access

2021-07-10 Thread Wietse Venema
post...@ptld.com: > What does "resolved RCPT TO address" mean? > If the mail was sent to an alias does postfix send the alias or the > address the alias points to, to the table? The address as returned by the trivial-rewrite daemon's resolve service. For example, the forms user@foo and user@foo.$

Re: check_recipient_access after rewrite happens

2017-09-21 Thread Wietse Venema
Andreas Thienemann: > Hi, > > On Wed, 20 Sep 2017, Wietse Venema wrote: > > > > > If you have a virtual alias that rewrites an address to the spam > > > > sink, specify that address in the SMTP daemon acces rules instead. > > > > > [,,,] > > > That would work. A bit of a hack though and I t

Re: check_recipient_access after rewrite happens

2017-09-21 Thread Andreas Thienemann
Hi, On Wed, 20 Sep 2017, Wietse Venema wrote: > > If you have a virtual alias that rewrites an address to the spam > > sink, specify that address in the SMTP daemon acces rules instead. > [,,,] > That would work. A bit of a hack though and I think it would only work for > virtual aliases

Re: check_recipient_access after rewrite happens

2017-09-20 Thread Viktor Dukhovni
> On Sep 19, 2017, at 8:39 PM, Andreas Thienemann wrote: > > That would work. A bit of a hack though and I think it would only work for > virtual aliases with one level of redirection but not for something like > i...@example.com -> i...@example.net -> spam-mails. Some SQL implementations sup

Re: check_recipient_access after rewrite happens

2017-09-20 Thread Wietse Venema
Andreas Thienemann: > Hi, > > On Tue, 19 Sep 2017, Wietse Venema wrote: > > > > During migration of an inherited mail system I have the situation that I > > > would like to reject certain recipient address _after_ they have been > > > rewritten through the virtual_alias_maps. > > > > The SMTP

Re: check_recipient_access after rewrite happens

2017-09-19 Thread Andreas Thienemann
Hi, On Tue, 19 Sep 2017, Wietse Venema wrote: > During migration of an inherited mail system I have the situation that I > would like to reject certain recipient address _after_ they have been > rewritten through the virtual_alias_maps. The SMTP daemon acces rules currently do not have acc

Re: check_recipient_access after rewrite happens

2017-09-19 Thread Wietse Venema
Andreas Thienemann: > Hi, > > During migration of an inherited mail system I have the situation that I > would like to reject certain recipient address _after_ they have been > rewritten through the virtual_alias_maps. The SMTP daemon acces rules currently do not have access to that information

Re: check_recipient_access with ldap

2016-07-06 Thread Il Neofita
On Wed, Jul 6, 2016 at 10:43 AM, Viktor Dukhovni wrote: > On Wed, Jul 06, 2016 at 09:44:19AM -0400, Il Neofita wrote: > > > I would like to transform this line > > check_recipient_access hash:/etc/postfix/hash_protectedDestinations > > > > /etc/postfix/ldap_protectedDestinationsHash: > > test

Re: check_recipient_access with ldap

2016-07-06 Thread Viktor Dukhovni
On Wed, Jul 06, 2016 at 09:44:19AM -0400, Il Neofita wrote: > I would like to transform this line > check_recipient_access hash:/etc/postfix/hash_protectedDestinations > > /etc/postfix/ldap_protectedDestinationsHash: > testlistldap@ilneofita auth_testlistldap_only reject_list_only > > with t

Re: check_recipient_access with access table Filter hooks + regex

2013-10-28 Thread alizaheer
Hi Thanks for pointing out issue. Your solution works perfectly. Regards Ali -- View this message in context: http://postfix.1071664.n5.nabble.com/check-recipient-access-with-access-table-Filter-hooks-regex-tp62603p62606.html Sent from the Postfix Users mailing list archive at Nabble.com.

Re: check_recipient_access with access table Filter hooks + regex

2013-10-28 Thread Noel Jones
On 10/28/2013 2:42 AM, alizaheer wrote: > Hi > > i want to trigger hook when email come to t...@example.com or > workroom-*@example.com. > > Problem: Regex not work in work access table > (http://www.postfix.org/access.5.html) > > my /postfix/access file content is : > > t...@example.com FILTER

Re: check_recipient_access not working

2013-04-11 Thread pifoot
Ah. I see. Thank you very much for that. On 11 April 2013 17:05, Brian Evans - Postfix List [via Postfix] < ml-node+s1071664n56963...@n5.nabble.com> wrote: > On 4/11/2013 11:52 AM, Stephen West wrote: > > Thank you for your reply. > > The messages are sent from /usr/sbin/sendmail > > > Any mail

Re: check_recipient_access not working

2013-04-11 Thread Brian Evans
On 4/11/2013 11:52 AM, Stephen West wrote: Thank you for your reply. The messages are sent from /usr/sbin/sendmail Any mail sent through the sendmail(1) command is not subject to smtpd_* rules. The only option on restriction is which users can send mail through the authorized_submit_users

Re: check_recipient_access not working

2013-04-11 Thread Stephen West
Thank you for your reply. The messages are sent from /usr/sbin/sendmail The log contains: Apr 11 16:50:26 hilljaa5 postfix/qmgr[2563]: 0B60181F0: from=< h...@removed.com>, size=310, nrcpt=1 (queue active) Apr 11 16:50:26 hilljaa5 postfix/smtp[2569]: 0B60181F0: to=, relay=test.test2.com[31.222.14

Re: check_recipient_access not working

2013-04-11 Thread Brian Evans
On 4/11/2013 10:49 AM, pifoot wrote: Many thanks for your reply. Apologies. The command DOES return OK for the whitelisted e-mail address. It returns nothing at all for an e-mail address not in the whitelist. However, e-mail addresses not in the hash file are still sent and not rejected. You h

Re: check_recipient_access not working

2013-04-11 Thread Wietse Venema
pifoot: > Thank you for your reply. No, the * aren't included. It was because I put the > commands and files in bold on the original posting. > > Running that command doesn't produce any output. Have you any idea why that > should be? Update the Berkeley DB file with: $ postmap hash:/path/to/fil

Re: check_recipient_access not working

2013-04-11 Thread pifoot
Many thanks for your reply. Apologies. The command DOES return OK for the whitelisted e-mail address. It returns nothing at all for an e-mail address not in the whitelist. However, e-mail addresses not in the hash file are still sent and not rejected. Thanks, Stephen -- View this message in c

Re: check_recipient_access not working

2013-04-11 Thread pifoot
Thank you for your reply. No, the * aren't included. It was because I put the commands and files in bold on the original posting. Running that command doesn't produce any output. Have you any idea why that should be? Many thanks, Stephen -- View this message in context: http://postfix.107166

Re: check_recipient_access not working

2013-04-11 Thread Wietse Venema
pifoot: > *smtpd_recipient_restrictions = check_recipient_access > hash:/etc/postfix/recipient_access, reject* > > /etc/postfix/recipient_access contains: > > *t...@test.com OK* Hopefully the "*" are not included. You can test the access table with: $ postmap -q t...@test.com hash:/etc/po

Re: check_recipient_access, regexp and case sensitivity

2013-03-27 Thread Wietse Venema
Viktor Dukhovni: >src/smtpd/smtpd_resolve.c: > lowercase(STR(reply->recipient)); /* XXX */ Wietse Venema: > This may have escaped the code cleanup when forced lowercase > was removed from access maps. Fabio Sangiovanni: > Thanks for your answer, Wietse. Should we then expe

Re: check_recipient_access, regexp and case sensitivity

2013-03-27 Thread Fabio Sangiovanni
Wietse Venema porcupine.org> writes: > > Viktor Dukhovni: > >src/smtpd/smtpd_resolve.c: > > lowercase(STR(reply->recipient)); /* XXX */ > > This may have escaped the code cleanup when forced lowercase > was removed from access maps. > > Wietse > > Thanks for your

Re: check_recipient_access, regexp and case sensitivity

2013-03-26 Thread Wietse Venema
Viktor Dukhovni: >src/smtpd/smtpd_resolve.c: > lowercase(STR(reply->recipient)); /* XXX */ This may have escaped the code cleanup when forced lowercase was removed from access maps. Wietse

Re: check_recipient_access, regexp and case sensitivity

2013-03-26 Thread Viktor Dukhovni
On Tue, Mar 26, 2013 at 08:25:43PM +0100, Fabio Sangiovanni wrote: > > Addresses used in access checks are case folded in Postfix upstream > > of the access table. The original address goes into the queue file, > > but access checks use case folded addresses. > > Is it maybe the case to update t

Re: check_recipient_access, regexp and case sensitivity

2013-03-26 Thread Fabio Sangiovanni
Viktor Dukhovni dukhovni.org> writes: > Sorry, I don't do pastebins. If you want help include the relevant > information in your message. Relevant (long piece of) information included at the end of this message :) > Addresses used in access checks are case folded in Postfix upstream > of the

Re: check_recipient_access, regexp and case sensitivity

2013-03-26 Thread Viktor Dukhovni
On Tue, Mar 26, 2013 at 09:35:40AM +, Fabio Sangiovanni wrote: > > > This behaviour is correct, but I can't get it using the restriction > > > in postfix. > > > > The Postfix table layer is at the mercy of any upstream rewriting. > > Are you sure your input address is not mapped to lower case

Re: check_recipient_access, regexp and case sensitivity

2013-03-26 Thread Fabio Sangiovanni
Viktor Dukhovni dukhovni.org> writes: > > On Mon, Mar 25, 2013 at 05:44:45PM +0100, Fabio Sangiovanni wrote: > > > $ postmap -q 'test domain.tld' \ > > regexp:/etc/postfix/check_recipient_access.regexp > > REJECT wrong format > > > > while: > > $ postmap -q 'tEsT domain.tld' \ > > re

Re: check_recipient_access, regexp and case sensitivity

2013-03-25 Thread Viktor Dukhovni
On Mon, Mar 25, 2013 at 05:44:45PM +0100, Fabio Sangiovanni wrote: > Hi, thanks for your answer. I'm sorry but I can't get the point here. > I *want* case sensitive matching. To me, the manual says that, due > to the fact that insensitive matching is on by default, one should > append the flag to

Re: check_recipient_access, regexp and case sensitivity

2013-03-25 Thread Fabio Sangiovanni
Viktor Dukhovni dukhovni.org> writes: > > On Mon, Mar 25, 2013 at 04:35:48PM +0100, Fabio Sangiovanni wrote: > > > I'm trying to figure out how case sensitivity works in a > > check_recipient_access regexp table (Postfix 2.6.6). > > Try the documentation: > > http://www.postfix.org/regexp_ta

Re: check_recipient_access, regexp and case sensitivity

2013-03-25 Thread Viktor Dukhovni
On Mon, Mar 25, 2013 at 04:35:48PM +0100, Fabio Sangiovanni wrote: > I'm trying to figure out how case sensitivity works in a > check_recipient_access regexp table (Postfix 2.6.6). Try the documentation: http://www.postfix.org/regexp_table.5.html http://www.postfix.org/pcre_table.5.html

Re: check_recipient_access and transport maps question

2013-03-09 Thread Alex
Hi, >> I have a postfix-2.9.5 install on fc16 which manages mail for a few >> domains. The server just relays mail for a few domains and doesn't >> deliver any mail locally. >> >> The question I have is regarding precedence. Is the >> smtpd_recipient_restrictions consulted before transport_maps? >

Re: check_recipient_access and transport maps question

2013-03-09 Thread Reindl Harald
Am 09.03.2013 23:41, schrieb Alex: > Hi, > > I have a postfix-2.9.5 install on fc16 which manages mail for a few > domains. The server just relays mail for a few domains and doesn't > deliver any mail locally. > > The question I have is regarding precedence. Is the > smtpd_recipient_restriction

Re: check_recipient_access in MySQL

2012-02-15 Thread /dev/rob0
On Wed, Feb 15, 2012 at 11:24:30PM +0100, Jack Knowlton wrote: > Same thing can be done for check_sender_access, right? Any check_*_access or other kind of lookup. > And what about storing a CIDR table into a database - is it > possible? PostgreSQL has a CIDR data type. I do not think other supp

Re: check_recipient_access in MySQL

2012-02-15 Thread Benny Pedersen
Den 2012-02-16 00:16, Reindl Harald skrev: select 'REJECT This user is banned' from banned_usertable where useremail = '%s' will do exactly the same missing limit so postfix only get one hit if listed and NULL if not listed

Re: check_recipient_access in MySQL

2012-02-15 Thread Benny Pedersen
Den 2012-02-15 17:57, Jack Knowlton skrev: u...@domain.com REJECT This particular user has been banned. us...@domain.com REJECT This particular user has been banned. dbname = postfix hosts = 10.0.1.54 query = SELECT action FROM recipient_access WHERE address='%s' postmap -q us...@example.org

Re: check_recipient_access in MySQL

2012-02-15 Thread Reindl Harald
Am 16.02.2012 00:14, schrieb Benny Pedersen: > Den 2012-02-15 15:50, Jack Knowlton skrev: > >> u...@domain.com REJECT This particular user has been banned. >> us...@domain.com REJECT This particular user has been banned. > > select concat(´REJECT This user is banned´) from banned_usertable wher

Re: check_recipient_access in MySQL

2012-02-15 Thread Benny Pedersen
Den 2012-02-15 15:50, Jack Knowlton skrev: u...@domain.com REJECT This particular user has been banned. us...@domain.com REJECT This particular user has been banned. select concat(´REJECT This user is banned´) from banned_usertable where useremail = ´%s´ test as usual with postmap that it w

Re: check_recipient_access in MySQL

2012-02-15 Thread Jack Knowlton
On Wed, February 15, 2012 6:08 pm, Brian Evans - Postfix List wrote: > On 2/15/2012 11:57 AM, Jack Knowlton wrote: >> On Wed, February 15, 2012 5:37 pm, /dev/rob0 wrote: >>> On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: I'm looking into implementing a check_recipient_access as

Re: check_recipient_access in MySQL

2012-02-15 Thread Brian Evans - Postfix List
On 2/15/2012 11:57 AM, Jack Knowlton wrote: > On Wed, February 15, 2012 5:37 pm, /dev/rob0 wrote: >> On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: >>> I'm looking into implementing a check_recipient_access as a table >>> inside a MySQL database. It's basically a list of users that

Re: check_recipient_access in MySQL

2012-02-15 Thread /dev/rob0
On Wed, Feb 15, 2012 at 05:57:55PM +0100, Jack Knowlton wrote: > Do you think this could work postmap(1) is your friend. postmap -q listed@address mysql:/path/to/your/query Where "listed@address" is in the recipient_access table address column. > CREATE TABLE IF NOT EXISTS `recipient_access` (

Re: check_recipient_access in MySQL

2012-02-15 Thread Jack Knowlton
On Wed, February 15, 2012 5:37 pm, /dev/rob0 wrote: > On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: >> I'm looking into implementing a check_recipient_access as a table >> inside a MySQL database. It's basically a list of users that have >> been banned from the system and for whom

Re: check_recipient_access in MySQL

2012-02-15 Thread /dev/rob0
On Wed, Feb 15, 2012 at 03:50:00PM +0100, Jack Knowlton wrote: > I'm looking into implementing a check_recipient_access as a table > inside a MySQL database. It's basically a list of users that have > been banned from the system and for whom I don't want a simple 550 > user unknown bounce. Curre

Re: check_recipient_access with exceptions

2011-12-01 Thread Vladimir Parkhaev
It is much easier that I thought. :) Thank you. Quoting Viktor Dukhovni (postfix-us...@dukhovni.org): > On Wed, Nov 30, 2011 at 08:38:13PM -0500, Vladimir Parkhaev wrote: > > Augment this: > > > smtpd_recipient_restrictions = > > check_recipient_access hash:/usr/local/etc/postfix/access,

Re: check_recipient_access with exceptions

2011-12-01 Thread Jeroen Geilman
On 2011-12-01 02:39, Viktor Dukhovni wrote: On Wed, Nov 30, 2011 at 08:38:13PM -0500, Vladimir Parkhaev wrote: Augment this: smtpd_recipient_restrictions = check_recipient_access hash:/usr/local/etc/postfix/access, reject_unauth_destination, permit As follows (and avoi

Re: check_recipient_access with exceptions

2011-11-30 Thread Viktor Dukhovni
On Wed, Nov 30, 2011 at 08:38:13PM -0500, Vladimir Parkhaev wrote: Augment this: > smtpd_recipient_restrictions = > check_recipient_access hash:/usr/local/etc/postfix/access, > reject_unauth_destination, > permit As follows (and avoid using "access", name each table after its

Re: check_recipient_access seems doesn't work.

2010-12-29 Thread mouss
Le 29/12/2010 12:06, Mauro a écrit : > On 26 November 2010 12:08, /dev/rob0 wrote: > > >> snip >>> smtpd_recipient_restrictions = >>> check_client_access hash:/etc/postfix/maps/internal_networks, >> >> This potentially dangerous restriction might contain permit actions. >> See SMTPD_ACCESS_READM

Re: check_recipient_access seems doesn't work.

2010-12-29 Thread Mauro
On 26 November 2010 12:08, /dev/rob0 wrote: > snip >> smtpd_recipient_restrictions = >> check_client_access hash:/etc/postfix/maps/internal_networks, > > This potentially dangerous restriction might contain permit actions. > See SMTPD_ACCESS_README.html#danger for the danger. (In case you > wond

Re: check_recipient_access seems doesn't work.

2010-11-26 Thread /dev/rob0
On Fri, Nov 26, 2010 at 09:35:06AM +0100, Mauro wrote: > On 25 November 2010 14:11, /dev/rob0 wrote: > > On Thu, Nov 25, 2010 at 01:54:49PM +0100, Mauro wrote: > >> I have a file: recipient_checks with mym...@example.com REJECT > >> and the corresponding hashed recipient_checks.db. > >> In main.cf

Re: check_recipient_access seems doesn't work.

2010-11-26 Thread Mauro
On 25 November 2010 14:11, /dev/rob0 wrote: > On Thu, Nov 25, 2010 at 01:54:49PM +0100, Mauro wrote: >> I have a file: recipient_checks with mym...@example.com REJECT and the >> corresponding hashed recipient_checks.db. >> In main.cf I have: >> smtpd_recipient_restrictions = >>    .. >>  

Re: check_recipient_access seems doesn't work.

2010-11-25 Thread /dev/rob0
On Thu, Nov 25, 2010 at 01:54:49PM +0100, Mauro wrote: > I have a file: recipient_checks with mym...@example.com REJECT and the > corresponding hashed recipient_checks.db. > In main.cf I have: > smtpd_recipient_restrictions = >.. > .. The elided lines might have been significant. >

Re: check_recipient_access regexp

2010-05-12 Thread mouss
VR a écrit : > Having read postfix.org/regexp_table.5.html, I'm experimenting to stop > junk mail to common system accounts with > check_recipient_access regexp:/etc/postfix/reject_by_recipient_regexp > > and trying to learn how to craft regexp's. I've tried many iterations > similar to: > /^To: m

Re: check_recipient_access regexp

2010-05-12 Thread Brian Evans - Postfix List
On 5/12/2010 4:44 PM, VR wrote: > Having read postfix.org/regexp_table.5.html, I'm experimenting to stop > junk mail to common system accounts with > check_recipient_access regexp:/etc/postfix/reject_by_recipient_regexp > > and trying to learn how to craft regexp's. I've tried many iterations > sim

Re: check_recipient_access - negate ldap query to return reject if user is NOT found?

2009-10-28 Thread Noel Jones
On 10/28/2009 8:11 AM, Harakiri wrote: --- On Wed, 10/28/09, Noel Jones wrote: The proper solution is to use postfix's built-in recipient validation. Valid recipients should be listed in the proper table for the address class of the recipient domain, then you can reject all unknown recipien

Re: check_recipient_access - negate ldap query to return reject if user is NOT found?

2009-10-28 Thread Harakiri
--- On Wed, 10/28/09, Noel Jones wrote: > > The proper solution is to use postfix's built-in recipient > > validation.  Valid recipients should be listed in the > proper > table for the address class of the recipient domain, then > you > can reject all unknown recipients with a simple > "rej

Re: check_recipient_access - negate ldap query to return reject if user is NOT found?

2009-10-28 Thread Noel Jones
On 10/28/2009 6:55 AM, Harakiri wrote: Hi, my current setup is using check_recipient_access with a SQL table. This works fine since i can negate the query to return REJECT when a user is not found, if the user is found, the query returns DUNNO to proceed with addtional checks (greylisting, rb

Re: check_recipient_access multiple RCPT TO

2009-10-02 Thread Noel Jones
On 10/2/2009 3:59 PM, K K wrote: Hi all, are there any possibilities to check multiple recipients based on check_recipient_access restriction ? I mean, I would like to reject mails from concrete sender to(concrete) multiple recipients, for example sent mail from b...@example.com

Re: check_recipient_access multiple RCPT TO

2009-10-02 Thread Wietse Venema
K K: > Hi all, > > are there any possibilities to check multiple recipients based on > check_recipient_access restriction ? As documented, smtpd_recipient_strictions is invoked once for each RCPT TO command. If you allow X to send email to A or B but disallow multiple recipients, then X can eas

Re: check_recipient_access does not seem to be working for me

2009-03-25 Thread mouss
Xn Nooby a écrit : > I'm using Postfix on RHEL5. > > I want my local users to only be able to send and receive emails from > users on another mail server, I do not want local users to be able to > email eachother. I have not been able to prevent local users from > emailing eahcother. It seems my c