Matching regexps

2020-02-26 Thread Adam Shostack
Hi, I'm having some trouble with matching. The regexp in my dovecot.sieve file should match on email addresses, but does not. # The code: if header :matches "From" "<[a-z0-9-]*@[a-z0-9-.]*>" { set "sender" "${1}"; } if not execute "grepfrom" ["${sender}"] { if envelope :matches "from" "*" {

Re: Dovecot/Sieve shortcuts?

2017-05-24 Thread Adam Shostack
ot;dovecot on behalf of Christian Kivalo" wrote: | | > | | > | | > | | > Am 9. Mai 2017 17:47:13 MESZ schrieb Adam Shostack : | | > >Hi, | | > > | | > >Is there a clean way to match on an email address the way procmail | | > >^TO_ did?

Re: per user procmail filtering and dovecot-lda

2017-05-17 Thread Adam Shostack
So I'm confused as to why you're piping back from procmail to dovecot LDA, rather than having procmail be the final LDA. Why not use: :0 w * ^List-ID:.*jenkinsci-dev.googlegroups.com mailing-lists/jenkinsci-dev/ (The trailing slash tells procmail that jenkinssci-dev is a maildir, not an mbox) A

Re: Dovecot/Sieve shortcuts?

2017-05-10 Thread Adam Shostack
e directory name. Can someone point out where I'm failing? Adam On Wed, May 10, 2017 at 10:50:23AM +0100, Darac Marjal wrote: | On Tue, May 09, 2017 at 11:27:22AM -0500, Larry Rosenman wrote: | >On 5/9/17, 11:25 AM, "dovecot on behalf of Christian Kivalo" wrot

Re: Dovecot/Sieve shortcuts?

2017-05-09 Thread Adam Shostack
On Tue, May 09, 2017 at 12:41:10PM -0500, Larry Rosenman wrote: | | >^TO_ did? that was a macro which expanded to | | >(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope | | >|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?) | | > | | >so you could write |

Re: Dovecot/Sieve shortcuts?

2017-05-09 Thread Adam Shostack
On Tue, May 09, 2017 at 11:27:22AM -0500, Larry Rosenman wrote: | On 5/9/17, 11:25 AM, "dovecot on behalf of Christian Kivalo" wrote: | Am 9. Mai 2017 17:47:13 MESZ schrieb Adam Shostack : | >Hi, | > | >Is there a clean way to match on an email addre

Dovecot/Sieve shortcuts?

2017-05-09 Thread Adam Shostack
Hi, Is there a clean way to match on an email address the way procmail ^TO_ did? that was a macro which expanded to (^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?) so you could write * ^TO_dovecot dovecot and grab messages to the list. In siev

Safely piping to a shell script

2017-02-10 Thread Adam Shostack
Thanks for the previous answer on :execute. In thinking about malicious input, I am worried about the possibility that mail will be sent with a clever from line. (Section 7 of http://www.ietf.org/rfc/rfc5229.txt is great, btw) To address this, I'm considering the following, and would appreciate

Re: Migrating to sieve

2017-02-07 Thread Adam Shostack
On Wed, Feb 08, 2017 at 01:41:01AM +0100, Stephan Bosch wrote: | Op 2/8/2017 om 1:27 AM schreef Adam Shostack: | > Hi, | > | > As I migrate to sieve, I would like to carry over the logic I had in | > procmail rules, which let me take all mail where I'd never sent email | > to

Migrating to sieve

2017-02-07 Thread Adam Shostack
Hi, As I migrate to sieve, I would like to carry over the logic I had in procmail rules, which let me take all mail where I'd never sent email to that address into a final spam catchall, which I called "neversent." I see that sieve can't run external programs, and I wonder if that means I'm SOL,