greetings
can I do this without an if then endif? /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN -j |
jeff donovan wrote:
> greetings > > can I do this without an if then endif? > > /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN > > > -j - && syntax in not defined, you can't do that. - comparing two headers is not supported, you can't do that either. -- Noel Jones |
In reply to this post by jeffrey j donovan
jeff donovan:
> greetings > > can I do this without an if then endif? > > /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN man header_checks All supported behavior is documented. |
On May 9, 2008, at 11:11 AM, Wietse Venema wrote: > jeff donovan: >> greetings >> >> can I do this without an if then endif? >> >> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN > > man header_checks > > All supported behavior is documented. > Ah yes,.. okay did a bunch of reading. and the reoccurring theme is ; Header (and body) checks process one header (or line, with body checks) at a time. So my question is. is there a better way to reject/bounce/warn when a message from user1@domain to user2@domain shows up? simliar to this, although I know this wont work. if /^To:.*postmaster@example\.com/ /^From: user2@example\.com/ WARN endif |
jeff donovan wrote:
> > On May 9, 2008, at 11:11 AM, Wietse Venema wrote: > >> jeff donovan: >>> greetings >>> >>> can I do this without an if then endif? >>> >>> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN >> >> man header_checks >> >> All supported behavior is documented. >> > > Ah yes,.. > > okay did a bunch of reading. and the reoccurring theme is ; > Header (and body) checks process one header (or line, with body checks) > at a time. > > So my question is. > is there a better way to reject/bounce/warn when a message from > user1@domain to user2@domain shows up? > > simliar to this, although I know this wont work. > if /^To:.*postmaster@example\.com/ /^From: user2@example\.com/ WARN endif Yes, but do it with smtpd restrictions rather than header_checks. Please see: http://www.postfix.org/RESTRICTION_CLASS_README.html -- Noel Jones |
In reply to this post by jeffrey j donovan
On Fri, 9 May 2008 at 13:47 -0400, [hidden email] confabulated:
> > On May 9, 2008, at 11:11 AM, Wietse Venema wrote: > >> jeff donovan: >>> greetings >>> >>> can I do this without an if then endif? >>> >>> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN >> >> man header_checks >> >> All supported behavior is documented. >> > > Ah yes,.. > > okay did a bunch of reading. and the reoccurring theme is ; > Header (and body) checks process one header (or line, with body checks) at a > time. > > So my question is. > is there a better way to reject/bounce/warn when a message from user1@domain > to user2@domain shows up? > > simliar to this, although I know this wont work. > if /^To:.*postmaster@example\.com/ /^From: user2@example\.com/ WARN endif I would believe it shouldn't be too difficult to create a policy service to do this: http://www.postfix.org/SMTPD_POLICY_README.html |
In reply to this post by Noel Jones-2
On Fri, 9 May 2008 at 13:00 -0500, [hidden email] confabulated:
> jeff donovan wrote: >> >> On May 9, 2008, at 11:11 AM, Wietse Venema wrote: >> >>> jeff donovan: >>>> greetings >>>> >>>> can I do this without an if then endif? >>>> >>>> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN >>> >>> man header_checks >>> >>> All supported behavior is documented. >>> >> >> Ah yes,.. >> >> okay did a bunch of reading. and the reoccurring theme is ; >> Header (and body) checks process one header (or line, with body checks) at >> a time. >> >> So my question is. >> is there a better way to reject/bounce/warn when a message from >> user1@domain to user2@domain shows up? >> >> simliar to this, although I know this wont work. >> if /^To:.*postmaster@example\.com/ /^From: user2@example\.com/ WARN endif > > Yes, but do it with smtpd restrictions rather than header_checks. Please see: > http://www.postfix.org/RESTRICTION_CLASS_README.html Now that you mention it, I do remember seeing a response like this before for something similar. Thanks for the memory-refresh. |
In reply to this post by d.hill
On Fri May 9 2008 13:02:30 D Hill wrote:
> >> jeff donovan: > >>> greetings > >>> > >>> can I do this without an if then endif? > >>> > >>> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN snip > > okay did a bunch of reading. and the reoccurring theme is ; > > Header (and body) checks process one header (or line, with body > > checks) at a time. > > > > So my question is. > > is there a better way to reject/bounce/warn when a message from > > user1@domain to user2@domain shows up? snip > I would believe it shouldn't be too difficult to create a policy > service to do this: But note that the OP was talking about header addresses, whilst a policy service does not have access to the message body, only the SMTP envelope. The OP would be well advised to learn about how mail works. -- Offlist mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header |
In reply to this post by Noel Jones-2
On May 9, 2008, at 2:00 PM, Noel Jones wrote: > jeff donovan wrote: >> On May 9, 2008, at 11:11 AM, Wietse Venema wrote: >>> jeff donovan: >>>> greetings >>>> >>>> can I do this without an if then endif? >>>> >>>> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN >>> >>> man header_checks >>> >>> All supported behavior is documented. >>> >> Ah yes,.. >> okay did a bunch of reading. and the reoccurring theme is ; >> Header (and body) checks process one header (or line, with body >> checks) at a time. >> So my question is. >> is there a better way to reject/bounce/warn when a message from >> user1@domain to user2@domain shows up? >> simliar to this, although I know this wont work. >> if /^To:.*postmaster@example\.com/ /^From: user2@example\.com/ WARN >> endif > > Yes, but do it with smtpd restrictions rather than header_checks. > Please see: > http://www.postfix.org/RESTRICTION_CLASS_README.html > > -- > Noel Jones > thanks for the reply Noel, i read through this but I still did not see any method of denying access from one user to another within the same domain. like if I had a test group that i did not want to be able to send messages to. without creating another domain name. ( these are all internal only ) i was hoping to do something like this within the recipient restrictions. /^to: joeuser@my\.domain\.com$ | ^from: someuser@my\.domain\.com/ REJECT would I need the " \ " before the " . " guess not if i use a regular access data base. -j |
jeff donovan wrote:
> > On May 9, 2008, at 2:00 PM, Noel Jones wrote: > >> jeff donovan wrote: >>> On May 9, 2008, at 11:11 AM, Wietse Venema wrote: >>>> jeff donovan: >>>>> greetings >>>>> >>>>> can I do this without an if then endif? >>>>> >>>>> /^to: *friend@public\.com$ && ^from: *[hidden email]/ WARN >>>> >>>> man header_checks >>>> >>>> All supported behavior is documented. >>>> >>> Ah yes,.. >>> okay did a bunch of reading. and the reoccurring theme is ; >>> Header (and body) checks process one header (or line, with body >>> checks) at a time. >>> So my question is. >>> is there a better way to reject/bounce/warn when a message from >>> user1@domain to user2@domain shows up? >>> simliar to this, although I know this wont work. >>> if /^To:.*postmaster@example\.com/ /^From: user2@example\.com/ WARN >>> endif >> >> Yes, but do it with smtpd restrictions rather than header_checks. >> Please see: >> http://www.postfix.org/RESTRICTION_CLASS_README.html >> >> -- >> Noel Jones >> > > thanks for the reply Noel, > > i read through this but I still did not see any method of denying > access from one user to another within the same domain. > > like if I had a test group that i did not want to be able to send > messages to. without creating another domain name. ( these are all > internal only ) > i was hoping to do something like this within the recipient restrictions. > /^to: joeuser@my\.domain\.com$ | ^from: someuser@my\.domain\.com/ REJECT you need to read documentation to see what formats are supported. The link posted by Noel has examples on how to limit access for a user (local_only). > > would I need the " \ " before the " . " guess not if i use a regular > access data base. |
Free forum by Nabble | Edit this page |